If you've got a Raspberry Pi computer and an Android phone, then building a remote-controlled robot could be easier than you think, courtesy of Blue Dot.
Blue Dot is a software library for the Pi that can turn an Android phone into a remote control for Pi-powered devices.
Blue Dot links the Pi to an Android app that displays a blue dot on the handset. This blue dot can interact with a wide variety of Pi-connected hardware, for example, the button could make an LED blink, take pictures with a camera or act as a joystick for a remote-controlled robot.
The Raspberry Pi Foundation's official blog has published a link to a code snippet called a 'Recipe' that allows Blue Dot to control a wheeled bot.
The code requires the user to link the Pi's GPIO pins to the motor controllers on a generic dual-motor robot. In the linked Recipe, the left motor's controller is connected to GPIO pins 4 and 14, while the right motor's controller is connected to pins 17 and 18. For more guidance on powering and wiring the robot, see this tutorial.
Once this wiring and software setup is complete, the Blue Dot app should be able to turn the robot and drive it forward and backwards by pressing appropriate points around the edge of the blue dot. A slightly more advanced Recipe allows the app to precisely control the robot's speed and direction.
Getting started with Blue Dot, a Python software library, is relatively straightforward, with instructions available here. The instructions assume the Pi is running the latest version of Raspbian with the Pixel desktop and the app requires a phone running Android 4.0.3 or newer.
The Blue Dot robot recipe also relies on GPIO Zero, a Python software wrapper that simplifies the process of writing code to allow the Pi to interact with hardware via its GPIO pins.
The latest version of GPIO Zero is now available, and can easily be obtained by those running the Pi's default Raspbian OS by running the command sudo apt update && sudo apt upgrade from the terminal. GPIO Zero v.1.4 has been upgraded to make it easier to use different programming paradigms, for example to use functional and object-oriented programming styles alongside procedural code.
Read more about the Raspberry Pi
- Raspberry Pi: The smart person's guide
- GCHQ builds monster Raspberry Pi cloud with OctaPi formation (ZDNet)
- How to give your Raspberry Pi 'state-of-the art computer vision' using Intel's Neural Compute Stick
- Raspberry Pi 3: The inside story from the new $35 computer's creator
- Raspberry Pi in 2017: New boards, new OSes and more
- Choosing a Raspberry Pi OS? Here's the definitive list
- Raspberry Pi rival delivers a 4K Android computer for just $25
- Raspberry Pi and Docker: Tiny $35 computer gets major new release of HypriotOS (ZDNet)
- Turn any hard drive into networked storage with Raspberry Pi (CNET)
Nick Heath is chief reporter for TechRepublic. He writes about the technology that IT decision makers need to know about, and the latest happenings in the European tech scene.