Created
April 24, 2014 12:13
-
-
Save kayleema/11252490 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NEW_BYTE_HANDLER handle_data | |
#include "serial-tiny10.h" | |
int main(){ | |
serial_setup(); | |
//Set debug pin as output | |
DDRA |= _BV(1); | |
while(1){ | |
} | |
return 0; | |
} | |
void handle_data(uint8_t data){ | |
//Toggle the debug line every time you get an ASCII 1 | |
if (data == '1'){ | |
PORTA ^= _BV(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment