LinkIt One Tutorial #13 - Send a Tweet

by gregoryfenton in Circuits > Microcontrollers

619 Views, 4 Favorites, 0 Comments

LinkIt One Tutorial #13 - Send a Tweet

tweetPage.jpg
Serial monitor showing successful tweet.jpg

We can do some truly great things with the LinkIt One. So far the LinkIt One hasn't been able to tell the world.
All that is about to change with this tutorial.

We will get the LinkIt One to send a tweet via twitter.

Materials Required

linkIt One box.jpg

Linkit One board

Web server running PHP with the CURL and SSL mods enabled
I use a dedicated server. You could use something like a Raspberry Pi on the local network.

codebird-php installed on the server
A great install guide is at http://www.adamkonieska.com/archives/post-to-twitt... and is the one I followed.

A Twitter account for the board
http://twitter.com

Send a Tweet

Serial monitor showing successful tweet.jpg

To send a tweet we need a php file on the server. I have attached mine above as sendTweet.php.txt which needs renaming to sendTweet.php

We also need to program the LinkIt One with sendTweet.ino attached above.

Download sendTweet.php and sendTweet.ino and open it in a text editor. There are a few changes that need to be made in the name of security. We wouldn't want just anybody to be able to tweet through the LinkIt One's account, would we?

Where Next?

LDR_5mm.jpg
ds18b20 waterproof.jpg

Tweets are great for throwaway occurrences.

How about monitoring something with the LinkIt One and tweeting whenever the condition changes?
What if we went back to my earlier water temperature monitor and warned if the temperature changed by more than 3 degrees from ideal?

What if we monitor a coffee pot LED and tweet whenever the coffee is ready? All we would need is a light sensor (LDR) over the LED to know when the LED was lit and therefore the coffee is done. We could be the envy of the office, always knowing just when the pot is full and freshly brewed.