Hello.
Here is my first project contribution to this forum.
I use several Android tablets mounted on walls in my house to control and verify things and the communication i use there is MQTT so mcModules MQTT support feels very natural for me. Something that i need is very small touch screen and the possibility to use them to send MQTT, one example could be a little 2.4" screen next to the light switch that could control the
Sonos in that room.
The problem I had is that I need everything to be small so that it easily could be fit inside a case or inside the wall behind the screen.
mcModule is the perfect device for this, it is very small and it has MQTT and Uart serial communication that is all you need to have this up and running.
I Am providing a simple example and also a short video so that you could see it in action.
Code loaded to mcModule
Define PinMode Pin1 As DigitalInput //RX
Define PinMode Pin3 As DigitalOutput //TX
Class NextionTest
Shared serial As Uart
Shared Event Boot()
// Enable serial communication
serial = Uart.Create(9600, Pin.Pin3, Pin.Pin1)
End Event
Shared Event Uart0Receive()
//Data is received
Dim chr As Integer = serial.Read
If chr = 1 Then
//Button 1 clicked
//Turn on Green LED
LedGreen = True
ElseIf chr = 2 Then
//Button 2 clicked
//Turn off Green LED
LedGreen = False
ElseIf chr = 3 Then
//Button 3 clicked
//Turn on or off Red LED
LedRed = Not LedRed
End If
End Event
End Class
Please ask questions about this and I will do my best to answer them.