Hey, I am a big fan of Instructables. I have consistently used it for the past 3 years and now its time for me to write one myself. 

Here we go. This instructable is for those who want to make some inanimate object tweet automatically. Like say for example you are building a robot and you want the robot to tweet to you or to the world. This obviously means your robot needs to have access to the internet and should have a logic controller. This instructable is specifically about how to use an arduino (logic controller) with wifi shield (the stuff that connects to the internet) to tweet to the world.

Hope you will find it useful.

Step 1: Arduino - Whats It? (skip If You Know)

Arduino is the quickest way you can attach logic to your project. Say for example you want your light outside your room to switch on automatically when the sun goes down. How do you do it. You want some sort of sensor that detects sunlight. You also want your light that you want to turn on/off. Most importantly you want a controller where which can read data from sensor and appropriately command the light to turn on/off . Arduino is one such controller. In fact arduino is the most popular and easiest way to implement your controller. 

If you are new to arduino you might want to check out this instructable - https://www.instructables.com/id/Intro-to-Arduino/

If you want to get a feel for what are arduino used for and want to spark some ideas - check this out - https://www.instructables.com/technology/arduino/

Here the official arduino website- http://www.arduino.cc/         (you might be a little overwhelmed if you are a complete newbie with electronics. In which case you might want to check out the intro to arduino instructable first)

