How to make relay to read the toogle button

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
User avatar
jwcooper
 
Posts: 1004
Joined: Tue May 01, 2012 9:08 pm

Re: How to make relay to read the toogle button

Post by jwcooper »

axiomnote wrote:so nobody wants to help me with the code or nobody knows how to do it?
We typically don't write code for users, just point you in the right direction. The suggestions to create a new 'status' feed that gets updated when your relay is actually toggled is a good one. You publish to that feed on the device right after it toggles the relay.

The /get topic is also the right approach for refreshing the state on the device as soon as it turns on. The linked documentation should show you how to implement it on your device as well.

Here is an example to update a feed from your device:
https://github.com/adafruit/Adafruit_IO ... sh.ino#L64

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”