Chapter 7: Microcontroller Interrupts and Timers
sendString("The joystick position is: ");
break;
break;
SH:
sendString("PUSH");
break;
default:
}
re
e to the correct
irector
e:
PC_Comm.c ready to communicate.
k = KEY_INVALID; // No key stroke available
sei(); // enable interrupts
if(k != KEY_INVALID)
{
switch(k)
{
case KEY_UP:
sendString("UP");
break;
case KEY_DOWN:
sendString("DOWN");
case KEY_LEFT:
sendString("LEFT");
case KEY_RIGHT:
sendString("RIGHT");
break;
case KEY_PU
sendString("?");
break;
}
sendChar('\r');
turn k;
}
Compile it and download to the Butterfly (remembering to brows
d y).
Using joystick
Using HyperTerminal, you should se