Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. //this outputs pot value to screen in ohms
  2.  
  3. int gasSensor = 0; // select input pin for gasSensor
  4. int val = 0; // variable to store the value coming from the sensor
  5.  
  6. void setup() {
  7. Serial.begin(9600);
  8. }
  9.  
  10. void loop() {
  11. val = analogRead(gasSensor); // read the value from the pot
  12. Serial.println( val );
  13. delay(100);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement