Arduino Nano 33 Ble sense not reading Analog Input?

/*
  AnalogReadSerial

  Reads an analog input on pin 0, prints the result to the Serial Monitor.
  Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/AnalogReadSerial
*/

// the setup routine runs once when you press reset:
void setup() {
  
  // initialize serial communication at 9600 bits per second:
 
  Serial.begin(9600);
  
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1);        // delay in between reads for stability
}

I'm using the example codes to test out the Arduino, but i think that its not reading the pin? im using the proper arduino nano 33 ble board, the correct port and i checked the wiring couple times. i thought this microcontroller was similar to the Arduino nano

If you've connected the potentiometer to 5V, then you might have destroyed the ADC, the Nano 33 BLE is a 3.3V device.

Other than that, your question contains far too little information to provide you with a useful answer. Please post a wiring diagram and explain why you think it's not reading the pin.

Pieter

here they say the 5v output is disconnected.

so we can not use it and potentially damage our arduino .

I didn't know that, it was a good forward-thinking design choice by the Arduino engineers, they saved your Nano :slight_smile:

So do you know a reason for why it is not working ? does analogread() not work with arduino nano 3?

I just tried it on my Nano 33 BLE (no sense), and it works just fine. Potentiometer wiper to A0, left pin to ground, right pin to 3.3V. The serial monitor shows the position of the potentiometer between 0 and 1023.

Again, without a wiring diagram and a clear description of the actual problem I can't help you. What makes you say that it doesn't work? What are you seeing? Does the serial monitor show all zeros, does it not show anything at all?

Strange? i tried it again and now it works properly ?? maybe i wired it incorrectly ? i dont get it ?

Thank you Pete

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