Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C++ code
- //
- void setup()
- {
- pinMode(A0, INPUT);
- pinMode(13,OUTPUT);
- Serial.begin(9600);
- }
- void loop()
- {
- float value = analogRead(A0);
- Serial.println(value);
- float voltage = value * 5 / 1023;
- Serial.println(voltage);
- delay(5000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement