Having a look into using Twitter again to work with the Arduino in sending HTTP requests from a hashtag.
Lucky i found something that might help me achieve what I am looking for and it’s called TweetControl by TeamSpeak. Now this works by setting up a hashtag to execute a HTTP request, this request will then
So using thingHTTP you set up the HTTP request which allows you to set what type of request it is, the URL, Username, Password, Headers, Body and Parse string.
The other half or Tweet Controller is a simple set up which allows you to set who can tweet (a user or everyone), the hashtag being used as the trigger and the HTTP request that it set’s off.
I did however manage to get the Arduino to Post a tweet on my twitter feed. Done by using a post request to the twitter api and as long as you get a twitter token, the tweet is accepted.
#include <SPI.h> // needed in Arduino 0019 or later
#include <WiFi.h>
#include <Twitter.h>
char ssid[] = “username”;
char pass[] = “password”;
// Your Token to Tweet (get it from http://arduino-tweet.appspot.com/)
Twitter twitter(“token here”);
// Message to post
char msg[] = “Automatic tweet!”;
void setup()
{
delay(1000);
WiFi.begin(ssid, pass);
// or you can use DHCP for automatic IP address configuration.
// WiFi.begin(mac);
delay(10000);
Serial.begin(9600);
Serial.println(“connecting …”);
if (twitter.post(msg)) {
// Specify &Serial to output received response to Serial.
// If no output is required, you can just omit the argument, e.g.
// int status = twitter.wait();
int status = twitter.wait(&Serial);
if (status == 200) {
Serial.println(“OK.”);
} else {
Serial.print(“failed : code “);
Serial.println(status);
}
} else {
Serial.println(“connection failed.”);
}
}
void loop()
{
}
To see if we can make the washing machine even more interesting I am looking to implement a way to have twitter effect the flavour of milkshake you make.
To start off simple I have been looking at the simple WifiTwitterClient script but as of yet am unable to get it working as it will not connect.
Just another WordPress site