SHARE
TWEET

Untitled

a guest Jun 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int a = 0;
  2.  
  3. void setup(){                                                
  4.   pinMode(A5,INPUT);                                  
  5.   pinMode(9,OUTPUT);                                    
  6.   Serial.begin(9600);
  7. }
  8.  
  9. void loop(){                                                          
  10.   int a = analogRead(A5);                                    
  11.   Serial.println(a);                                                
  12.   if(a > 5){
  13.     analogWrite(9,255);                            
  14.   }
  15.   else {
  16.     analogWrite(9,0);                                          
  17.   }
  18.   delay(10);                                                        
  19. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top