Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- double value = analogRead(A0);
- char x;
- if (Serial.available()) {
- x = Serial.read();
- if (x == ' ') {
- value *= 3.0 * 5.0 / 1024;
- Serial.println(value);
- }
- }
- }
Add Comment
Please, Sign In to add comment