Here is the completed room mapping final project! Since last time, I’ve added a very useful smoothing option that makes the plot look less like a bunch of random jagged edges and more like a recognizable shape. There’s also an option to choose different types of shapes to plot with, which makes for some pretty artsy-looking results. It is surprisingly fun to play around with the smoothing options, textures, and shape types, as you can see me doing in the video.
The Arduino/Processing source code can be found here, and if you just want to play around with the plotting program (I’ve included some sample files), you can download an exe file here. You’ll need the ControlP5 library if you want to modify/run the Processing code (not necessary for the exe).
Here’s a follow-up to the previous room mapping post. The scanning process is more efficient now, with less wasted movements (and thus faster scanning). Rather than going all the way back to the beginning of a column (for lack of a better term) and scanning down every time the end is reached, it just starts scanning from the bottom up.
The program has been improved too. Aside from the pretty menus (made using ControlP5) and graphical options such as color changing, I’ve added a function that checks the ratio between every side of every quadrilateral. If the ratio between any two sides exceeds a certain threshold (chosen by the user), the quadrilateral isn’t drawn. This makes it so that you don’t have a bunch of really long quadrilaterals connecting points that aren’t actually even connected in reality (see the old video for an example).
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.
Continue reading “3D room mapping with sonar”
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.
Made a cave-navigation game using a Spectra Symbol softpot
. The resistance of the softpot changes depending on where you press it, so you can do an Arduino analogRead() on the voltage output to determine where the circle goes on the screen. You have to make sure to add a resistor (I think I used a 100k resistor) going from the middle pin to ground (or power), or else the output floats.
Code available in the full post.
Continue reading “Arduino softpot potentiometer game”
One of the microcontrollers assignments we had was to create a program in Processing
that plotted the data from a sensor. In this video, it’s plotting data from a Maxbotix EZ1
This semester I’m taking a course about Arduino microcontrollers. One of the things included in the materials we got was a servo, and the first thing I did on the first day was looking up how servos worked. I didn’t know there was a servo library for the Arduino, so I ended up writing my own program to change the duration of the pulse sent to the servo based on some serial input (which I also had to look up, since we hadn’t learned it yet). I thought it was really neat and I ended up just playing around with it a lot.
Continue reading “Messing around with servos”