AnalogRead on Arduino Nano 33 BLE

I would like to read out an analog pin and output the value on the serial monitor. it works with an arduino uno but not with an arduino nano 33 ble. what am I doing wrong ? a value of 0 is always output.

#define PotentioPin A7
int    potentio = 0;

void setup() {
    Serial.println("Test startet...");

  void loop() {
    potentio = lesePotentiometer();     // Simulation einer Lenkstangenneigung
    Serial.println( potentio  );
    //potentio = 1023 - potentio;         // Abweichung Potentiometer von der Neutralstellung

    int lesePotentiometer(){
    int potentioMesswert;  
    potentioMesswert = analogRead(PotentioPin);       // Rückgabewert 0...1023
    Serial.println(potentioMesswert );
    return potentioMesswert;

The sketch works, the Nano BLE works.
Then it is probably due to the connection of the analog device!

i tried another arduino nano 33 ble. only a 0 is always output. it also works with an arduino nano but not with an arduino nano 33 ble which is based on Mbed OS.


What is attached to that pin?

a potentiometer from variohm (360 angle sensor.)

WINKEL 360: Winkelsensor, 0 � 360 °, ratiometrisches Signal bei reichelt elektronik

@wildbill @RudolfAtRTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.