Arduino chiptunes


A straight copy/paste implementation of Linus Akesson’s hardware chiptune project ported to Arduino by stimmer (reply #1 in this thread). I originally had it as just the speaker, but then I realized I could use the piezo buzzer I got in my digital logic design kit last year and never actually used. So I just added a DIP switch that allowed me to switch between them.

Advertisement

iPod Touch controlled Cubey


Now Cubey can be controlled using using TouchOSC on iPhone / iPod Touch (TouchOSC is also available on Android so this should probably work on that too).

Source code (Arduino and Processing source code, along with TouchOSC template) can be found here. It requires the oscP5 library for Processing, which can be found here.

Cubey Papercraft

So I designed this Kyubey papercraft this weekend, with the idea based on this image on @kevinchai’s twitpic. It’s Cubey because it’s a cube (well technically a rectangular prism).

Cut along the solid lines, fold along the dotted lines. The ears and the gold ring things are meant to be folded back on themselves so that they’re colored on both sides (I’m seeing a lot of people who don’t get this! It’s somewhat important!). See the images in the gallery if you’re confused. I didn’t add the tail to mine because I didn’t glue the back closed, but basically cut along the solid line on the tab on the back part of the main body and insert the tab from the tail. If you make one of these, post it here, I’d like to see it!

I also added electronics to it (I am terrible at soldering; you have permission to laugh at the pictures of the circuit)! One servo for rotation of the entire papercraft, another servo and a rubber band for moving the ears up and down, and two photocells (one on each side) to sense light. I have it so that Cubey will turn either toward or away from light depending on what I set in the program. I tried adding remote control, but my IR receiver kinda broke somehow. Here are some videos of the other stuff, though.

And more on the channel. Image gallery in the full post.

Continue reading “Cubey Papercraft”

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”

Image mirroring (improved)

Mirrored Miku

An improved version of that image mirroring program I made awhile back. This one allows you to select the line of symmetry, rather than always having it be at the center of the image. Left-clicking sets the line of symmetry. Right-clicking changes the location of the zoom-box and the left/right keys nudge the line of symmetry one pixel to the left or right, if you want more precision.

It gets kinda slow if you try using it on larger images, so smaller images will yield quicker results.

A java applet and Processing source code can be found here.

Technika-based Flash game

Spent the past few hours making this flash game based on DJ Max Technika. Specifically, the song “In My Heart“. It was originally just fanart, then I decided to make it interactive by having her look at your mouse cursor, then I wanted a thing that dynamically generated bubbles (I based it on the code found here), but then I thought it’d be cool if the bubbles were notes instead. Then I was all “Hey, let’s make them clickable!” and then after that “Might as well make it a game.”

Instructions can be found by clicking the button at the bottom. SWF can be found here, and embedded in the full post.

Edit: Updated to include a sound and an star-explosion effect upon a successful click, also the ability to press T to toggle outfits. The previous version can be found here.

Continue reading “Technika-based Flash game”

Arduino KS0108 touchscreen Marisa program

I edited the touchscreen Neko program to include Marisa sprites based on her sprites from “Patchcon: Defend the Library!”, except in monochrome. She can also be controlled by serial port if connected through USB: send a header byte of 255 to the Arduino, followed by the X and Y coordinates, and she will move there (assuming the previous command was a valid one). This allows her to also be controlled by, say, Ustream/IRC chat commands.

Source code and bitmaps can be found here.

Update: Had an interactive stream on Ustream where viewers could type “!mari” followed by two integers, and she would move to the coordinate (unless it’s too large or small, then she moves to wherever she can). Here‘s a recording of the stream; cooler stuff happens at about 13 mins onward (fire and snow effects). It doesn’t record the chat messages though, but they were definitely there.

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!