Watch the video below to discover more about his amazing journey into the world of robotics.
What is Bluetooth LE and why is it key in robotics?
WebBluetooth plays a key role when it comes to connecting APIs and hardware. In the video, Nico explains that Bluetooth uses the same frequencies as wireless LAN, but instead Bluetooth was designed to send very short commands over short distances.
Classic Bluetooth was buggy and had many problems, but now, Bluetooth BLE is here to solve all the previous problems.
Bluetooth LE is used in the world of IoT because of the many benefits it brings compared to the initial versions of Bluetooth. These benefits include:
- Energy efficiency
- Encryption for data security between clients and servers
- Increased range and speed
- Much better compatibility with devices from different brands
The Generic Attribute Profile GATT
In the video, Nico also explains the role of GATT (Generic Attribute Profile). This is what allows the interchange of data, and communication of different statuses (such as battery level, for example). It also enables different operations to perform. The GATT is formed by the following elements:
- GATT Server
- GATT Service
- GATT Characteristic
- GATT Value
You can find a more complete explanation of this in the materials kindly shared by Nico here.
After the coding is done, Nico shows how, using his browser, he is able to turn a PlayBulb Sphere from blue to red. Of course, that’s just the beginning and the very basics. Everything turns more complex afterward!
SpeedWheels (Bluetooth LE + Arduino) and more inventions
Nico Martin then moved on to a more difficult experiment called “SpeedWheels”. An Arduino Nano RP2040 connected to two motors with wheels (and Lego bricks, of course!) You can check out the whole process in this Twitter thread he shared.
After my beloved #RapberryPi based SpeedWheels left me hanging on stage for the second time now, I had to resort to drastic measures. I will rewrite everything, this time with the #ArduinoNano RP2040 as a basis.— 🤷 nico.dev (@nic_o_martin) March 30, 2022
Also, you can find more details on his GitHub repository here: https://github.com/nico-martin/speed-wheels-ble-arduino. Remember to thank Nico for his generosity!
Nico knows how to have fun with Bluetooth and “SpeedWheels” wasn’t his last invention. Another project of his is the “BLE Boozer”. This invention of his is able to switch slides of his presentation also using an Arduino microcontroller. He describes it as “An Arduino Sketch that provides a Bluetooth Low Energy Service whose buzzer characteristic exposes a value of “00” or “FF” depending on whether the buzzer is currently pressed or not, it also has an LED that gives feedback about the current status.”
You can check the process on his Twitter below:
Nico also shared the whole code involved in his GitHub repository. Check it out here.
More about the video’s author
Nico Martin is a self-taught web developer and Google Developer Expert in Web Technologies from Switzerland. As the founder of the digital agency “say hello”, he learned early on how to use the web platform to efficiently meet the needs of customers.
He has contributed his know-how as a frontend development freelancer and consultant in various large projects, while constantly experimenting with modern browser technologies and sharing his learnings in workshops, articles, and talks.