My journey into the Cloud (5); Control that lamp
I programmed the MQTT test Client so that it automatically appends a carriage return character [CR] to the message that comes in. Apart from that it’s necessary to set a baud rate of 9600 on the virtual COM port and activate the DTR signal. You can check out from the source code (see download below) how this has been achieved in C#. Now I can control the lamp in my study from anywhere in the world. However, so could anyone else if they guess the control character sequence (and correct Topic name)! For that reason, once the tests had been successfully carried out I dismantled the test setup.
Why not try out my test Client with electronic switching for yourself? As I mentioned above, there’s no reason why you couldn’t use an Arduino for the job. A Sketch to receive and interpret the character string and switch an output should not be too difficult to implement.
So far we’ve needed a PC and keyboard to enter commands, that of course needs to be changed but more on that next time!

Discussion (0 comments)