SHARE
TWEET

Untitled

a guest Mar 26th, 2020 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const int Led1 = 5;
  2. const int Led2 = 6;
  3. float mesure;
  4. void setup() {
  5.   pinMode(Led1, OUTPUT);
  6.   pinMode(Led2, OUTPUT);
  7. }
  8.  
  9. void loop() {
  10.     mesure = analogRead(A0);
  11.      digitalWrite (Led1, LOW);
  12.      digitalWrite (Led2, LOW);
  13.      if (mesure < 512){
  14.       digitalWrite (Led1, HIGH);
  15.       digitalWrite (Led2, LOW);
  16.      }
  17.      else{
  18.       digitalWrite (Led1, LOW);
  19.       digitalWrite (Led2, HIGH);
  20.      }
  21. }
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