image

Bluetooth Teething Troubles


21 September 2019 | Kevin McAleer


I’ve been recently trying to get bluetooth to work on my SMARS using Python and Arduino code, and its not been going well until now.

The trouble is that I’ve been assuming that the module on top of the fundumoto motorshield that is specifically designed for a bluetooth module (either the HC-05 or HC-06) would just work. I’ve only been able to get it to work in one direction - from the SMARS back to the PC (Mac or Raspberry Pi) running python.

I’ve searched the internet for any help on this issue and there isn’t a lot available.

What I’ve done as a workaround is to ignore the built in Bluetooth connector on the fundumoto and connect it to pins 3 & 4 on the Arduino and then create a second, software serial connection to those pins. That works perfectly and I’m able to remotely control the SMARS from another device over bluetooth.

Image of SMARS with bluetooth

Incidentally, I created a small utility in Python as part of SMARSLab just for this purpose. The utility is creatively named butil.py.

To download the SMARSLab library browse to: https://www.github.com/kevinmcaleer/smarslab.