SMC遠(yuǎn)程無(wú)線控制小車制作
//-----------------------主程序--------------------------//
main()
{
char c;
Init_Timer1_COM();
while(1)
{
c=getData();
switch (c)
{
case ‘w’:
printf(“GO n”); DC=0x05;
break;
case ‘s’:
printf(”BACK n”); DC=0x06;
break;
case ‘a(chǎn)’:
printf(“LEFT n”); DC=0x1d;
break;
case ‘d’:
printf(”RIGHT n”); DC=0x2d;
break;
case ‘z’:
評(píng)論