LoL Shield RSS reader

I modified the scrolling text program some more, and was able to get it to display text based on received serial input. Then I wrote a Python script to get random entries from various RSS feeds (In the video above, the RSS feeds were the Twitter favorites of various people) and send them to a serial port (to be received by the Arduino). One issue was that sometimes the text was too long for the Arduino’s 128-byte serial buffer, so it would get cut off at the end. To resolve this, in the Python script, I split the text into multiple parts and had it wait for the Arduino to request the next part before sending it.

The Arduino code works on its own; you can use the serial monitor in the Arduino compiler to send text to it, but if it’s more than 128 characters, it’ll get cut off. Just remember to have it add a newline character to the end of your input. Also, removing the lines that say “Serial.write(GET_NEW);” and “Serial.write(GET_MORE);” would be a good idea, if you don’t plan on using an external program to provide the input.

(Edit: I’ve updated the code so that it doesn’t spam the serial monitor if you don’t input any text. Also the python code has many flaws and sometimes it crashes, whoops)

You can download the source code here.

LoL Shield

Got a green LoL shield using part of the $80 I won from SparkFun’s Free Day (The rest was used on an Ethernet shield, a solder vacuum, another touchscreen breakout board, and breakaway female headers).

Soldering it took forever (three hours) because I am terrible at soldering. In the end, things weren’t soldered so well so some of the LEDs weren’t lighting up (two of the columns didn’t light up because of a single badly-done solder joint), so I had to do a lot of checking. I also burned out one of the LEDs; thankfully they included 8 extra LEDs, probably for such things. The solder vacuum helped a lot more than I thought it would; it’s way better than the desoldering bulb I was using.

Continue reading “LoL Shield”

RGB LED Ustream party!

I’ve set up a thing where you can control the crossfading RGB ping pong ball via Ustream chat. Simply type “!rgb # # #” where # is an integer from 0 to 255 (for example, “!rgb 0 255 0” is green), and the LED will fade to that color. I’ll try to leave the stream up tonight so if you see this before I wake up tomorrow, hopefully it’ll still be there. It’s just a combination of the python IRC bot script and the RGB LED crossfading Arduino sketch from before. Ustream chat is basically just an IRC channel, so that’s why it works!

Update: Stream has ended! Thanks to everyone who participated!

Remote controlled crossfading ping pong ball

Now that fall semester is over and winter break has begun, I’m gonna start making more stuff! Building on to the color-crossfading ping pong ball, I decided to use the 38kHz infrared receiver module and keychain remote I bought awhile ago to make it remote-controlled. Each button on the remote corresponds to a color, except the power button which turns it off.

It’s a modified version of this RGB LED crossfader program combined with the sample code provided in the keychain remote item page.

Continue reading “Remote controlled crossfading ping pong ball”

Color-crossfading ping pong ball

So rather than studying for the exams I have next week, I decided to mess around with LEDs. I used this code with a diffused RGB LED (put a ping pong ball on top of it for more diffusion and it also looks cooler).

Edit: Found this online today, turns out someone else had the exact same idea of using a ping pong ball as a diffuser! There’s a more detailed write-up, with pretty diagrams and stuff, if anyone is interested in learning more.

I also tried doing this with an RGB LED but it just resulted in possibly seizure-inducing effects. It probably works better with three individual LEDs.

Tri-color LED

Bought one of these RGB LEDs from Adafruit; here’s a video of it in action. I didn’t save the Arduino sketch, but I simply declared the PWM out value for each pin as a random byte between 0 and 255 in the setup() function and just added 1 to each value every iteration of the loop() function (since they were declared as bytes, it wraps around after exceeding a value of 255).

DLD dice project

Starting off with the oldest thing I can find, here’s a video of a digital logic design project last semester. Using a shift register, 7-segment display (and driver), some LEDs a push-button and some NAND gates (I think it was NAND, I don’t remember exactly; might have been NOR gates), we had to simulate a dice roll. It’s pretty much just cycling through 1-6 in a non-linear order really quickly, so what you get depends on how long you hold the button down. It changes really fast so you can’t really time your presses to get the desired number (I mean, unless you have super fast reflexes).