I decided instead of jumping straight to Relay Switch Controller shield (Which I’ll have to build a half-assed one), I’ll create a server to make sure that I know how to do this.
I struggled with C# a bit. But I only struggled because I thought in a VERY complicated perspective which I ended up done things in a very VERY simpler ways.
So, what happened now?
Well, I didn’t change anything from Arduino side except for replacing and adding few lines.
So the Arduino code changed from this:
Let me explain the change:
I had to change (Or replace) the Udp.remotePort() to 8888 because my server is listening on that port, not any port.
And I had to change the data transferred from:
“Humidity: HH.HH\tTemperature: TT.TT”
Where HH.HH is the humidity value, \t is TAB, and TT.TT is temperature value
Where HH.HH is the humidity value, \t is TAB, TT.TT is temperature value, and XXXXXXXX is the node’s name
I had to do this because I wanted to name each node (To differentiate between them) and to be able to use String.Split() to make things easier server-side.
I used C# to write the server because, well, it’s easier for me to do a quickie server and for future upgrades.
Here’s a video that auto-refresh the readings.
Next step will either involve playing with more sensors and applying it in real world (As in, moving it to the roof for actual readings). Or, actually start digging the Relay Switch Controller shield part.