Read Analog Voltage | Analog Read | Serial Monitor | #shorts #arduino

preview_player
Показать описание
Hey adventurers!! Hi.

Here we have a view of the Analog read function. This circuit will read an analog input on pin A0 of Arduino Nano, converts it to voltage, and print the result to the Serial Monitor. Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

Program for Read Analog Voltage:

void setup() {
// initialize serial communication at 9600 bits per second:
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
delay(80);
}

Thank you 😉🙂😃.

#shorts
#learning
#technology
#arduino
#circuit
#project
#electronic
#arduinonano
#youtubeshorts
#youtubevideo
#video
#youtubecreator
#viral
#shortsclip
#shortscraft
Рекомендации по теме