## Finally – You Are What You Eat

Some people say “You are what you eat”. I agree with this quote. Somewhere in our body may have the thing that we obtained from the food we ate.

I am always grateful for those animals (or even vegetables) with which sacrificed their lives to feed us. So we survive. Without those food we may die out of hunger and have no heart beats.

I decided to simulate our pulse and apply it to a piece of meat.
I use two arduinos because I want to show the “distance”  between the human and the food. One is for transmitting the pulse signal, another is for receiving the signal and do the commands. One the receiving side, I put one red LED, one vibration motor, one battery and some antennas. As the result the food part can be a stand alone object.

This is the receiving bag:

and then I bought some steaks (I don’t normally buy meat, but because of this project…):

I wrapped the meat around the bag and sew the edges:

This is the video of how it works:

## Assignment: sound/LED controls

code here:

```int state;
void setup(){
pinMode(9, OUTPUT);
pinMode(2, OUTPUT);
pinMode(12, INPUT);
state = 1;
Serial.begin(9600);
}

void loop(){
int potLight = map(pot, 0, 1024, 0, 255);
int photoLight = map(photo, 0, 1024, 0, 255);
int photoSpeaker = map(photo, 0, 1024, 500, 80);
int potSpeaker = map(pot, 0, 1024, 80, 500);
int potDelay = map(pot, 0, 1024, 0, 500);
int photoDelay = map(photo, 0, 1024, 0, 500);

delay(200);
state += 1;
if(state > 4){
state = 1;
}
}

if(state == 1){
//state one pot->LED, photosensor->speaker
analogWrite(9, potLight);
tone(2, photoSpeaker);
}

if(state == 2){
//photoell->LED, pot->speaker
analogWrite(9, photoLight);
tone(2, potSpeaker);
}

if(state == 3){
// photocell->LED/speaker, pot->speaker tone and led blink rate
tone(2, potSpeaker);
delay(photoDelay);
noTone(2);
delay(photoDelay);
analogWrite(9, photoLight);
delay(potDelay);
analogWrite(9, 0);
delay(potDelay);
}

if(state == 4){
analogWrite(9, photoLight);
delay(photoDelay);
analogWrite(9, 0);
tone(2, potSpeaker);
delay(photoDelay);
}

Serial.println(state);
}

int debouncedelay = 500;
boolean debouncefunction(int pin){
boolean state;
boolean previousState;

for(int counter =0; counter > debouncedelay; counter++){
delay(1);
if(state != previousState)
{counter = 0;
previousState = state;
}
}
return state;
}
```

## My Arduino Simon

I used some soft materials to wrap and form my Simon. Inside the white fabrics are two pieces of wooden oil paint canvases that contain my Arduino board, speaker, vibration motor, LEDs, and battery.
My circuit broke when I was about to do user testing today. I will schedule another time to test and document it.

User test:

## My Simon Says not working code…

this is YiNing’s not working Simon code….

```boolean simonDone;
int simonSays[99] ={};
int user[99] = {};
int nextStep = 0 ;
int usernextStep = 1;

int simonSpeed = 500;
int ledpin[4] = {};
int btnpin[4] = {};
int count = 0;

int debouncedelay = 10;
boolean debouncefunction(int pin){
boolean state;
boolean previousState;

for(int counter =0; counter > debouncedelay; counter++){
delay(1);
if(state != previousState)
{counter = 0;
previousState = state;
}
}
return state;
}

void setup()
{
for(int i = 4; i < 8; i++){
pinMode(btnpin[i], INPUT);
}

for(int i =8; i < 12; i++){
pinMode(ledpin[i], OUTPUT);
}

Serial.begin(9600);
}

void loop ()
{
if (simonDone == false)
{
simonSays[nextStep] = int(random(1,5)) ;
Serial.print("nextStep: " );
Serial.println(nextStep);

Serial.print("simonSpeed: " );    // Show how the new time feature works
Serial.println(simonSpeed);         // Show how the new time feature works

Serial.print("simonSays: ");

for (int i =0; i <= nextStep ; i++)
{
Serial.print(simonSays[i]);
Serial.print(" , ");
if(simonSays[i] == 1){
digitalWrite(8, HIGH);
delay(300);
digitalWrite(8, LOW);
}
if(simonSays[i] == 2){
digitalWrite(9, HIGH);
delay(300);
digitalWrite(9, LOW);
}
if(simonSays[i] == 3){
digitalWrite(10, HIGH);
delay(300);
digitalWrite(10, LOW);
}
if(simonSays[i] == 4){
digitalWrite(11, HIGH);
delay(300);
digitalWrite(11, LOW);
}
delay(simonSpeed);
}

simonSpeed= (simonSpeed - (nextStep*5));
simonSpeed = max(simonSpeed, 200);

simonDone = true;
Serial.println(" ");
}

if (simonDone == true)
{
//delay(3000);
Serial.println("User's turn");
Serial.print("User says:  ");
for(int i = 0; i <= nextStep; i++){
boolean wait = true;
if(user[i] != 1 || user[i] != 2 || user[i] != 3 || user[i] != 4){
if(wait == true) {
for(int i = 0; i <count+1; i++){
delay(count);
count++;
}
}
}
wait = false;
Serial.print("1");
user[i] = 1;
delay(200);
}
wait = false;
Serial.print("2");
user[i] = 2;
delay(200);
}
wait = false;
Serial.print("3");
user[i] = 3;
delay(200);
}
wait = false;
Serial.print("4");
user[i] = 4;
delay(200);
}
if (user[i] == simonSays[i]){
//usernextStep ++;
Serial.print(" , ");
//if(usernextStep == nextStep + 1){
Serial.println("User got it right, add a new step and give Simon a Turn");
simonDone = false;
//}
}
}
nextStep++;
}
}
```

## My Simon style games ideas, enclosures ideas, and sound code.

This are my thee Simon ideas:

for the enclosure for the first idea, I am thinking about attaching some parts onto the tip of the drum sticks

for the second idea, I’m thinking about a simple form like below:

for the third idea, should be simple, a Frisbee will do.

MY CODE

## Maker Faire

Maker Faire was very fun. Much better than what I expected!
here are three projects I found interesting:

Metrocard Man & Robot.
by Gregory Rodolico

I thought everyone hates MTA but I might be wrong…  the man decorated his robot and himself with metrocards… I’m actually happy to see someone use the simplest thing that everyone has or recognizes to get people’s attention.

Drivable Hammock
By Sean Ragan

The guy looks really comfortable everywhere at Maker Faire. Not sure it’s because of the hammock that makes him feel like home or just his easy attitude…

3D printer
by UltiMachine

This was my first time seeing 3D printer and the process of printing. I was really excited. This 3d printer has parts that were 3D printed, which means the machine can replicate itself. This reminds me of the recent article I read from Bill Joy, he said the future machines have the ability to self replicate.

## First post by YiNing

This is  Yi-Ning Huang.
My favorite childhood toy is dogs.

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r