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.
Locked
User avatar
argyll
 
Posts: 8
Joined: Tue Jun 28, 2011 1:20 pm

sample sketch "adafruit_io_sensors" wont work

Post by argyll »

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.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: sample sketch "adafruit_io_sensors" wont work

Post by adafruit2 »

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

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

Re: sample sketch "adafruit_io_sensors" wont work

Post by argyll »

thank you I'll fix the sketch

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

Re: sample sketch "adafruit_io_sensors" wont work

Post by Slavisha84 »

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?

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

Re: sample sketch "adafruit_io_sensors" wont work

Post by aforaste1 »

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.

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

Re: sample sketch "adafruit_io_sensors" wont work

Post by Slavisha84 »

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.

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

Re: sample sketch "adafruit_io_sensors" wont work

Post by aforaste1 »

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.

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

Re: sample sketch "adafruit_io_sensors" wont work

Post by Slavisha84 »

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.

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

Re: sample sketch "adafruit_io_sensors" wont work

Post by Slavisha84 »

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.

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”