Is there anyone out there experienced in writing Python code? I have no experience in this realm as those that do can probably tell by my question below.
In an experiment to make the GTM re-boot remotely in a solar powered setting I ordered some parts from Adafruit including a mini push-pull solenoid, a mosfet and a Trinket microcontroller. I thought I would figure out the programming part easy enough but am realizing I am in over my head there. I have zero experience and capacity in writing code.
My planned experiment is to use the Trinket and a mosfet to control the power to the solenoid to push the GTM button for 2 seconds to restart the GTM after a power failure.
I plan to use a solar panel and voltaic V44 with always on feature. As long as the sun is out all is well. When the external battery and the GTM batteries die the system will shut down. When the sun comes out and charges the external battery I’d like the Trinket to wait 5-10 minutes after it senses power for the GTM to get a slight charge and then activate the solenoid for 2 seconds. This would reset the GTM into pairing mode. (I guess if it worked really well we could get it to triple tap the button twice to enter relay mode but I want to keep it simple for now and can live with the extra power consumption.) After that the Trinket could hibernate if possible until the next power interruption.
One thing I haven’t confirmed is if the V44 returns to always on mode after being depleted and power is restored. If that doesn’t work I’ll use a traditional battery with a low voltage disconnect. I know I could use a larger battery/panel combination trying to maintain constant power but I’d like to keep these as discrete as possible fitting inside the smallest Harbor Freight Apache hard case. Also the option to leave them out year round thru ice and snow is very enticing. My relays are high on mountain tops that take several hours to reach if they need attention. I can live with some down time while the sun is away if the GTM would just restart itself when the sun comes out!
Can someone get me started with some code that will let me test my experiment? thank you