Previously I took apart my new Dream Cheeky USB RC car. Now I want to develop a driver that will allow me to control it from my own software. I knew that it followed the HID device protocol because USBHID was included in the installation.
If you are new to HID devices, you should check out Jan Axelson’s page. Jan’s books have been inspirational for me for years! (Starting with the serial port book years ago)
I started with a program called SimpleHIDwrite which will let me write raw values to a HID device.
On opening SimpleHIDWrite the Dream Cheeky USB car shows up as a device called the “Rocket Baby” Pretty funny.
The device returns the following information from a info request:
PID 0A81
VID 0702
When the car is in the charger and the car is charging the driver returns:
RD 00 05
When the car is fully charged the driver returns:
RD 00 85
When the car is out of the charger the driver returns nothing.
Writing a 01 to the driver causes the car to go forward (That was a surprise!)
Here is a table with the rest of the commands in HEX
$01 Forward
$02 Right
$20 Left
$04 Backward Right
$10 Backward Left
$00 STOP!
Thats it! Now if I can talk the roborealm folks into changing their Dream Cheeky driver to include this I will be set. Otherwise I will have to start coding……
Ok, so I started coding a little bit. I downloaded Jan’s VB6 HID module and got it working with the USB car. I have to stop working on this or I will be up all night!
So I wrote a simple windows program to control the Car. It uses Jan Axelson’s HID module and has a simple mouse interface to drive the car. There really were other things I should have been doing tonight! Download the program here! usbcar.exe