Skip to content

Instantly share code, notes, and snippets.

@kayleema
Created April 24, 2014 12:13
Show Gist options
  • Save kayleema/11252490 to your computer and use it in GitHub Desktop.
Save kayleema/11252490 to your computer and use it in GitHub Desktop.
#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