Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: Using Xbee Cellular Modem with ThingSpeak

Home Forums Mayfly Data Logger Using Xbee Cellular Modem with ThingSpeak Reply To: Using Xbee Cellular Modem with ThingSpeak

#15807
Rick Vogel
Participant

Any arduino code you would like to use. The key is to identify which serial port you have connected to the XBee. For instance if you have it connected to Serial1 then you would want to print out the statements you want sent to Thingspeak like so…

Topic posting to includes multiple fields

Serial1.println(#Pfield1=60&field2=45)

Topic posting to is field specific to field1:

Serial1.println(#P60)

The #P is the identifier the xbee python code is looking for to identify the data you want sent. the println() includes the \r\n characters that allow the python code to separate multiple post request coming in one after the other.