Guest User

Untitled

a guest
Jun 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. void setup() {
  2. // put your setup code here, to run once:
  3. Serial.begin(9600);
  4. }
  5.  
  6. void loop() {
  7. // put your main code here, to run repeatedly:
  8. double value = analogRead(A0);
  9. char x;
  10. if (Serial.available()) {
  11. x = Serial.read();
  12.  
  13. if (x == ' ') {
  14. value *= 3.0 * 5.0 / 1024;
  15. Serial.println(value);
  16. }
  17. }
  18. }
Add Comment
Please, Sign In to add comment