i need help with wireless control of a robotic arm using PIC

Status
Not open for further replies.
Hi everybody

i m working on my graduating project. i designed a robotic arm and connected it to PC using USB. and controled it successfully with a VB software.

now i m trying to take a step forward and design i wireless control.

i designed a mobile base with diffrential DC motors and a castor wheel.

my problem is how to make a sender pic to talk wireless to a receiver pic.

the reciever pic is supposed to control 7 servo motors and 2 dc motors. it must receive 7 bytes that determine servo position and DC motor operation.

i found a very usefull code in this forum but i cant modify it to control only 8 servos instead of 33

the code is sent by "wschroeder" in this thread
https://www.electro-tech-online.com/threads/drive-33-servos-with-one-pic-usart.34390/

can any one help me modifying this code to control 7 servos and 2 dc motors ?

here is that i plan to do with the reciever pic

1- receive 7 bytes of data ( received from RF reciever).
2- first byte is a preamble ( if needed).
3- second byte is responsible of DC motors operation. it is easy, if 1 received both motors move in the same direction ( forward). if 2 recieved , both motors move in the same direction ( backword), if 3 received , both move in opposite directions ( turn left ). and if 4 received , both motors move in opposite direction ( turn right ). this is a differantial wheels.

4- the rest of 5 bytes received are used to control 7 servo motors of robotic arm. they carry a value between 0 and 255.

5- i only need 5 byte to control 7 servos because i have two joints with two servos on each. thus if one servo have a control byte value of say 140, the other byte is found using 255 - 140 ( two servos on same joint are connected in opposite direction )

i hope you can help me. i wrote alot of codes using PIC basic pro. but i recently find mikrobasic to be more powerful.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…