After getting the the MMDVM up and running for access to D-Star and DMR Brandmeister networks I experimented with the touch screen of the Nextion TFT display upon request of DL5BQ. The idea was to have a standalone unit that can for example be shut down with a single key press. Currently this is realized with a push button and a Python script (see ).
But as we added a Nextion display with touch screen to the Raspberry Pi running the MMDVMHost the idea was of course to use the touch screen for input. The option are for example to shut the RPi down or to link to a specific reflector with a press on the button of the display. This would also save input pins and instead use the wiring to the display which is there anyway.
After fiddling around with the Nextion editor I found at least a little explanation of how it works. You can put buttons on the display that trigger display internal events like changing the text of a textbox. But as we wanted to trigger some action on the host system this was not the way to go because that does not produce any output on the serial line.
The point of the matter was to tick the checkbox “Send Component ID” which gives a few bytes of binary data output on the serial port. In hex it looks something like “0x65000401ffffff”. 0x65 seems to be the inital byte and is followed by a byte representing the page ID, a byte for the component ID and 0x01 for “button pressed” or 0x00 for “button released”. The 0xffffff is a end of data indicator that i needed for writing to the display as well.
So all that was left to do is to have a little script or program that reads from the display and triggers the corresponding action. As a quick and dirty solution I wrote a little shell script that links the ircddbgateway to a specific reflector. The source is here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
It displays page and component ID and should be easily extensible for other purposes. Just add some more ifs. A little demo video is available on YouTube (see ).