Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

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.
Please be positive and constructive with your questions and comments.

sample sketch "adafruit_io_sensors" wont work

by argyll on Sun Nov 29, 2015 2:55 pm

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.

argyll
 
Posts: 8
Joined: Tue Jun 28, 2011 1:20 pm

Re: sample sketch "adafruit_io_sensors" wont work

by adafruit2 on Sun Nov 29, 2015 6:50 pm

oh we dont use pubsub anymore - adafruit_mqtt is much better to use!
https://github.com/adafruit/Adafruit_MQTT_Library

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: sample sketch "adafruit_io_sensors" wont work

by argyll on Mon Nov 30, 2015 1:59 pm

thank you I'll fix the sketch

argyll
 
Posts: 8
Joined: Tue Jun 28, 2011 1:20 pm

Re: sample sketch "adafruit_io_sensors" wont work

by Slavisha84 on Sat Dec 19, 2015 3:40 am

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?

Slavisha84
 
Posts: 24
Joined: Sat Jan 31, 2015 4:18 am

Re: sample sketch "adafruit_io_sensors" wont work

by aforaste1 on Sat Dec 19, 2015 10:31 am

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.

aforaste1
 
Posts: 18
Joined: Sun Nov 01, 2015 11:40 am

Re: sample sketch "adafruit_io_sensors" wont work

by Slavisha84 on Sat Dec 19, 2015 1:09 pm

Hi,
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.

Slavisha84
 
Posts: 24
Joined: Sat Jan 31, 2015 4:18 am

Re: sample sketch "adafruit_io_sensors" wont work

by aforaste1 on Sat Dec 19, 2015 5:49 pm

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.

aforaste1
 
Posts: 18
Joined: Sun Nov 01, 2015 11:40 am

Re: sample sketch "adafruit_io_sensors" wont work

by Slavisha84 on Sat Dec 19, 2015 6:15 pm

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.

Slavisha84
 
Posts: 24
Joined: Sat Jan 31, 2015 4:18 am

Re: sample sketch "adafruit_io_sensors" wont work

by Slavisha84 on Sat Dec 19, 2015 6:18 pm

adafruit2 wrote:oh we dont use pubsub anymore - adafruit_mqtt is much better to use!
https://github.com/adafruit/Adafruit_MQTT_Library


Are you guys planing to update the sketch for Dashboard project with DHT11 and light sensors work with this library?
I am unable to figure out how to resolve the error message we all have been getting.

Slavisha84
 
Posts: 24
Joined: Sat Jan 31, 2015 4:18 am

Please be positive and constructive with your questions and comments.