hi

October 25, 2010 by

test test test test

3rd edition w/tina

February 23, 2010 by

tina_fey_scar_face_canity_fair.jpg

by clare and emily and becky and aleena

H-Bridge lab

July 1, 2009 by

Photo 62

Transistor Lab

June 30, 2009 by

Photo 61The potentiometer controls the speed of the motor.

Serial Duplex Lab

June 9, 2009 by

DSC_0052

Sending data from 1 sensor

Using a potentiometer, the readings range from 0 to 1023 and it is helpful to see all of the ways to send data (BYTE, DEC…) in the serial monitor

Sending data from all 3 sensors

In the serial monitor, using the punctuation with delimeter characters, the reading from the pot is first, next is the force sensor, and last is the switch

Using processing

Processing displays the values from each sensor as well.

Serial Output Lab

June 5, 2009 by

DSC_0049

The electronics. portion of this lab was fairly easy to set up.

serial monitor

Here’s the reading from the serial monitor when the potentiometer is moved back and forth.  It goes through all the ascii code characters and back.

graph

Here’s the processing graph.  This is a fun way to look at the values coming from arduino.

Analog Output Lab

June 5, 2009 by

DSC_0045

DSC_0048

I used a force sensor; it seems to have a wide range so the servo spins a half turn when the sensor pressed and then back when it is released.  The same thing happens with the motor is connected to a pwm  pin with the second piece of code in the lab

Analog In with an Arduino Lab

May 28, 2009 by

Potentiometer

DSC_0039

The LED dims and brightens as you turn the knob on the potentiometer because it changes the voltage that is sent to the arduino.  The arduino then assigns a value to that voltage, displays it in the serial monitor, and then outputs the value as the amount of voltage it gives the LED.

Flex Sensor Test

DSC_0040

I put the flex sensor in place of the potentiometer and added a fixed resistor to create a voltage divider and kept the same code on the arduino.  As I bent the sensor, the LED brightness changed but only slightly.  I didn’t have a 10k ohm resistor so I tried various other ones.  The smaller resistors (such as 1K ohm) caused the LED to be dimmer and the numbers in the serial monitor varied between 7 and 10.  The larger resistors (100K ohm) made the LED brighter but the brightness changed very little when the sensor was bent.  The serial monitor showed numbers in the 700′s with this resistor.  The Jameco website says that this particular flex sensor has a nominal resistance of 10k and a max resistance of between 30k and 40k.  I think i need a resistor in that range to get more variation in the brightness of the LED.  I tested the same set up with a force sensor in place of the flex sensor and with the 1K resistor.  The variation in brightness of the LED increased dramatically when the force sensor was pressed.

Banana Squeeze

DSC_0041 DSC_0042

This device uses the same setup and arduino code as the previous test.  The force sensor is housed inside of the banana shaped pouch and the LED sticks out of the top.  The harder you squeeze the banana, the brighter the LED glows.  The banana squeeze has several flaws though.

1) You have to squeeze the banana in the right place in order to effect the force sensor.  Perhaps another version could have several sensors, or a stiff material inside that transfers the force of the squeezing to the sensor no mater where you squeeze the banana.
2) There are wires sticking out of it that lead to the arduino and bread board.  In an improved version, everything should be housed inside the banana.  But it would be unpleasant to have big chunky electronics stick into your  hand when you squeeze the banana.

Dream Device

May 25, 2009 by

These are a pair of goggles that detect and display people’s secret desire to dance.  When the wearer puts them on, the people who want to dance appear to glow in magenta.  The brighter they glow, the more they want to dance.  People who are already dancing appear to have a blue glow.

Perhaps there could be different versions or various settings that display other desires that people have but stifle (singing, yelling).  But I’m not sure that I would want to know all secret wishes and thoughts, just whether or not they want to dance.

dance_goggles

Digital Input and Output with an Arduino Lab

May 25, 2009 by

Arduino Input and Output

After setting up the breadboard and loading the code onto the arduino, the green LED lights up until the switch is pressed, then the green LED turns off and the red LED lights up.

DSC_0022
DSC_0023

Combination Lock (kind of)

This “lock” works with a small set of drawers, an arduino program, and an 2 LEDs.  In the locked position, the red LED is light up.  If the 2 top drawers are correctly positioned, the green LED lights up.  By pulling out the drawers, the correct amount, 2 wires touch completing a circuit (like a switch in the closed position).

DSC_0024

DSC_0025

// declare variables:

int topSwitch = 2;

int bottomSwitch = 3;

int redLED = 4;

int greenLED = 5;

int switchStateTop = 0;

int switchStateBottom = 0;

void setup() {

pinMode(topSwitch, INPUT);

pinMode(bottomSwitch, INPUT);

pinMode(redLED, OUTPUT);

pinMode(greenLED, OUTPUT);

}

void loop() {

switchStateTop = digitalRead(topSwitch);

switchStateBottom = digitalRead(bottomSwitch);

if ((switchStateTop == 1) && (switchStateBottom == 1)) { // if both switches are closed

digitalWrite(greenLED, HIGH);

digitalWrite(redLED, LOW);

}

else {

// if the switch is open:

digitalWrite(greenLED, LOW);

digitalWrite(redLED, HIGH);t

}

}

// declare variables:
int topSwitch = 2;
int bottomSwitch = 3;
int redLED = 4;
int greenLED = 5;
int switchStateTop = 0;
int switchStateBottom = 0;
void setup() {
pinMode(topSwitch, INPUT);
pinMode(bottomSwitch, INPUT);
pinMode(redLED, OUTPUT);
pinMode(greenLED, OUTPUT);
}
void loop() {
switchStateTop = digitalRead(topSwitch);
switchStateBottom = digitalRead(bottomSwitch);
if ((switchStateTop == 1) && (switchStateBottom == 1)) { // if both switches are closed
digitalWrite(greenLED, HIGH);
digitalWrite(redLED, LOW);
}
else {
// if the switch is open:
digitalWrite(greenLED, LOW);
digitalWrite(redLED, HIGH);t

Follow

Get every new post delivered to your Inbox.