I'm trying to use the "adafruit_io_sensors" example sketch with just my personal stuff entered into the correct places.
Verifying the sketch produces this error.
adafruit_io_sensors:23: error: 'callback' was not declared in this scope
PubSubClient mqttclient("io.adafruit.com", 1883, callback , client);
Any help would be appreciated.
sample sketch "adafruit_io_sensors" wont work
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.
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: sample sketch "adafruit_io_sensors" wont work
oh we dont use pubsub anymore - adafruit_mqtt is much better to use!
https://github.com/adafruit/Adafruit_MQTT_Library
https://github.com/adafruit/Adafruit_MQTT_Library
- argyll
- Posts: 8
- Joined: Tue Jun 28, 2011 1:20 pm
Re: sample sketch "adafruit_io_sensors" wont work
thank you I'll fix the sketch
- Slavisha84
- Posts: 24
- Joined: Sat Jan 31, 2015 4:18 am
Re: sample sketch "adafruit_io_sensors" wont work
I am getting same error message. I downloaded the new library but i am not sure how to modify the original sketch. Can anyone help me please?
- aforaste1
- Posts: 18
- Joined: Sun Nov 01, 2015 11:40 am
Re: sample sketch "adafruit_io_sensors" wont work
I had received this same error as well. I ended up using the group sensor sketch as a starting point instead, which uses the Mqtt library.
- Slavisha84
- Posts: 24
- Joined: Sat Jan 31, 2015 4:18 am
Re: sample sketch "adafruit_io_sensors" wont work
Hi,
Can you point me to that sketch for group sensors you mentioned?
Can you point me to that sketch for group sensors you mentioned?
Last edited by Slavisha84 on Sat Dec 19, 2015 6:12 pm, edited 1 time in total.
- aforaste1
- Posts: 18
- Joined: Sun Nov 01, 2015 11:40 am
Re: sample sketch "adafruit_io_sensors" wont work
The group sensor sketch is part of the Adafruit IO Basics code package that is posted here: https://github.com/adafruit/adafruit-io-basics. There are different versions depending on what type of hardware you are using. I don't think a tutorial is available for this particular sketch.
- Slavisha84
- Posts: 24
- Joined: Sat Jan 31, 2015 4:18 am
Re: sample sketch "adafruit_io_sensors" wont work
Thank you for quick replay. I am using CC3000 wifi shield with DHT11 sensor.
I looked up the sketch you mentioned but I am realizing that I am miles away with my programming skills to get this resolved now. I might have to get back to this in few months when I get more knowledgeable.
I looked up the sketch you mentioned but I am realizing that I am miles away with my programming skills to get this resolved now. I might have to get back to this in few months when I get more knowledgeable.
- Slavisha84
- Posts: 24
- Joined: Sat Jan 31, 2015 4:18 am
Re: sample sketch "adafruit_io_sensors" wont work
Are you guys planing to update the sketch for Dashboard project with DHT11 and light sensors work with this library?adafruit2 wrote:oh we dont use pubsub anymore - adafruit_mqtt is much better to use!
https://github.com/adafruit/Adafruit_MQTT_Library
I am unable to figure out how to resolve the error message we all have been getting.
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.