Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Playing with generating and trapping interrupts using the Arduino and
- an ATtiny2313.
- Simple LED blinker, pin 9 will actually be connected to the ATtiny.
- */
- byte led_pin = 8;
- byte int_pin = 9;
- void setup() {
- // put your setup code here, to run once:
- pinMode(led_pin, OUTPUT);
- pinMode(int_pin, OUTPUT);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- digitalWrite(led_pin, HIGH);
- digitalWrite(int_pin, HIGH);
- delay(1000);
- digitalWrite(led_pin, LOW);
- digitalWrite(int_pin, LOW);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement