SHARE
TWEET

examExample1

gabbyshimoni Jun 2nd, 2020 739 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup(){
  2.     Serial.begin(9600);
  3.     pinMode(13,OUTPUT);
  4.  
  5.     Serial.println("enter a number");
  6.     while(Serial.available()==0);
  7.     int num = Serial.parseInt();
  8.     for(  ; num%2==0;  ){
  9.         digitalWrite(13,HIGH);
  10.         delay(500);
  11.         digitalWrite(13,LOW);
  12.         delay(500);
  13.  
  14.         Serial.println("enter a number");
  15.         while(Serial.available()==0);
  16.         num = Serial.parseInt();
  17.     }
  18. }
  19. void loop(){
  20. }
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