Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
Defines:// *************** Bluetooth Lights ****************#define blue_on PORT_ON(PORTC,0)#define yellow_on PORT_ON(PORTC,1)#define red_on PORT_ON(PORTC,2)#define white_on PORT_ON(PORTC,3)void all_off(void){PORT_OFF(PORTC,0);PORT_OFF(PORTC,1);PORT_OFF(PORTC,2);PORT_OFF(PORTC,3);} // end routine// *************END BLUETOOTH Setup******************Code (example show is for blue only , just change the letter and color for the others):char cByte = uart0GetByte(); // get byte from UART0 on the axonif (cByte == 'b') // if character received is b then{all_off(); // turn all LEDs offblue_on; // turn only blue LED on}
Perl can capture keys, and I am 90% sure it can connect to a serial port.