SHARE
TWEET

Untitled

a guest Feb 27th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int led = 13;
  2.  
  3. void setup(){
  4.     Serial.begin(9600);
  5.     pinMode(led, OUTPUT);
  6. }
  7.  
  8. void loop(){
  9.     char leitura = Serial.read();
  10.  
  11.  
  12.     if( leitura == '1'){
  13.         digitalWrite(led1, HIGH);
  14.     }
  15.     else if( leitura == '2'){
  16.         digitalWrite(led1, LOW);
  17.     }
  18. }
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