elphine
Newbie level 5
Hello guys....their is problem with the programming...so i need help in this. the code i have written is pasted below. this program is for the project accelerometer based hand gesture controlled robot.
please help....it is urgent.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 #include<reg52.h> int i; void main(void) { P0=0xFF; /*initialise P0 as input for sensor*/ for (i=0;i<10000;i++) while(1) { switch(P0) /*check status of port P0*/ { case (0xF5): P3=0xFA; /*forward*/ for(i=0;i<30000;i++) break; case (0xFA): P3=0xF5;/*reverse*/ for(i=0;i<30000;i++) break; case (0xF6): P3=0xF8;/*right*/ for(i=0;i<30000;i++) break; case (0XF9): P3=0xF2;/*left*/ for(i=0;i<30000;i++) break; } } }
please help....it is urgent.
Last edited by a moderator: