Photon 2 Based Gate (relay) Controller

[ I really wish threads in this form didn’t auto-close after 6 months. ]

So you can check out my previous gate controller thread here:

Still using the basics of this system. My kid wrote an iOS app that can talk to Particle Cloud that works great. We might post that one day. But for now, I decided to update my hardware to Photon 2. The code for that is here:

It’s a super quick hack of my previous code that was really more of Photon1+NCD because the NCD needed code for its I/O extender. This “port” removes the I/O extender because all I did was got an Adafruit Featherwing relay board and connected that to D2.

This also has a small LiPo so I don’t need to put this on a UPS to be covered with power flickers. Nice feature added to the Photon 2!

Then I got some bits off Amazon and put this version in a nice box. First, the Photon 2 and the relay:

Then I laser cut a nice piece of acrylic:

The above acrylic mounts to the floor of the enclosure on a couple studs made into it and then I mounted everything up and used some glands:

There’s also an external antenna, which I’m having some struggles with that are documented in this thread:

But the basics seem to work well so far. Just need to get auto-selection of the external versus internal antenna working and it’ll be set.


The six month autoclose is the best balance we've found between too long, where ancient information is used on current DeviceOS versions (all the old cellular hacks from 11 years ago), and too soon, where a relevant topic is updated.

I agree it's unfortunate when wanting to update a long term project, but @Support can unlock a topic for you if asked.