It’s alive! My Arduino controller can control things wirelessly, sending and receiving! It sends Nunchuck ‘packets’, and receives display ‘packets’. I created a basic packet system so that I standardize communication between wireless things. Each packet has a checksum, so if a bad packet is received, it can be discarded. Packets have a ‘type’, which can be things like ‘are you there’, to ‘display this’, or ‘here’s nunchuck data’. The beautiful thing about standards, is that I can use this to quickly roll out wireless things, without having to figure it all out again.
This demo is simple, reading an NTC Thermistor and displaying it on the controllers LCD. The controller sends Nunchuck packets to the ATDservo, and it turns a servo based on the position of the nunchuck joystick. It could easily do anything else, since it received the whole controller output. I also have the code for a PS2 controller, but I have it commented out for now, since the library takes up too much space.
What i plan to do with this, is to make a basic voltage monitoring board to monitor the status of a UPC battery as it discharges. It will save the data to an SD card, maybe making measurements every second. I could do it without anything plugged into it, and with something plugged in. Just a quick little experiment, to show everything working. 🙂
As always, the code is below. I use a simple state machine to process each received packet, and I have another function that handles the different types of packets. And it works 🙂 Someday I may make an PCB based on the Controller, using a singular wireless thing, so that it will be quick and easy to carry the controller with me!