Check out my project, Etch-a-Sketch 3.0, on Engadget!
The project was also featured in Sony Wonder Labs in Mid Town – check out this NYT press release for the event.
Check out my project, Etch-a-Sketch 3.0, on Engadget!
The project was also featured in Sony Wonder Labs in Mid Town – check out this NYT press release for the event.
(better video coming soon…)
~ User Manual ~
Basics:
- To move the line horizontally, move the left knob of the etch-a-sketch device left or right.
- To move the line vertically, move the right knob of the etch-a-sketch device left or right.
Line Thickness:
- Press and hold the black button on the etch-a-sketch (top-left). While keeping button pressed, squeeze the force sensor until you reach desired line thickness. You can see changing thickness on the right side of the etch-a-sketch screen. Once thickness is chosen, release button and force sensor.
- To change thickness of existing line, press and release black button on etch-a-sketch device. This will drop thickness to zero. Then, press and hold black button and choose the new line thickness by pressing the force sensor. Once thickness is chosen, release button and force sensor.
Colors:
- The etch-a-sketch follows the RGB color model. You can choose from hundreds of different line colors for your drawing.
Additative primary colors:
- Press and hold red, green, or blue button on the etch-a-sketch device. While keeping button pressed, squeeze the force sensor until you reach desired hue. You can see changing hue on the right side of the etch-a-sketch screen. Once hue is chosen, release the button and force sensor.
- The harder you press the force sensor, the lighter the color hue will become. Zero intensity for each component gives the darkest color.
- You can easily switch from one color to another. For instance, press and hold the blue button and choose intersity of hue. Move the knobs to draw. To switch to a different additative primary color, press and release blue button. This will turn blue color off. Press and hold red or green button. Choose hue color. Once hue is chosen, release the button and force sensor.
Color Mixing
- A secondary color is formed by the sum of two primary colors of equal intensity: cyan is green+blue, magenta is red+blue, and yellow is red+green. To mix two or more additive colors together, press color button and choose hue. Then press another color button with which you wish to mix with.
Example: Press and hold blue button and press force sensor until you reach highest hue intensity. Release button and force sensor. Then, press and hold red button until you reach highest intensity. Release button and force sensor. The resulting color is magenta, which you will see in the color mixer on the right of the screen.
- The combination of all three colors, red, green, and blue makes white.
Restart
- To save your sketch and reset, press the white button on the etch-a-sketch device.
Things I learned while building an etch-a-sketch:
- Radio Shack wires absolutely suck. They break constantly, they crack off, snap off, whatever. Use them for very basic prototyping… a couple of wires, maybe. DO NOT use them for an entire final project with a shit load of wiring.
- Serial Communication sucks. Thanks to Tom Igoe, Gabriella Levine, and Heather Velez who all gave me good advice on how to fix communication between my Arduino and Processing. The more components I was adding to the board, the worse the communication between the two programs was. Eventually, Processing simply stopped running my sketch at all. After days of panic, I figured I had no choice but to start taking components off the board one by one. Thankfully, I emailed the list and got an easy solution (note to self, email list earlier rather than later). I was, and I quote Tom, “overuning an array… One possible place:
if (sensors.length > 0) {
Yet you are looking for 7 bytes. Try changing that to
if (sensors.length > 6)”.
- If you’re going to house your Arduino in a small box, you best solder your wires to the board…
Boy oh boy do I wish I thought of this sooner. Now every time something breaks, a wire comes loose, etc, it is an absolute nightmare to take my crazily-wired Arduino and board out of this stupid box.
- Speaking of boxes, using an old cardboard pastery box was probably not the best housing option for this device.
I wanted to laser-cut a box made of acrylic, but didn’t have time. I think I would like to with this project, eventually.
- SparksFun is your friend. Look at these badass knobs and buttons:
If you don’t believe me, ask Lola how fun they are:
When I met with Benedetta last week I told her I wanted to have 12 buttons on the board.. Ha. Thank god that didn’t happen because a. I can’t stand soldering, b. that would have been ridiculous to wire considering I didn’t solder anything to the board and c. maybe users really don’t like so many buttons, no matter how pretty they are? …
I now have a clean 5 buttons. 3 are responsible for changing the line color (red, green, blue), one responsible for changing line thickness, and one responsible for saving and resetting the sketch. I dropped the accelerometer idea because it was way too unstable.
In the beginning….
So I now have the basic functionality of an etch-a-sketch working. My next steps are housing the device (i.e. coming up with a clean design so users can easily play with the device) and working towards an “etch-a-sketch-on-steroids.”
Right now, I have the board with 2 potentiometers and two buttons:
Like the classic etch-a-sketch, there are two potentiometers – one that draws a line along the x axis, and one that draws along the y axis. My current concern with this is that the readings from the potentiometer are a little jumpy, so if you’re ‘drawing’ with the pots on the Processing sketch, the lines are jumping up and down a little bit. I’ve looked at my sensor readings in the Arduino environment and they seem to be consistent (maybe they jump one unit up or down without me touching them, but not really). In Processing, however, it seems like they are slightly more jumpy without me touching anything. I am wondering whether this is because there is a problem with the serial communication between the Arduino and Processing. It is also possible that because I am using two different pots on my board which aren’t soldered on, maybe something is loose, which is causing the sensors to jump. I hope to have this figured out soon.
There are also two buttons on the board thus far. When users press one button, the line they are drawing changes to green. The other button changes the line to red. Pressing both buttons at the same time changes the line back to black.
I’m planning on adding several more buttons onto the device as well (this is the part that really gets at the ‘etch-a-sketch on steroids’ idea… maybe Steroid-a-sketch? name in progress..) Users will be able to ‘draw’ with different shapes if they choose to, and also ‘stamp’ on custom images onto their sketches. So, a user can press a button and make a design by drawing in circles along the x/y axis as opposed to just a straight line. Or, a user can press a button and ‘stamp’ on a face I’ve created in processing onto their sketch (see crappy example below). So far, in terms of the ‘custom’ images, I only have a face that gets stamped on if a button is pressed. You get the idea though.
One of my biggest successes today was getting the images of the knobs of the etch-a-sketch to rotate in the Processing sketch (see knobs in image above – I don’t feel like posting the actual processing sketch but trust me, they’re rotating). My next step with this is mapping the images of the knobs to the actual potentiometers. So, the idea is, when users physically twists the potentiometers on the device, the potentiometers in the sketch rotate as well and reflect that movement (instant feedback, baby). I have no idea how to map that rotation yet correctly, but hopefully I can get that figured out tomorrow.
Next steps:
- Mapping physical potentiometers to image of potentiometers
- Adding a ‘save sketch’ feature
- Adding an accelerometer (when you shake the device, the image resets,just like an etch-a-sketch. I am also considering adding a little box of sand inside the device so that users can hear the sand moving when they shake to reset – like in the original device… just for fun)
- Adding more buttons
- Adding more ‘custom stamps’
- Cleaning up some processing code
- Housing (parts are ordered, laser cutter on Thursday afternoon).
- Making the thing wireless (unlikely, don’t count on it)
I’ll probably post the entire code when I’m completely finished. For now, here’s the Processing code for the rotating knobs:
float rotIndex;
PImage etch;
PImage knobRight;
PImage knobLeft;
void setup(){
size(750, 607);
etch = loadImage("etch.png");
background(etch);
}
void draw(){
rightKnob();
leftKnob();
}
void rightKnob(){
rotIndex += 0.01;
pushMatrix();
translate(700, 550);
rotate(rotIndex);
imageMode(CENTER);
knobRight = loadImage("knob_right.png");
image(knobRight, 0,0);
popMatrix();
}
void leftKnob(){
rotIndex += 0.003;
pushMatrix();
translate(50, 550);
rotate(rotIndex);
imageMode(CENTER);
knobLeft = loadImage("knob_left.png");
image(knobLeft, 0,0);
popMatrix();
}
I’ve wanted to do this all semester and have been putting it off for weeks, so I’ve decided to make it into my final for both P-Comp and ICM… and I would like to make it badass.
Remember this toy?:
I’d like to build one from scratch. It would be a similar physical device as its famous predecessor, only with mine (pending name: Lis-a-Sketch), users would be able to draw within a Processing sketch on an external screen.
The device would be similar in shape and size as the original Etch-a-Sketch. It will have two main knobs users can turn to draw lineographic images along an x and y axis. In addition, the device will have features such as: reset your sketch, change stroke-weight, change shape (i.e. draw with circles instead of a contour line), change colors, etc.
Ideally, I want this product to be simple, clean, and intuitive. I’d like users to have the option of drawing in the classic manner of the etch-a-sketch (drawing a line without taking their hands off the “paper”), or, trying an array of additional options to play with in their sketch. So the Processing sketches created by users could be as simple as a points that go along on the x and y axis, to more complicated shapes and settings.
The physical device would feature several analog (or pseudo-analog) and digital inputs and outputs and would be housed in a clean cover similar to that of the original toy.
I think this is a good project for the final for both classes. Its base is simple, and yet over the course of 3 weeks there are several elements I could keep adding on to the device. It is also perfect because it builds upon so many concepts learned in both classes.
Ideally, I would like the device to be wireless… but no promises.
Both serial communications labs seemed pretty straight forward to me and I didn’t have any problems with either. For the first lab, I used CoolTerm to view incoming bytes from the Arduino to the serial monitor in different formats:
The media controller project and the second lab got me thinking about building an etch-a-sketch that draws images in Processing. I think I’m going to build it this week just for fun if I have time.
All it needs is two potentiometers, just like in an actual etch-a-sketch. An accelerometer could be added to it that could be mapped to Processing – when you shack the device, the Processing sketch would reset. Buttons could be added to change things in the sketch such as the stroke, the colors of the line, the shapes that are drawn (as opposed to a line), etc.
I only had one potentiometer, so I played around with the second lab by having a potentiometer, a force sensor, and a button. The pot. moved a point along the x axis, the force sensor moved it along the y aix. I put the background into the setup instead of the draw loop so that the point actually leaves a trace, as if you are drawing. Would really like to build this thing. Hope to give it a go soon.
For my Stupid Pet Trick, I decided I wanted to move a marionette with motors.
Here’s a bit of my process:
Testing to make sure I wired the big button correctly:
Testing motor on an innocent kitty:
And one more ‘cuz it’s kind of cute:
And the final product(ish):
One motor is controlled by a big button. The strings of the arms and legs of the marionette are attached to this motor, so when the motor moves back and forth, the arms and legs move. Another motor (to which the first motor is attached to, as well as a metal stick that holds the marionette together) is controlled by 2 small buttons (on the breadboard- they were too much of a pain in the ass to solder). Pressing one button moves the marionette slightly to the left, pressing the other moves it slightly to the right.
My biggest issue was with the top motor that controls movement left and right. I bought it at the NYU computer store and was told that it is exactly the same type of servo-motor that we have in our kits only it’s slightly bigger. This is not the case. The motor moves 360 degrees as opposed to 180… this makes a huge difference, as I do not want the marionette making a full rotation and getting wrapped around its own wires. However, techinically the motor is capable of turning in both directions (like the servo in the kit), so I knew that it could work.
The motor has a stopping point before it changes directions – that stopping point is around 89-90 degrees. It was interesting for me to discover that two identical motors are not actually identical. I bought two of these 360^ motors at the computer store – one had a stopping point at 89^, the other at 90^.
The entire code is below.
______________
#include
Servo servo1Motor; // creates an instance of the servo object to control a servo
Servo servo2Motor; // creates an instance of the servo object to control 2nd servo
int servo1Pin = 4; // Control pin for servo motor #1 (bottom motor on puppet) – arm/leg movement
int servo2Pin = 3; // Control pin for servo motor #2 (top motor on puppet) – l/r movement
int servoRange = 1; // variable to control stopping point of 2nd motor
void setup() {
Serial.begin(9600); // initialize serial communications
servo1Motor.attach(servo1Pin);
servo2Motor.attach(servo2Pin);
pinMode(8, INPUT); // set the button pin to be an input
pinMode(2, INPUT); // set the switch pin to be an input
pinMode(7, INPUT); // set the switch pin to be an input
}
void loop()
{
servo2Motor.write(89);
if (digitalRead(2) == HIGH && servoRange < 2) {
servoRange = servoRange + 1;
servo2Motor.write(84);
delay(250);
servo2Motor.write(89);
}
else {}
if (digitalRead(7) == HIGH && servoRange > 0) {
servoRange = servoRange – 1;
servo2Motor.write(96);
delay(250);
servo2Motor.write(89);
}
else {}
// if statement concerning big button being pressed, controlling first motor:
if (digitalRead(8) == HIGH) {
int servo1Angle = 0;
delay(450);
servo1Motor.write(servo1Angle);
servo1Angle = 70;
delay(400);
servo1Motor.write(servo1Angle);
}
else {
}
}
Part 1: Servo/Analog Out
In this lab, we controlled a servo motor’s position with an FSR. This came very useful later on for my Stupid Pet Trick. Here’s a video of the motor in motion:
After doing this, I wanted to try out the DC motor so I skipped ahead to the Transistor Lab in Week 8. I’m still a little uncomfortable with the concept of a transistor, but hopefully it will clear up in a few weeks when we get to it.
Here, I’m controlling the speed of the DC motor with a potentiometer:
Part 2: Tone output
In this lab, we had to generate a tone on the Arduino. I don’t know if it’s because of the 8olm speaker but it was super quiet.
The lab directions online said to use 2 photocells but I only had one, so I used a photocell and a regular resistor to create a voltage dividing circuit. It would be good to go over this concept again in class.
You can kind of hear the Arduino it producing a tone here when I cover and uncover the photocell with my finger:
And here, you can sort of hear the Arduino playing a little tune:
Part 1 – Multi-meter
Sorry – late lab due to stupid server. I did it several days ago I swear.
I had a 2 questions last week about the lab, but we answered all of them in class.
Q: What was the point of having a switch in the circuit when measuring the voltage of different components?
A: No point. Switches don’t really have resistance and do not consume power. Thus, the switch had no affect on amount of voltage of other components in the circuit (aside from letting the current go through, that is…)
Q: Components in parallel: How did the resistor have 3.13v going through it, while the 3 LEDs in parallel were getting 1.65 each?
A: The resistor was not in parallel with the LEDs, so it wasn’t ‘dividing up’ the voltage with them.
I found it interesting that all three of my LEDs did light up when they were in series with the following results:
LED1: 1.58v
LED2: 1.58v
LED3: 1.57v
Resistor: .17v
Weird that when we did it in class last week, they didn’t light up…
Part 2: Switches
For the second part of the lab (switches), I decided to make a stupid fishing game. I put a long wire through a fishing rod. I attached one end of the wire to the Arduino, and I taped a random metal hook I found lying around to the other end of the wire. I then taped an LED to one of those balls you attach to rods when you go fishing, and hooked the LED to the Arduino with a long wire:
The idea is to catch the ball with the fishing rod. When the hook of the rod catches the ball (via the leg of the LED), the LED lights up, like so:
So basically, by getting the LED hooked onto the, well, hook… you complete the circuit, and thus the LED lights up.
Here’s the full effect (me in gondola hat). The LED kinda blinks because the connection between hook and leg of LED isn’t that great:
So I thought long and hard about what kind of fantasy device I’d like to create. I came to the conclusion that it’s really very simple:
I’ve wanted one for a long time now. First of all, my family and friends are scattered all over the world (Moscow, Italy, San Diego, Boston, etc). Second, I travel a lot. And third and probably most important – I absolutely can’t stand planes.
The solution is quite simple: a no thrills-no-gimmicks teleportation device with a simple on and off switch. Turn the switch on, and the teleporter sucks you up and transfers you to your destination of choice without the hastle of a time-consuming journey. Sorry, extra baggage fees apply, and there’s a small chance that a part of you may get lost in space – it’s a bug in the system our engineers are currently working on.