So, this is a belated final project entry. But I thought it would be good to record my post posthumously for this project. First description of the intent of the project:
Project: Add # 17 to the Bird series that Brancusi's Bird (I like the brass ones the best)
Remaking Brancusi's bird came to mind for a couple of reasons.
1. Rory suggested that we really consider how the final product is packed for a physical computing piece. I think Brancusi is really excellent at packaging complex ideas into very highly simplified forms of 3-d presentation, so I thought I could learn quite a bit by carefully considering his forms and how they might be translated for physical computing pieces.
Bad pic. But I love his sculptures.
Is brancusi the godfather of the ipod? Hmm. That idea makes me feel a little sad for some reason, though I don't know why
2. Once I thought of Brancusi and I started considering the Bird series, it seemed like a "cover" of his bird in physical computing materials actually had some relevance. When he made the bird excelerated travel was a huge metaphor for people at the turn of the century--with travel in many ways becoming a metaphor for being able to reach outside of our physical existence. Much like what information technology is for people today. I see us projecting ourselves onto technology and allowing technology to be projected onto us, for much the same reasons as people were excited about airplanes and trains, and such. Its an opportunity to have our individual selfs be larger than our immediate experiences; for its potentiality, and of course utility. And I like that. But I also think Brancusi’s bird recognizes that no matter how high we fly we are tied to earth. And of course even thought we have wireless and handhelds we must all come back to ground; ultimately its an electric pulse, it’s a 1 or a 0. And ultimately we are always these physical beings, even as we also have these alter selfs— projected in whatever different ways we have now made possible with IT.
So, how would I remake this bird?
The intent? Multiple LCDs placed in upward movement around a cylinder shape. The LCDs would be triggered on and off based on someone's (or multiple people's) movement around the object. The images would be live feeds from webcams built into the piece.
The reality:
Ahhh. So much went wrong.
And, what did it end up being: Just a simple projection from my laptop's webcam captured through Max/MSP and triggered by a serial feed from a motion detector controlled by the arduino. But this so simply setup was so time consuming.
So, I think the value in blogging about this what turned-out to be a very low-tech physical computing project posthumously is the lessons learned:
Lessons Learned
1. There are no cheap mini LCDs that support full video
While I wanted to have many, many LCDs all the way up a tall, thin cylindrical frame, I didn't want to pay for all of these. So, I decided that I would use at least 3 lcd to create a proof-of-concept motion trigger effect I wanted and stop at that. However, I did not find any cheap LCD screens that support full video/color graphics. The PS1 LCD it turns out is in high demand and is going for about $65-75 used. Maybe if I had had more time, I think it might have been possible to get them a bit cheaper.
2.The Coby media picture frames (and other media frames) that support media and are under $50 also do not support live video. You must have recorded video loaded onto these things (though it does appear that some of the frames over $100 will support live data from a computer). Also don't tear apart a Coby media picture frame. Its electronic connections are pretty delicate but tearing apart the frame takes some force. I tore one apart and it quit working. Maybe if you saw it apart instead??? I think now that I know where the connection is I might be able to saw the cover apart if I was very, very careful. But, you might be sensing a trend. I was too cheap to try and saw apart another one and ruin it.
3.The Max/MSP serial object does not reliably read serial data sent to the buffer from the Arduino.
I saw a few people posting about this issue, after spending two days trying to get Max to read the data being sent from a motion detector. I did get it to work if 1) there was a line break and a common included between each input and I had a delay(100); 2) I had Max shut down and started up the Arduino program ---but did not turn on the serial monitor, 3) I physically restarted the board before starting Max and have a patch read the serial data being sent. Also the Max program wouldn't always read it even if I went through this elaborate ritual. And it generally only starting working after 30-60 seconds of starting the patch. I installed several of the libraries that have been created to help support this, and none of them reliably worked for me.
I wasted so much time on this issue--and since I really didn't know enough to take a differnet technology angle for getting a live web cam feed projected to have the on/off controlled how I wanted I doggedly stuck with Max to control the video. For example, how would I hack logitech's cam software so I could pause a feed??? Also, I couldn't get the cam to have a full screen view in software supporting the cams; and for some reason that escapes me now, that seemed really important.
4. Quicktime might be based on MPEG-4 but MPEG 4 compression is not necessarily supported through Quicktime.
I found two cams that had several Apple compressions choices, and a MPEG-4 choice. I don't know why, but I thought these would work with MAX/MSP/Jitter which uses Quicktime for the live feeds. It doesn't. Quicktime ain't MPEG. So obvious now.
5. Don't be cheap and think you will do full graphic LCDs
Paying approx. $100 x 3 for mini LCDs just seemed like too much money to spend on my first real physical computing project. But, biggest lesson here is don't do LCDs if you are cheap. There was no cheap solution and I wasted alot of time being cheap.
6. Don't doggedly stick with your original intent if you have less than 3 weeks.
And I am pretty sure this was the best lesson I learned. For reasons that completely seem unnecessary now, I felt I had to have live video no matter what. Anyway, I do think this was actually a great lesson. I will scope better, and research up front better, and really think about what is feasible within timeframes, and assess better as a I go along. So, maybe it was good--even if it was depressing to have such a lame outcome.
Wednesday, July 1, 2009
Servo Motor Control Lab
Have completed the servo motor lab.
Got the servo motor to turn, once I mapped it to the pressure sensor's readings, which only had a range between 0 and approx. 50 for me. So really much lower than the pot reads.
Basically get the same effect in the Servo library. Just mapped it to between 0 and 50, and then if I hit the pressure sensor it do a little wiggle.
Got the servo motor to turn, once I mapped it to the pressure sensor's readings, which only had a range between 0 and approx. 50 for me. So really much lower than the pot reads.
Basically get the same effect in the Servo library. Just mapped it to between 0 and 50, and then if I hit the pressure sensor it do a little wiggle.
Wednesday, May 27, 2009
Analog In Lab
I read about a study that was recently conducted that confirmed that women's sexuality is hard to figure out because it has an inherent dichotomy to it. Women want to feel pressure and a sense of overpowering from a man, as it demonstrates interest and sexual prowess. However, women also want to feel a sense of sensitivity because it demonstrates an ability to mate and bond.
So my love machine will attempt to measure the balance between force and sensitivity as way to get a more yin yang measure of sexuality to find a more accurate measure of their sexual prowess.
So, for the coding, I have decided to take Rory's advice and start with a code outline, so I don't get overwhelmed with the particulars. So here is my outline for my love machine:
1. Capture input from the flex sensor
2. Capture input from the pressure sensor
3. Map input from flex sensor within a range of 1-10
4. Map input from pressure sensor within a range of 1-10
5. Add pressure sensor range to flex sensor range
6. Add a value to each LED
6. Light up LEDs based on pressure sensor range + flex sensor range
Hmmm. Ok. This seems too easy. So, of course I have more work to do. But I will jump to the arduino to code now.
----
Well. It appears that my arduino needs some work. I cannot get code to upload. It appears that I needs to boot-something up to my arduino. And of course I need some special device to do so, which I don't have and don't have the time to get today.
--
OK. Got my arduino board to upload a sketch, after Rory was kind enough to set my board to ATMEGA 328 since that was my chip, even though my board was the Duemilanove. That seems to have been the issue.
Uploaded the blinking LED sketch and all was good
--
Decided to rewire my potentiometer since I had put red wire on the ground the 1st time around. This time it is in the right order.
Potentiometer lab went fine. Lights up the LED. THough the range of input from the pontentiometer seemed pretty flat. It was mostly all over 1000.
---
Here is the code for my love machine:
int input1 = analogRead(2); //declare a variable for the flex sensor input
int input2 = analogRead(3); //declare a variable for pressure sensor input
int yenscore; //declare variable to store the yenscore, which is mapping of flex input
int yangscore; //declare variable to store the yangscore, which is mapping of pressure input
int yinyanglove;
void setup()
{
Serial.begin(9600);
pinMode(2, OUTPUT); // declare the digital pin 2 as an output
pinMode(3, OUTPUT); // declare the digital pin 3 as an output
pinMode(4, OUTPUT); // declare the digital pin 3 as an output
pinMode(5, OUTPUT); // declare the digital pin 3 as an output
pinMode(6, OUTPUT); // declare the digital pin 3 as an output
pinMode(7, OUTPUT); // declare the digital pin 3 as an output
pinMode(8, OUTPUT); // declare the digital pin 3 as an output
pinMode(9, OUTPUT); // declare the digital pin 3 as an output
pinMode(10, OUTPUT); // declare the digital pin 3 as an output
pinMode(11, OUTPUT); // declare the digital pin 3 as an output
}
void loop()
{
//this code makes sure every pin that is linking to the LEDs are off
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
//take analog input from the flex sensor and
//convert to a score between 1 and 10
if( input1 >=1 && input1 < yenscore=" 1;">=103 && input1 < yenscore="2;">=204 && input1 < yenscore="3;">=305 && input1 < yenscore="4;">=408 && input1 < yenscore="5;">=511 && input1 < yenscore="6;">=614 && input1 < yenscore="7;">=717 && input1 < yenscore="8;">=820 && input1 < yenscore="9;">=923 && input1 < yenscore="10;" input1 ="0)" yenscore="0;">=1 && input1 < yangscore=" 10;">=103 && input1 < yangscore="9;">=204 && input1 < yangscore="8;">=305 && input1 < yangscore="7;">=408 && input1 < yangscore="6;">=511 && input1 < yangscore="5;">=614 && input1 < yangscore="4;">=717 && input1 < yangscore="3;">=820 && input1 < yangscore="2;">=923 && input1 < 1023)
{
yangscore=1;
}
else if(input2 =0)
{
yangscore=0;
}
yinyanglove= yenscore + yangscore;
//this code turns on and off a certain number of LEDs based on your yin+yang score
if (yinyanglove=1 || 2)
{
digitalWrite (2, HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
delay(1000); // wait 1 second
digitalWrite (2, HIGH);
}
else if (yinyanglove=3 || 4)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
}
else if (yinyanglove=5 || 6)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
}
else if (yinyanglove=7 || 8)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
}
else if (yinyanglove=9 || 10)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
}
else if (yinyanglove=11 || 12)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
}
else if (yinyanglove=13 || 14)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
}
else if (yinyanglove=15 || 16)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
}
else if (yinyanglove=17 || 18)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
}
else if (yinyanglove=19 || 20)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
digitalWrite(11,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
digitalWrite(11,HIGH);
delay(1000); // wait 1 second
}
delay(7000); // wait 7 second before restarting loop
}
--
Here is my love machine:
The ball is a boob feeling blob, with a flex sensor on one side and a pressure sensor on the other. So a person must at the same time do a very light touch one side and pressure on the other side to achieve a combined yin yang lov-o-meter score.
So my love machine will attempt to measure the balance between force and sensitivity as way to get a more yin yang measure of sexuality to find a more accurate measure of their sexual prowess.
So, for the coding, I have decided to take Rory's advice and start with a code outline, so I don't get overwhelmed with the particulars. So here is my outline for my love machine:
1. Capture input from the flex sensor
2. Capture input from the pressure sensor
3. Map input from flex sensor within a range of 1-10
4. Map input from pressure sensor within a range of 1-10
5. Add pressure sensor range to flex sensor range
6. Add a value to each LED
6. Light up LEDs based on pressure sensor range + flex sensor range
Hmmm. Ok. This seems too easy. So, of course I have more work to do. But I will jump to the arduino to code now.
----
Well. It appears that my arduino needs some work. I cannot get code to upload. It appears that I needs to boot-something up to my arduino. And of course I need some special device to do so, which I don't have and don't have the time to get today.
--
OK. Got my arduino board to upload a sketch, after Rory was kind enough to set my board to ATMEGA 328 since that was my chip, even though my board was the Duemilanove. That seems to have been the issue.
Uploaded the blinking LED sketch and all was good
--
Decided to rewire my potentiometer since I had put red wire on the ground the 1st time around. This time it is in the right order.
Potentiometer lab went fine. Lights up the LED. THough the range of input from the pontentiometer seemed pretty flat. It was mostly all over 1000.
---
Here is the code for my love machine:
int input1 = analogRead(2); //declare a variable for the flex sensor input
int input2 = analogRead(3); //declare a variable for pressure sensor input
int yenscore; //declare variable to store the yenscore, which is mapping of flex input
int yangscore; //declare variable to store the yangscore, which is mapping of pressure input
int yinyanglove;
void setup()
{
Serial.begin(9600);
pinMode(2, OUTPUT); // declare the digital pin 2 as an output
pinMode(3, OUTPUT); // declare the digital pin 3 as an output
pinMode(4, OUTPUT); // declare the digital pin 3 as an output
pinMode(5, OUTPUT); // declare the digital pin 3 as an output
pinMode(6, OUTPUT); // declare the digital pin 3 as an output
pinMode(7, OUTPUT); // declare the digital pin 3 as an output
pinMode(8, OUTPUT); // declare the digital pin 3 as an output
pinMode(9, OUTPUT); // declare the digital pin 3 as an output
pinMode(10, OUTPUT); // declare the digital pin 3 as an output
pinMode(11, OUTPUT); // declare the digital pin 3 as an output
}
void loop()
{
//this code makes sure every pin that is linking to the LEDs are off
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
//take analog input from the flex sensor and
//convert to a score between 1 and 10
if( input1 >=1 && input1 < yenscore=" 1;">=103 && input1 < yenscore="2;">=204 && input1 < yenscore="3;">=305 && input1 < yenscore="4;">=408 && input1 < yenscore="5;">=511 && input1 < yenscore="6;">=614 && input1 < yenscore="7;">=717 && input1 < yenscore="8;">=820 && input1 < yenscore="9;">=923 && input1 < yenscore="10;" input1 ="0)" yenscore="0;">=1 && input1 < yangscore=" 10;">=103 && input1 < yangscore="9;">=204 && input1 < yangscore="8;">=305 && input1 < yangscore="7;">=408 && input1 < yangscore="6;">=511 && input1 < yangscore="5;">=614 && input1 < yangscore="4;">=717 && input1 < yangscore="3;">=820 && input1 < yangscore="2;">=923 && input1 < 1023)
{
yangscore=1;
}
else if(input2 =0)
{
yangscore=0;
}
yinyanglove= yenscore + yangscore;
//this code turns on and off a certain number of LEDs based on your yin+yang score
if (yinyanglove=1 || 2)
{
digitalWrite (2, HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
delay(1000); // wait 1 second
digitalWrite (2, HIGH);
}
else if (yinyanglove=3 || 4)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
}
else if (yinyanglove=5 || 6)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
}
else if (yinyanglove=7 || 8)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
}
else if (yinyanglove=9 || 10)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
}
else if (yinyanglove=11 || 12)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
}
else if (yinyanglove=13 || 14)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
}
else if (yinyanglove=15 || 16)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
}
else if (yinyanglove=17 || 18)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
}
else if (yinyanglove=19 || 20)
{
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
digitalWrite(11,HIGH);
delay(1000); // wait 1 second
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
delay(1000); // wait 1 second
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
digitalWrite(11,HIGH);
delay(1000); // wait 1 second
}
delay(7000); // wait 7 second before restarting loop
}
--
Here is my love machine:
The ball is a boob feeling blob, with a flex sensor on one side and a pressure sensor on the other. So a person must at the same time do a very light touch one side and pressure on the other side to achieve a combined yin yang lov-o-meter score.
Tuesday, May 26, 2009
Electronics Lab
Ok, after some help from Rory I am feeling much better about this lab. I have no idea what I did wrong in my previous lab. But things are working now.
Measuring Voltage
I'm getting a reading of 17-ish volts for my direct power connection into the breadboard, and a reading of 5.02 v off of the regulator.
A Basic LED Circuit
My soder job sucks!! But, yay. It worked. The LED glow does not nearly match my internal glow at getting it to work. Maybe my resistor is too high.
LED in Series
Put this in wrong the first time. But worked like a charm after I made sure things were connected to the power line.
Components in Parallel
The parallel setup worked too. Though, really am not sure what I am measuring. Took out the power side of one LED but left the ground connected. I then placed the red line against the location the power of the LED would have gone and got no reading. There didn't seem to be any location that I placed the meter that I would get a read....
Generating Variable Voltage with Pontentiometer
Well, the good news is that I am getting better at sodering. Managed to achieve some pretty solid soder this time, unlike last time where my wire simply came unhinged after I detached it. However, the bad news is that I solidly soder-ed a red wire to my ground location. Looks like I now need an additional lesson to un-soder if there is such a thing.
Also, I could get my LED to light up with the Pontentiometer-but not if I was using a resistor (and it was the same resistor I used on the previous exercise so I know that it works).
Measuring Voltage
I'm getting a reading of 17-ish volts for my direct power connection into the breadboard, and a reading of 5.02 v off of the regulator.
A Basic LED Circuit
My soder job sucks!! But, yay. It worked. The LED glow does not nearly match my internal glow at getting it to work. Maybe my resistor is too high.
LED in Series
Put this in wrong the first time. But worked like a charm after I made sure things were connected to the power line.
Components in Parallel
The parallel setup worked too. Though, really am not sure what I am measuring. Took out the power side of one LED but left the ground connected. I then placed the red line against the location the power of the LED would have gone and got no reading. There didn't seem to be any location that I placed the meter that I would get a read....
Generating Variable Voltage with Pontentiometer
Well, the good news is that I am getting better at sodering. Managed to achieve some pretty solid soder this time, unlike last time where my wire simply came unhinged after I detached it. However, the bad news is that I solidly soder-ed a red wire to my ground location. Looks like I now need an additional lesson to un-soder if there is such a thing.
Also, I could get my LED to light up with the Pontentiometer-but not if I was using a resistor (and it was the same resistor I used on the previous exercise so I know that it works).
Monday, May 25, 2009
Breadboard lab
Completed the lab to setup my breadboard with the 5v regulator and the power connector that was soldered in class.
I have pretty much followed the pic as is. I then hooked up the power connector and try to measure the voltage. I got no reading. So, I really have no idea whether I have set the breadboard up wrong, or whether my power connector is bad, or what? I think I will move onto the 2nd lab and hopefully there is something there that will give me some clue as to whether my setup works or not.
Subscribe to:
Posts (Atom)