Now I have a working canbus display, but how to get song titles from my smartphone and send it to the display:
- every time a new song is played, a notification flashes on the smartphone's screen: I will use an app called AutoNotification (plugin of the popular Tasker app https://joaoapps.com/autonotification/) to extract the song title and the artist name
- I will modify a Tasker plugin to send the text to a bluetooth SPP receiver connect to the Arduino board that drives the canbus display: https://ilias.giechaskiel.com/posts/bluetooth_serial/index.html https://github.com/giech/arduinotaskerbluetooth
- I will create a Tasker profile to check if a new notification is there and the send via Bluetooth to the canbus display thank to the bt plugin
Here is a screenshot of the webradio (ouifm, but it should work with any music player that send notifications) app that I like to listen to:
And a notification of the current song:
The config for the autonotification interception in Tasker:
The corresponding task that fires a bluetooth message at every new notification:
The bluetooth serial plugin config (after this discussion: https://github.com/giech/arduinotaskerbluetooth/issues/2, the plugin is modified to my purpose and is available on google play https://play.google.com/store/apps/details?id=com.giechaskiel.ilias.bluetoothserialfromtasker, than you Ilias!):
(The MAC address of the bt moule is blurred, I don't know if it really matters...)
And finally, the Tasker profile on top of that:
My first intention was to plug the SPP BT module on the hardware UART of the Arduino board to use indiffrently the USB or the BT link without code changes. But, as I still have some issues (some notifications are lost, ...), I finally plugged the SPP BT module as a software serial interface and I use the USB link to debug my program.
The corresponding Github commit: b287b22
I don't know yet why I'm dropping some notifications... I'm suspecting:
- the notifications interception plugin: I may have configurate it poorly
- the bluetooth module: there is so little data on this that I don't know if I'm using it properly: I will probably switch to another RN-42 (like on the bluetooth remote control) but as a SPP link this time
- the software serial code: the NeoSWserial library gives a handler that I might call too slowly
If anyone had dropping characters on this kind of SPP module, please let me know how do you solved that issue.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.