Arduino PMW Pin Test
Using PMW Pin creates smooth pattern transition. We might be using this method.
PC
PC
Multiplexer Test
Testing led light patterns using a multiplexer. Leo and I found patterns were not smooth and choppy. We want to have more smooth transition on pattern.
PC110509 Week9
Programmable NYC MAP: Behind the Name: MidTerm: Media Controller
Kody, Sarah Jenny and I met up a couple times a week for last 3 weeks for our midterm project, Programmable NYC MAP. We came up with the idea that somehow a map triggers information. We also bounce our idea to Rory and residents that our idea was ideal.We wanted to lunch website first but none of us had php or java programing skill so that we decided arduino to processing to trigger simple one page info by pushing bottoms.
One page info was also challenging. What kind of info could fit inside the screen. The idea, behind the name came a couple days before our presentation.
Through out our process, we spent most of time troubleshooting. Physical design and concept were pretty much concrete first week but making the devise work smoothly took us a long time.
Troubleshooting
Information






Download Code: Arduino & Processing
Presenting to Sustainable South Bronx High School Students


Using a transistor to control high current loads with an Arduino


DC Motor Control Using an H-Bridge


Small problem again… I could not upload code to Arduino. Found out I burned my controller a month ago and replaced it and it was not 328 but 168. Small detail but took me good one hour to figure it out. Oy…
PC102409 Week 6
Serial Duplex using an Arduino
Connect the sensors


Read and send the serial data/ Send the data in many formats


It’s printing the raw binary value, then the ASCII-encoded binary value, then the ASCII-encoded decimal, hexadecimal, and octal values.

Punctuation Method



After testing Arduino, I was getting data, some numbers in serial monitor but I could not an accelerometer to control processing. Leo found out the accelerometer I bought from a book store designed differently from lab assessment one. It was 3v accelerometer and not 5v. Connecting 3v to the accelerometer, processing start functioning.
PC101509 Week 5
Serial Out using an Arduino
Connect the sensor & Read and send the serial data

Graph the sensor’s values

Observation: MTA NYC Transit MetroCard Machine
I needed to add some $ into my metro card today… My nightmare started here…




Went to 8 street N, R, W downtown train station close to ITP . There was no machine nor a booth. If there was no human working … why don’t they put the machine? The intercom showing in picture above does not sell any metro card. Inconveniently, I had to walk up street again to find other entrance.






I am not sure why we have to put our zip code information to purchase a metro card or refill. Wonder what happens if you live outside of New York?




I was ok following instruction on screen. The machine started beeping not taking a card from machine but I kept taking photos and ignored the sound. After while the machine took my $57 card and gave a receipt instead!!! I took the receipt and brought to the booth next to the machine. A lady works there could not give me refund of money the machine took away. There were no link between the booth to the machine. She told me I have to full paper and send it back to MTA for refund using a prepaid envelope which she did not have. I had to go up the street and across the street to get the envelope from another station booth. I went to 3 stations in one hour!


So, to get my money back. I have to full out paper work with the receipt and machine # show photo above.


PC100109 Week 4
Servo Motor Control
Control a servomotor’s position using the value returned from an analog sensor.
Tone Output
Generating simple tones on an Arduino using Brett Hagman’s Tone library.
Stupid Pet Trick: How to Bow Perfectly
LEDs are lighting up one by one depend on how deep My uglydoll bow and when she bow perfectly. She will fart/ make some noise.




Code
//092409 Stupid Pet Trick
//092409 Stupid Pet Trick
#include
Tone noiseMaker; // instance of the tone library
int LED2 =2;
int LED3 =3;
int LED4 =4;
int LED5 =5;
int LED6 =6;
int flexpin =0;
int flexvalue =0;
//flexMapped = 0; // the value of the flex sensor after it has been mapped
//lowerRange = 270; // lowest desired value from flex sensor
//upperRange = 550; // highest desired value from flex sensor
int notes = NOTE_D4;
void setup(){
Serial.begin(9600); // initialize serial communications at 9600 bps:
pinMode(flexpin, INPUT);
// declare the led pin as an output:
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
pinMode(LED6, OUTPUT);
// start the music:
noiseMaker.begin(7);
}
void loop(){
flexvalue = analogRead(flexpin); // read the pot value
if(flexvalue <=420 ){
digitalWrite(LED2, HIGH);
}
else{
digitalWrite(LED2, LOW);
}
if(flexvalue <=410){
digitalWrite(LED3, HIGH);
}
else{
digitalWrite(LED3, LOW);
}
if(flexvalue <= 370 ){
digitalWrite(LED4, HIGH);
}
else{
digitalWrite(LED4, LOW);
}
if(flexvalue <= 330){
digitalWrite(LED5, HIGH);
}
else{
digitalWrite(LED5, LOW);
}
if(flexvalue <=290 ){
digitalWrite(LED6, HIGH);
noiseMaker.play(NOTE_C1);
}
else{
digitalWrite(LED6, LOW);
noiseMaker.stop();
}
Serial.println(flexvalue);
}
PC092409 Week 3
Measuring Voltage

Components in Series

Components in parallel; measuring amperage

Generating a Variable Voltage with a Potentiometer
PC091709 Week 2
Analog in; Tracking changes with variables


Using a Flex Sensor: Welcoming Uglydoll
Insert a flex sensor in back of a uglydoll. Whenever the doll bent over, a led light is dimming.


Code
int potPin = 0; // Analog input pin that the potentiometer is attached to
int potValue = 0; // value read from the pot
int led = 9; // PWM pin that the LED is on. n.b. PWM 0 is on digital pin 9
int lowerRange = 270;// lowest desired value from flex sensor
int upperRange = 550;// highest desired value from flex sensor
float flexMapped = 0;// the value of the flex sensor after it has been mapped
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
// declare the led pin as an output:
pinMode(led, OUTPUT);
}
void loop() {
potValue = analogRead(potPin); // read the pot value
// map the value of flexMapped to the upper and lower ranges of the sensor read out
flexMapped = map(potValue,lowerRange,upperRange,0,1023);
//map(value to be mapped, lower extent of possible value, upper extent of possible value, lower desired value, upper desired value);
if(flexMapped < 0 ){// if flexMapped is less than 0,
flexMapped = 0;// make it = to 0
}
if(flexMapped > 1023){// if flexMapped is greater than 1023,
flexMapped = 1023;// make it equal to 1023
}
analogWrite(led, flexMapped); // PWM the LED with the pot value (divided by 4 to fit in a byte)
Serial.print(“potValue = “); // print the pot value back to the debugger pane
Serial.print(potValue);
Serial.print(“ flexMapped = “);
Serial.println(flexMapped);
delay(100); // wait 10 milliseconds before the next loop
}
Fantasy Device
This is my dream ring which is karma/past life reader! Top of the ring is a button. I can push to find out what is my karma with a person who is in my mind. Image of our past life will be projected in air and only I can see it.


PC091009 Week 1
My first Physical Computing Lab Assignment: Digital Input and Output wtih an Arduino
• Parts & Prepare the breadboard


• Soldering

• Add a Digital Input and Outputs



• Lights up!
Be a little Creative…
Sensor Walk




