You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-07-30 13:23:06 +03:00
simplify feeds in examples
This commit is contained in:
@ -67,12 +67,10 @@ boolean FONAconnect(const __FlashStringHelper *apn, const __FlashStringHelper *u
|
||||
|
||||
// Setup a feed called 'photocell' for publishing.
|
||||
// Notice MQTT paths for AIO follow the form: <username>/feeds/<feedname>
|
||||
#define PHOTOCELL_FEED AIO_USERNAME "/feeds/photocell"
|
||||
Adafruit_MQTT_Publish photocell = Adafruit_MQTT_Publish(&mqtt, PHOTOCELL_FEED);
|
||||
Adafruit_MQTT_Publish photocell = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/photocell");
|
||||
|
||||
// Setup a feed called 'onoff' for subscribing to changes.
|
||||
#define ONOFF_FEED AIO_USERNAME "/feeds/onoff"
|
||||
Adafruit_MQTT_Subscribe onoffbutton = Adafruit_MQTT_Subscribe(&mqtt, ONOFF_FEED);
|
||||
Adafruit_MQTT_Subscribe onoffbutton = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/onoff");
|
||||
|
||||
/*************************** Sketch Code ************************************/
|
||||
|
||||
|
Reference in New Issue
Block a user