daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define lefEngine 4
  2. #define rightEngine 5
  3.  
  4. unsigned int sensor;
  5.  
  6. void setup()    
  7. {
  8. Serial.begin(9600);
  9. pinMode(leftEngine, OUTPUT);
  10. pinMode(rightEngine, OUTPUT);
  11. }
  12.  
  13. void loop()
  14. {
  15. senzor = analogRead (A0);
  16. Serial.print ("Sensor = ");
  17. Serial.println (sensor);
  18. }
  19.  
  20.  
  21. if (senzor>400)
  22. {
  23. digitalWrite(leftEngine,HIGH);
  24. digitalWrite(rightEngine,LOW);
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top