Tutorial.CosmClientString History

Hide minor edits - Show changes to output

September 08, 2012, at 10:01 PM by Scott Fitzgerald -
September 08, 2012, at 10:01 PM by Scott Fitzgerald -
Added line 1:
(:redirect PachubeClientString:)
May 24, 2012, at 11:14 PM by Tom Igoe -
Changed line 54 from:
(:include EthernetSeeAlsoIncludes :)
(:include EthernetSeeAlsoIncludes :)
May 24, 2012, at 11:09 PM by Tom Igoe -
Deleted line 0:
Changed line 48 from:
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/CosmClientString/cosmClientString.ino lang=arduino tabwidth=4:)
(:source https://raw.github.com/arduino/Arduino/master/libraries/Ethernet/examples/CosmClientString/CosmClientString.ino lang=arduino tabwidth=4:)
Deleted line 54:
May 14, 2012, at 10:25 PM by Tom Igoe -
Added lines 1-56:

''Examples > Ethernet Library''

!!!Cosm Client using Strings
This example shows you how to answer a HTTP request using an Ethernet shield. Specifically, it connects to [[(http://www.)cosm.com]], formerly Pachube.com, a free datalogging site. The example requires that you set up a cosm.com account, as well as a cosm feed (for more information on setting up an input feed, please [[http://community.cosm.com/using_the_website#inputs | click here]]). Your Ethernet shield will then connect to that feed and upload sensor data every 10 seconds.

Additionally, this example shows how to send sensor data as a string.

(:div class=BOM :)
!!!Hardware Required
* Arduino Ethernet Shield or Arduino Ethernet board
* Shield-compatible Arduino board
* Two analog sensors to attached to the Ethernet Shield

'''Software Required'''

*[[(http://www.)cosm.com |Cosm account]]
* [[http://community.cosm.com/using_the_website#inputs | cosm.com feed ]] that accepts one data item

(:div class=circuit :)

The Ethernet shield allows you to connect a WizNet Ethernet controller to the Arduino via the SPI bus. It uses pins 10, 11, 12, and 13 for the SPI connection to the WizNet. Later models of the Ethernet shield also have an SD Card on board. Digital pin 4 is used to control the slave select pin on the SD card.

The shield should be connected to a network with an ethernet cable. You will need to change the network settings in the program to correspond to your network.

%height=300px%[[Attach:PachubeClientString_bb.png | Attach:PachubeClientString_bb.png]]

[-image developed using [[http://www.fritzing.org |Fritzing]]. For more circuit examples, see the [[http://fritzing.org/projects/|Fritzing project page]] -]

'''''In the above image, your Arduino would be stacked below the Ethernet shield. Or you could use an Arduino Ethernet board.'''''


(:div class=circuit :)
%height=300px%[[Attach:PachubeClientString_sch.png | Attach:PachubeClientString_sch.png]]

'''''Pictured: One CDS photocells with a 10k ohm pull down resistor on analog pin 0.'''''


(:div class=code :)
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/CosmClientString/cosmClientString.ino lang=arduino tabwidth=4:)

!!!See Also:
* [[http://www.tigoe.net/pcomp/code/category/arduinowiring/873|Example project]] using cosm and the Ethernet shield (the code above is more recent, however)
(:include EthernetSeeAlsoIncludes :)