Xbox Live Traffic Lights
The best time to play Xbox Live is when all your friends are online, but whats the best way of checking, you could turn on the Xbox, log on to the website or use the iPhone app, but this requires effort and you can still miss when your friends come online.
So I came up with the Xbox traffic lights, now at a glance you can see when the best time to play Xbox. An Arduino with Ethernet shield checks every five minuets to see if anyone is online.
The biggest problem I had was getting the user data off Xbox Live, as it is a frustratingly closed system, but eventually I found a usable api from xboxleaders.com, the only problem is that it only has public information, so it wont work with your friends that have hidden online status. ( Hidden status will always show a “1” in the api call, giving you a false green light).
The Arduino then loads the API for each player, then using the text finder library it finds the online status( a “1” or “0”), if the player is online it incenses the online status variable by one. At the end of the loop the Arduino will turn on one of the lights using that veriable: Zero players online = RED light, One player online = ORANGE light, Green = two or more players online = GREEN light. obviously this can be changed to suit.
Once it was all working on my EtherTen I build a more permanent solution using WIZnet W5100, it has the same chip as the official Ethernet shield but ½ the cost. So I don’t fell so bad putting it in permanent projects.
Download code: here
I wanted to use my Kinect sensor as a input for my Arduino for some up coming projects, I think its one of the best sensors out there, its a pity there isn't a Arduino Shield available for Kinect. So for now I have to use my computer, however I could not find easy/good ways of doing it. I wanted something very simple and Arduino user friendly
and no windows involved. After much searching and frustration I came across the simplest way for the Arduino and Kinect to be friends.
Kinect output of X,Y and Z left and right hands displaying on 20x4 Arduino powered LCD.
Using Processing, OpenKinect, and this tutorial and library it was very easy for a Arduino novice. The Arduino IDE is based off Processing, so it’s very easy to go from one to the other. Geting Processing and the Arduino to talk was easier than expected using this tutorial and a line of code in Processing like this:
myPort.write(“/¼/”+ handX +“/”);
With similar lines on the Arduino end:
int X= serialdata;
Now that the Arduino has the X, Y and Z values you can control any real world elements, such as a your lights, or a servo etc. You can even get Processing to calculate the angle between your hands, so when your turn your hands (like when driving a car) it will send a 0-360º value to the Arduino for added control.