Data to android app with CC3000?

Hello everyone,

I am currently working on creating a dual probe temperature display using my Leonardo and CC3000 that will send the temperature data to a web service and then I can view the data plotted on a chart via some type of android based app. I have looked into ThingSpeak as they seem to cover all of this along with their ThingView app however connectivity using the CC3000 appears to be quite advanced and over my head. I have also looked into using Adafruit IO and was able to connect using the examples but I don't know of a app that goes with it that will plot the data.

Are there any other free services that anyone can recommend?

Thanks in advance!

I assume you already found Using the CC3000 | Adafruit CC3000 WiFi | Adafruit Learning System which shows how to connect and configure CC3000?

There is also an official thingspeak library for arduino http://community.thingspeak.com/2015/10/official-thingspeak-library-for-arduino-and-particle/

But once you have internet connectivity all you need is http:// requests to update thingspeak or other similar services.

Freeboard.io is a nice-looking visualisation site thats not so hard to hook up to various data sources.

Yes I have gone through the CC3000 library and I am able to connect to my home network with it. I have also gone through the ThingSpeak library and I am completely lost at how to send the data to ThingSpeak. It does a good job of showing how to send the data using a wired connection though. I must add that the only programming experience i have is from playing with my arduino and going through the tutorials that came with my starter kit.

I do not see an issue with my objective. Yes I could go Bluetooth but then I loose what I am most interested in when I am too far away for a Bluetooth connection. I want to be able to view my data at any time from anywhere as well as let others see my data. ThingSpeak does have an app called ThingView that does exactly that.

I had posted the question for help in another section of the forum and it was said that to post to ThingSpeak with the CC3000 takes extensive programming knowledge which I know I do not have. That is why I am looking for an alternative to ThingSpeak.

Here is a link to my other post.

https://forum.arduino.cc/index.php?topic=372171.0

@Tremelo- I would think that if you can connect your arduino + CC3000 to your home network you are 75% of the way there.

How did you verify that you were connected? Was there an example where you fetched a website? If you are using the Adafruit library does this one work? Adafruit_CC3000_Library/WebClient.ino at master · adafruit/Adafruit_CC3000_Library · GitHub

If you can get an example like that working its not that much harder to update ThingSpeak. All you need is to change the definition of WEBSITE to "http://api.thingspeak.com/update" and the WEBPAGE to something like "/api_key=XXXXXXXXXXXXXXXX&field1=73"

You need to replace all the XXX's with the thingspeak API key generated when you created the channel on the Thingspeak website.

The above will only update with a fixed value (73) - then you need to update your code to include the variables you read from your temperature sensors. If you get stuck at this point post the code that does work (make sure to use the </> tags) and people can help you more.

Tip: updating thingspeak is just like accessing a web page so you can enter the website and webpage into the URL bar of your browser to make sure Thingspeak accepts it.

Another tip- Thingspeak only allows updates every 15 seconds so any more often than that will fail.

So I am able to connect to my home network and ping sites with the CC3000 examples with no problems. I did as you suggested and tried using the WebClient example and made changes to the WEBSITE and WEBPAGE adding my API write key from ThingSpeak. Serial monitor shows connection to the ThingSpeak site but that is where it hangs up and does not update my channel. I have seen 2 different examples of posting to ThingSpeak. One is the way that you recommended and another shows that you have to declare the channel number as well to get it to work. I have not been successful at either methods. I will see if I can find the example that shows you have to specify the channel number.

I have entered http://api.thingspeak.com/update?key=XXXXX&field1=1.23 into my browser and the field does get updates so the channel is correctly working on ThinkSpeaks end.

It seems that thingspeak isnt happy with the format of your request somehow- a pity that thingspeak doesnt have a debug console to allow you to see incoming requests. Are you able to read back any response from thingspeak?

One option is to redirect your request to http://requestb.in/ (you need to create a new bin so you end up with a URL like http://requestb.in/1f6jgi21?key=XXXXX&field1=1.23) and see if it differs from the same thing submitted from your browser.

AFAIK you only need the api_key- the channel is tied to that key.

I actually was able to get it to work! Now i just have to figure out how to get it to post my thermocouple data rather then a given value. Probably easy for most but like i said i have almost no programming experiance.

Thanks for the help!