Hello!

I’m new to Bela and recently started following a Bela C++ course on YouTube. I’ve been progressing well, but I ran into an issue while working on the sixth video (Analog I/O). The professor asked us to wire a circuit and experiment with the analog pins using the scope-analog example, but my potentiometers didn’t seem to work as expected.

To troubleshoot, I checked all my components, and they seem fine. Then, I printed the values of gIn1 and gIn2 to debug, but they’re always stuck at 0.999985 (the maximum value), no matter what voltage I apply.

Could this mean my analog pins are broken, or is there something I’m overlooking? Any help or suggestions would be greatly appreciated!

Hmmm can you try without connecting anything and see what values get printed?

    giuliomoro Yes, I tried and it is the same (0.999985), No metter if i connect ground or 3.3V or 5V or smth less with resistor or potentiometers I get the same value and I've tried this ln all of the pins. Digital pins work well. Just analog input is giving me trouble. What could it be about?

    Can you check your Bela image version from the IDE's settings-> other system functions->bersion details? Also what version of the Bela cape are you using?

    @giuliomoro
    Thank you for your response! Yes, I can check the details. My Bela image version is:
    v0.3.8h, 5 January 2023, and I’m using the Bela cape from the Bela Starter Kit.

    I’m not entirely sure what to do with this information, but I really appreciate your help. Thank you again!

    Is there anything else connected to the headers during your tests? Can you show a picture of your Bela cape?

      giuliomoro

      Nothing extra was connected during my tests. For the circuit in lecture 6, I followed the professor’s setup exactly as shown, using the same scope-analog example code. The only addition I made was a printf("%f", gIn1); line in the render() function to print the analog input values for debugging.

      Here’s what I observed:

      No matter how I adjusted the potentiometers, gIn1 always read 0.999985.
      I then disassembled the circuit and tested with just the analog pin.
      Connecting GND to pin 0 (gIn1 in code) gave the same result: 0.999985.
      Connecting 3.3V to the pin also returned 0.999985.
      It seems like the analog input is always reading as if the voltage is at or above 4.096V, regardless of the actual input.

      I’ve attached pictures of my Bela cape, along with shots of the setup when I connected GND and 3.3V directly to the input.

      What do you think might be causing this? Thanks for your help!