Then, you need a computer, preferably a linux system (virtual machine is also good), with OpenWrt already installed and compiled. we need its cross compiler (RT5350 SDK compiler is also fine, but that is hard to find. I like the one from OpenWrt).
For remote control, you might need an Android or iOS device. I wrote a simple code based on Qt, just UDP protocol.
The L298N can control two motors and outputs 5V.
We just connect the 5V to the VoCore USB power slot (or the 3.5V~6V hole without dock). For this I cut a USB wire.
Next we connect the L298N controls to VoCore GPIOs. There are six control ports, so we need six GPIOs.
ENA-> enable motor A
ENB-> enable motor B
IN1, IN2 -> control motor A
IN3, IN4 -> control motor B
Checking DTS, the dear VoCore have GPIO21~GPIO26, totalling 6 GPIOs already exported, so we can just use them.
ENA-> GPIO21
ENB-> GPIO22
IN1-> GPIO23
IN2-> GPIO24
IN3-> GPIO25
IN4-> GPIO26
Better to cover here, or it might short connect.
Now boot VoCore. Push the button ;) It's not necessary if you don't have a switch.
Set all GPIOs to output and all GPIO to 0.
Set Enable A to 1.
Reference: Test GPIO
Now here is a stupid video :) I make one wheel run. It drops down from my table but still runs in a cycle. Looks like the VoCore quality is not bad. It just woke up my dog… :D
Tomorrow I will write a simple application on my phone to remote control the car :)
Comments