My final project for the Arduno microcontroller class is this 3D room mapping thing. It still needs some work but here’s basically what it looks like. An ultrasonic distance sensor is mounted on a servo (which is mounted on another servo), and records the distance of objects located at various angles. Two angles and a distance from the center make up a spherical coordinate system, and those coordinates can be plotted.
I found this thing about making an IRC bot in Python, and thought: since I know how to send serial information from Python using pySerial and how to receive serial information on the Arduino as well as knowing how to output text on a GLCD, why not make an Arduino program that shows IRC text on a GLCD?
Basically, the IRC bot connects to a server and channel you choose, and it just stays in there, sending serial information to the Arduino. Using the GLCD library 3 beta, the Arduino simply prints each character received to a text area and checks for newlines.
The IRC bot isn’t that great (probably still needs a lot of work) but it gets the job done.
The source code for Running Marisa can be found here.
Included with the Arduino GLCD library is a Processing program by Michael Margolis that converts an image into a header file that you can include in your Arduino sketch to display bitmaps using GLCD.DrawBitmap(). It’s pretty convenient, but what if I wanted to include lots of bitmaps, to be used as frames of an animation? I’d have to generate the header files one by one and include all of them, then define some arrays to point to the different frames.
I decided to modify the program to accept a folder as an input, and the output would be a single file containing the headers for all of the files in the array. In addition, at the very end of the file, a pointer array is declared, with each entry in the array pointing to the address of each image. The length of the array is also stored as a variable.
You can download the Processing file and java applet here.
I came home this weekend and my dad made an electronics work desk out of a door. It’s pretty much awesome.
I made a program for @bitmapchaos that takes an image and creates two mirrored image files (images are mirrored across the horizontal center of the original image) in the same folder. You can download a java app here, and the Processing source code is in the full post.
One of our microcontrollers assignments was to use a digital potentiometer as a digital to analog converter. We were given a file with thousands of numerical values, and had to use a digital potentiometer to convert the values to an analog voltage, and using an audio connector and headphones/speakers, had to identify the song. In addition, a potentiometer is used to change the playback speed.
Sorry about the fact that the audio is kinda low.