I want to connect my ESP8266 to Adafruit.io using wifi credentials, username and key stored in eeprom. In the tutorial, config.h file, these parameters are set using '#define '. How do I set them using string variables obtained inside setup()?
Specifically, if I initialize the AdafruitIO_WiFi object by calling
AdafruitIO_WiFi io(AfIO_username.c_str(), AfIO_key.c_str(), ssid.c_str(), password.c_str());
inside setup(), I successfully connect to Adafruit.io, but the io object appears to remain local to setup(): io.run() inside loop() does not handle its inputs and no dashboard input is received.
How do I resolve? Thanks!
AdafruitIO_WiFi io() call
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.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- brubell
- Learn User Page
- Posts: 2017
- Joined: Fri Jul 17, 2015 10:33 pm
Re: AdafruitIO_WiFi io() call
I've answered something similar to this before, it might not be possible using Adafruit IO Arduino:
viewtopic.php?f=56&t=158391&p=781336&hi ... om#p781336
viewtopic.php?f=56&t=158391&p=781336&hi ... om#p781336
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.