Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<arduinoPlatform.h>
- #include<tasks.h>
- #include<interrupts.h>
- #include<stdio.h>
- #include<serial.h>
- #include<pwm.h>
- extern serial Serial;
- #define ld8 33
- #define ld2 27
- #define sw2 7
- void setup()
- {
- pinMode(ld8,OUTPUT);
- pinMode(ld2,OUTPUT);
- pinMode(sw2,INPUT);
- Serial.begin(9600);
- }
- void loop()
- {
- digitalWrite(ld8,LOW);
- delay(1000);
- digitalWrite(ld8,HIGH);
- delay(1000);
- if(digitalRead(sw2)==HIGH) digitalWrite(ld2,HIGH);
- else digitalWrite(ld2,LOW);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement