0

Particle Photon Support
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Particle Photon Support

by willy332 on Tue Oct 20, 2015 6:39 pm

I'm a newbie and this is probably an obvious question, but can you get Adafruit IO to work with a Particle photon, and how? Thank You for any replies.

willy332
 
Posts: 2
Joined: Sat Aug 15, 2015 11:04 am

Re: Particle Photon Support

by dwfick on Mon Oct 26, 2015 8:38 pm

For the REST API, I recently got this working using the library example files "Adafruit_IO_Arduino.cpp", "Adafruit_IO_Arduino.h", "Adafruit_IO_Client.cpp", and "Adafruit_IO_Client.h".
In the include files replace
#include "Arduino.h"
..with
#include "application.h"
..and replace the references to the "Client" class with the "TCPClient" class. And remove this:
#include "Client.h"

Declare the TCPClient in your application -
TCPClient client;

Surprisingly, the TCPClient class supports the readBytesUntil() member function used in the Adafruit library, even though I can't find any documentation that it does..
-d

dwfick
 
Posts: 4
Joined: Tue Jan 10, 2012 2:51 pm

Re: Particle Photon Support

by willy332 on Tue Oct 27, 2015 7:24 am

Thanks so much! I will try this when I get back home!

willy332
 
Posts: 2
Joined: Sat Aug 15, 2015 11:04 am

Re: Particle Photon Support

by tkurtz on Wed Nov 18, 2015 6:35 pm

Hi, Did you get this working? I'd also like to use my Photon but would love to see actual code for the .ino, .cpp and .h files. Thank you!

tkurtz
 
Posts: 41
Joined: Mon Jan 26, 2015 6:47 pm

Please be positive and constructive with your questions and comments.