I connected an HC-06 Bluetooth adapter, across the Arduino Rx and Tx, as in my previous Blog posts.
In MIT App Inventor, I created the following Android design:
Since I already had an Arduino sketch which controlled the motors (previous post), I decided to make the Android program simply mimic the keyboard input of that sketch. I did, however, remove the menu output to the serial monitor.
Ignoring the Bluetooth connect and disconnect blocks, the control blocks required are very simple:
Because the so called "Hard Stop" doesn't seem to work, I have ignored it at this time.
I have not bothered with the fast reverse, again, for the moment.
This all works fine with the Cybot upside down, and still powered from the USB connector, with the motors powered from a separate supply.
As can be seen from the photographs above, we have an Arduino fitted with a protoshield carrying a mini-breadboard, The HC-06 is plugged directly into the breadboard, whilst the L9110 board is floating about on its cables (need to improve this)
Freeing the BEAST - mounting the Arduino and using Batteries
The Cybot chassis has a number of moulded pillars with threaded inserts, which were used to hold various original circuit boards. Unfortunately, I could only manage to line up one fixing hole at a time on my Arduino Uno R3. I came up with a plan to cut a piece of perspex which would cover all the existing pillars and screw down on to them. It could then be drilled to match the fixing holes on the Arduino Uno.
Whilst still plotting this approach, I realised that a better plan might be to make up a stripboard circuit to carry an Arduino Nano - I had already tested a Nano on a breadboard and it replaced the Uno in this application. I could then drill the stripboard to match the mounting pillars in the Cybot base. This would give me a (hopefully) neater and more reliable solution, with plenty of options for development - line follower, ultrasonic obstacle avoidance, etc.
While this new plan was fermenting, I ploughed on with powering the Cybot motors and the Arduino Uno with batteries, thus freeing it to run around.
Unfortunately, the Cybot had been packed away without removing its original batteries . The battery box was a disaster, so I had to source a near replacement, to hold 4 x AA cells for the motors. I soldered a barrel jack onto the wires from a PP3 battery lead to power the Arduino Uno and temporarily held the Arduino, protoshield and breadboard down with just 1 fixing screw.
As can be seen, it's a bit of a lash up !
We were in business, provided we could control the beast with the Android App......
SUCCESS!!
The Android app controls the Cybot perfectly.
Watch out for part 3 - a stripboard circuit with an Arduino Nano
Top Comments