I first started with the example sketch in the Arduino IDE, but i fell down when i discovered that the example code only supports one sensor, and I wanted two (indoor and outdoor temp sensors). Here's what i did to get two sensors running:
- Connected two thermistors using 10k pad resistors to my Arduino pins A0 and A1 as per the example.
- I created an account with cosm and had it generate me an api key etc. Despite looking quite lovely, that site seems a little unintuitive, but stick with it; it will make sense after awhile.
- Create a new Arduino device/feed and copy the example sketch it provides you. Note your API key and FEEDID.
- Create a new sketch in the Arduino IDE but instead of using their example (which will work fine for one sensor) use the sketch below.
- Substitute in your API key and FEEDID.
- Change IPAddress ip(10,0,1,20); to suit you network. You can use dhcp by simply following the layout from the example CosmClient sketch in the IDE.
- Finally change the name of your sensors from Inside, Outside, to something sane for you.
- Compile the code, upload to the Arduino etc and you should be good to go.