GearsNGenes is proud to present its repository for Bluetooth events! It is currently available on the GearsNGenes GitHub page here. The libraries and example code are provided for you to run and modify.
With these libraries, you can control your arduino projects wirelessly through the Adafruit Industries’ free Bluefruit app. The app allows you to collect data from various sensors, which include:
- a control pad of buttons
- a color selector
- an accelerometer
- a magnometer
- a gyroscope
- and more!
You can choose to subscribe to specific sensors. When you do, you must write a function that tells the arduino what to do when it receives data from that sensor. These are called callback functions. And you only have to define them once. After that, the Arduino automatically runs the right callback for the right sensor.
Your power lies in what you write in each callback.
You could write a callback that steers a robot based on the orientation of your phone. Alternatively, you could write it to change change the color of a lamp to match one you pick. You could even write the callback to play different music based on the button you press. The limit is your imagination!
This repository will be very useful for some of our robotics projects that we are working on! Be sure to stay tuned for updates on this front.
Until next time, keep building and stay creative!