Introduction: LinkIt One Tutorial #13 - Send a Tweet
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.
Step 1: Materials Required
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
Step 2: Send a Tweet
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?
Step 3: Where Next?
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.