After playing around with the latest version of PJON, I finally found a good way for Arduino to Arduino communication. And with some test-code up and running, it was time to implement it in my automatic curtain driver.
With the Automatic Curtain currently running without any issues (using an open and close button), it was important to not mess things up. Luckily the implantation of the PJON receive code only took a few extra lines of code.
On the hardware side, I only needed to connect 3 wires:
- VCC: to power the controller.
- DATA: a bidirectional data line connected to any of the free digital or analog pins.
- GROUND: for obvious reasons.
And with these changes in place it was time to connect the remote control’s proof of concept: the Arduino with an rotary encoder and OLED screen. And within seconds, I had enough reasons to finally do a little victory dance. It worked!
After making some small tweaks to the OLED’s User Interface it even started to look like a real remote control:
Of course, there is still a lot I need to change to the code, but for now, it’s a perfect proof of concept! With both the Curtain Motor Unit as the Remote Control up and running the prototyping phase of my Automatic Curtain project is done. So now it’s time to take the next step: start working on the final units. The current motor unit is a few centimeters to short and will therefor be replaced by a new unit. The prototyping unit will be used for software development testing purposes.
For now, the next steps will be:
- Assemble the 4 final motor units.
- Design and produce the 4 motor control units (PCB).
- Mount all the units and wire everything together.
- Work on the final (and nicer looking) remote control.
- Improve the code in both the motor units as well as in the remote control.
Stay tuned!