If you’ve already read any other projects on my website, you probably noticed that I like the use of simple and “chatty” protocols, where a high optimization of the number of bytes sent/received is not needed.
For BlueMatrix too I developed a protocol easy to understand:
commands starting with ? (question mark) are inquiry commands and BlueMatrix answers with the requested data without any headers:
- ?B = battery status (example of response: 25.4%)
- ?S = display status (ON on OFF)
- ?T = text actually displayed (example of response: hello world)
Commands starting with ! (exclamation mark) request an action and have no response:
- !S = toggle the display status (from ON to OFF or vice versa)
- !Ttesto = change the text displayed with testo
The sketch running in Arduino is available on Github. You’ll find that most of the sketch is similar to what I’ve already developed and explained in the previous tutorials about the different modules (display, Lipo Fuel Gauge…).
To make the sketch more readable, I split it into different files:
I developed two applications to control BlueMatrix:
- a .Net application, developed in C#
- an Android app
Both the applications have their source published in the project’s repository.
BlueMatrix was designed to be portable, therefore I suppose that it will be mostly controlled using a smartphone; this is the reason why the Android app is better designed than the desktop one and it’s also available on Google’s Play Store:
The app has been developed using the same guidelines and suggesions included in my tutorial about developing Android app with Bluetooth functionalities…