The picture shows two of the most popular arduinos
<p>Does anyone know if it is still possible to tweet from an Arduino with WiFi connectivity? All the solutions appear to be from 2012 or so and I read that the Twitter API no longer supports this capability. Any insights?</p>
<p>is anyone else getting a 404 on the URL request? </p>
<p>to specify, I'm receiving a 404 Error on the twitter code above: </p><p>connecting ...</p><p>HTTP/1.0 404 Not Found</p><p>Date: Fri, 16 May 2014 16:18:28 GMT</p><p>Server: Check Point SVN foundation</p><p>Content-Type: text/html</p><p>Connection: Close</p><p>Last-Modified: Mon, 14 Mar 2011 14:45:46 GMT</p><p>Content-Length: 204</p><p>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;</p><p>&lt;HTML&gt;</p><p>&lt;HEAD&gt;</p><p>&lt;TITLE&gt; 404 File Not Found &lt;/TITLE&gt;</p><p>&lt;/HEAD&gt;</p><p>&lt;BODY&gt;</p><p>The URL you requested could not be found on this server.</p><p>&lt;/BODY&gt;</p><p>&lt;/HTML&gt;</p><p>failed : code 404</p>
Is there anything more compact then arduino w wifi shield? if I was looking for a wifi capable device?
<p>There are many but what works for you will be totally dependant on your requirements</p>
<p>Have you ever faced Arduino stopped from tweeting? mine goes whole day but I guess it's ram will be full and stops tweeting!</p>
<p>Yeah sometimes its needs to be reset. Let me know if you figured out a way to do it otherwise. </p>
Hi , <br>If I want to tweet corresponding to a situation which means I need to tweet many times, what change should I make in above code?
Hi ... Googling I found the problem ...! <br> <br>Apparently with the latest versions of the IDE does not work well the library twitter. <br>Download the version 1.0.3 and everything is OK ..! <br> <br>http://arduino.cc/en/Main/Software <br> <br>(attached screenshot) <br>Greetings ...!
I can verify that it was the IDE version. Downloaded 1.0.3 and solved my problem on another project. Thanks for your notes stanleyatala! <br> <br>(arduino wifi shield connected but not tweeting)
Awesome !! :) <br> <br>Yeah I think I had some version issues as well when I did it.. Great to see that you got it to work. Great job! <br> <br>Alex <br>
Hi, <br>Thank you for your comprehensive description.I did what you mentioned. But the red LED on my wifi shield is on and yet I do not get the tweet! I would be grateful if you answer.
Hello, <br> <br>If the red LED is on, then you have an issue connecting to the wifi. Notice on the picture I marked red LED as an error. If your connection to the internet works you need the green LED to light up. <br> <br>This could be due to the following reason <br>- wifi protocol missmatch - there are 3 versions of there protocol - no authentication. WEP and WPA - the code for connecting to the wifi is different for these 3 protocol. Arduino example has example code for each of these 3. Make sure you get the right protocol. <br>- wifi authentication - make sure you got the wifi username and password right. <br> <br>Hope that helps.
Alex, thank you very much for your comments. <br>I'm going to be attentive to your new instructables ... (when you can). <br>Greetings.!
hello echoalex, I have an unrecognized problem: <br>(first; sorry by my english, I speak Spanish..) <br> <br>-My Twitter account has the app arduino Ok (http://arduino-tweet.appspot.com). <br>-I use your library. <br>-I change in the the sketch, &quot;Token&quot; by indicated Ok. <br>-I change ssid / pass by my wlan Ok. <br>-Compile and send the sketch to Arduino Uno + Wifi Ok. <br>-The shield is connected wifi Ok (ping). <br>-By the way, I opened my WLAN ports Modem. <br> <br>but I can not make it work ...! <br>I have the serial error: <br> <br>connecting ... <br>connection failed. <br> <br>(attached print) <br> <br>The app still works (authentication) Ok or The library is still in force?? <br>You have any advice for me?, Pls <br>
Hey Stanley, <br> <br>I have not used that library for about 6 months now. For the tweeting tree project I have created my own website backend instead of going through http://arduino-tweet.appspot.com. So I am not sure if that library is functional now. The reason I moved to my own backend is because arduino resets when processing large text operations. So now I am using arduino for just data logging on my site and from my site i send the tweet. so it looks as if the arduino/tree is tweeting. <br> <br>Back to your problem. Obviously twitter.post(buf) inside your if condition is the one that is giving you the problem. Check the twitter.h and twitter.cpp . It is possible that with the wifi shield under active development, the code could have been altered. Check it out. <br> <br>From my experience, if you can code a web page, then data dump your sensor data to your site and write your tweet logic on the site. If you can code php, I can send you my website code and new arduino code. I might write an instructable on that but that will take a while <br> <br>Hope that helps. Feel free to ask if need more clarifications. <br> <br>Alex <br>www.makeystreet.com <br>
Dude this is cool, i want to control motors over wifi can u guide me what to do?
Thanks man ... !! If you want to control the motors wirelessly you can use zigbee. But if you still want to use wifi to control, the hard way to do that is to write a webpage which has the instructions for the motor and using the arduino wifi shield to keep polling that webpage. <br> <br>You can program the webpage in any way you want. I hope that made sense. I would be glad to elaborate if necessary.
It would be great of you if you could eleaborate and expalin me coding how to do that, i'm a very begginer in arduino actually
hmmm .. There is a bunch of pieces to the puzzle. I will try my best to elaborate. <br> <br>What your wifi shield does is that it connects to the internet and sends out a regular http request- which means that you can check google, facebook, twitter or any website. It is capable of loading the source files from the server. <br> <br> <br>So now imaging you have your own website and the arduino wifi shield connects to your website. So theoretically your arduino can now see what is on your website. Now imagine your website to be a big blank page with only one character in it. So now your arduino is able to read this one character. <br> <br>Now let's say, that in your arduino logic, the letter - 'a' means motor rotate clockwise , 'b' as stop and 'c' as counter clockwise. If you can somehow change the content of your site, now you can remotely control your motor. This will require some amount of web development skills. <br> <br>Having said all this - you dont have to build a website. There are opensource codes that connects to your twitter account and reads your tweets. eg - https://www.instructables.com/id/Tweeting-WiFi-Radio-Control-Panel/ . There are many more. Now you can write the character in your tweets and control the motor. <br> <br>I hope this was useful ! All the best with your project. I would love to see what you make!
cool, I'd love to get one of these wifi shields!
You should :)

About This Instructable




Bio: Find my maker profile on alpha.makeystreet.com/maker/alex/
More by echoalex:Getting to know Raspberry Pi Tangle - prevent your earphones from getting tangled - ever!! How to tweet from an Arduino using the wifi sheild 
Add instructable to: