Talking to the Formula AllCode robot using the Raspberry Pi

The Formula AllCode robotics course is great for makers to test their skills and capabilities or for introducing learners to programming and robotics in a fun and motivating way. The robot is compatible with hardware from Raspberry Pi to Android to iPhone, Windows PC’s, MAC and more.

This tutorial guides you through the process of setting up a Raspberry Pi with a USB Bluetooth dongle so it can communicate with AllCode. Once the set-up is complete, we’ll be able to send simple commands to toggle LED’s, receive information from sensors, just to show some of the functionalities of the Formula AllCode.

The Formula AllCode is currently a Kickstarter campaign. Back it today by clicking here.Talking to the Formula AllCode robot using the Raspberry Pi.jpg

Setting up Bluetooth Connection

We’ll assume you’re running Raspbian on your Pi and that your USB dongle it’s already plugged into one of the ports. Open the command line terminal and type in the following command:

lsusb

Check if your dongle is recognised (something like): Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

If your Pi sees the dongle, then update your operating system and install the Bluetooth support package.

sudo apt-get update
sudo apt-get install bluetooth bluez-utils blueman

Find the name of your Bluetooth dongle (“hci0” in our case):

hciconfig

Make sure that Formla AllCode is powered and scan for Bluetooth devices:

hcitool scan

This will return the MAC address of the AllCode in the form of: xx:xx:xx:xx:xx:xx, in our case: 00:BA:55:56:BB:3A. Run the following command to pair with the robot:

sudo bluez-simple-agent hci# xx:xx:xx:xx:xx:xx

xx:xx:xx:xx:xx:xx is the MAC address of your robot (in our case: 00:BA:55:56:BB:3A) and hci0 where # is the number of your device. If you’re asked for pin number, enter 1234. Example command for us:

sudo bluez-simple-agent hci0 00:BA:55:56:BB:3A

The last step is to edit the configuration file rfcomm.conf, where a permanent connection will be established. Open the file:

sudo nano /etc/bluetooth/rfcomm.conf

Add the following lines at the end of the file (where xx:xx:xx:xx:xx:xx is the MAC address of your robot):

rfcomm1 {
bind yes;
device xx:xx:xx:xx:xx:xx;
channel 1;
comment “serial Bluetooth connection”;}

Save file and install pySerial library:

sudo apt-get install python-serial

Check if the settings are fine by trying to connect with the AllCode, type the following command:

sudo rfcomm connect 0 xx:xx:xx:xx:xx:xx:xx

xx:xx:xx:xx:xx:xx is the MAC address of your robot, in our case the command is: sudo rfcomm connect 0 00:BA:55:56:BB:3A and if they connect you should see:

For setting up the Bluetooth connection we followed the instructions on the link below, in case of any issues please visit the website:

http://blog.dawnrobotics.co.uk/2013/11/talking-to-a-bluetooth-serial-module-with-a-raspberry-pi/

Formula AllCode – Robotics course Kickstarter with Raspberry Pi compatibility

The Formula AllCode robotics course is great for makers to test their skills and capabilities or for introducing learners to programming and robotics in a fun and motivating way.

Raspberry Pi is one of a number of hosts for this neat little robot from Matrix TSL​, designed as part of a course in robotics that aims to cater for beginners and advanced users alike. It's controlled over Bluetooth from any platform that can support the Bluetooth RFCOMM protocol, so you can program for it in just about anything (popular examples are provided).

Matrix TSL have also written a full tutorial about how users will talk to the Formula AllCode robot using the Raspberry Pi.

Kitted out with a variety of sensors, microphone, speakers and LCD display, and with capacity for expansion, it has plenty of appeal, and it's on Kickstarter now with 18 days left to go. You can back the project by clicking here.Talking to the Formula AllCode robot using the Raspberry Pi schematic.jpg

The project itself consists of:

  • The Formula AllCode robot
  • A FREE course in robotics
  • Accessories used to learn including graphical mat and maze walls

The robot can be used with hosts including Windows, MAC, Raspberry Pi, Android and iPhone and a number of examples can be seen in the headline video and on the Matrix TSL website at www.matrixtsl.com/formula-allcode

A low cost robot buggy, the AllCode is great for makers to test their skills and capabilities using an interesting and diverse platform or for introducing younger school children to programming and robotics in a fun and motivating way with huge scope for further work and competitions.

The video below explains more about the vision for Formula AllCode and provides some examples of what the robot itself can achieve when used with Raspberry Pi, Android, Flowcode etc.

LINK HERE TO THIS VIDEO: https://youtu.be/rD15n7HgTmo

The image and specification table below detail the over technical specification of the Formula AllCode robot buggy.

The Formula AllCode Kickstarter campaign runs until 4th September. To back the campaign from as little as £5 click here.

 

For more detail: Talking to the Formula AllCode robot using the Raspberry Pi


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top