November 27, 2017

I took 3 photos of my friend’s bitch, gave them all different tints and positions, then had them all move differently according to the mouse positioning. I could only upload them on their sides though. I attempted to use scale() to change the positioning but it only changed the size.

 Here is the link to a Youtube video of the photos moving.

November 22, 2017 – Claire Neel

To me, the word computing holds many different meanings at this point in my life. My day to day usage commonly refers to programming in my computer or into an Arduino or some other device. On a more philosophical level, I can recognize that I’m computing when I look at problems and see the repetition and idiosyncrasies that are involved in their proper execution. When I’m watching a football match, I see that as the ball is passed from one player to the next, patterns develop and there is an order of reception that yields the most successful play. To me, computing is a mainly a mindset nowadays. If you organize your life into steps that build off of one another, your actions can become more meaningful. When ordered in such a way, even the most mundane task can gain more importance because you are more aware of how greater things are contingent upon those first few steps.

 

No matter how you look at it, the natural world is filled with math. Learning to recognize that math in your everyday life is important, and can help you better navigate the world around you. Computing helps you to find the mathematical issues and use tools(mainly computers) in order to best hijack those natural equations to best serve yourself. Utilizing the logic that computing brings forward has helped me to simplify problems that I didn’t understand before. While I still don’t understand several of the formulas that I’ve programmed recently, I understand the logic behind them. I think computing helps to simplify complex issues as well as helps me to recognize the math I don’t notice in my day to day life.

October 16 – Self Portrait and Rectangles

For my self portrait, I decided to make an 8-bit character of myself. When you click the canvas, the background, shirt, pants, and shoe color will change. Going back, I would’ve created variables for the box positions. I just used a cheat sheet I had written on scrap paper with the x and y positions for the box positions. 

For the rectangle project, I made 5 rectangles that printed in a circle and left stamps. The farther from the center of the circle the ring is, the farther away the stamps are from one another. 

 

Here are youtube links for the rectangles and the self-portrait.

October 11 – Blinking Eye

For this project, I made an eye that “blinks” when a light is shown in it’s pupil. It uses just a light sensor(the pupil) and a servo motor(the eyelashes). The problems I found with this project were making the eyelash flexible enough to work with one motor. The foam I used was terrible, so I had to make a slip for the motor arm to be put into and a push pin to allow it to flexibly move. I also somehow misread that we were supposed to use DC motors and not servo motors, so I used a servo instead. 

 

Here is the link to a video of my project.

 

October 9- Gentleman Jelly

Here is the code for my project:

For the whimsical project, I built a jellyfish who has different reactions depending on how you ‘shake’ his tentacle. In one of his tentacles, there is a flex sensor, and depending on which way it is bent either LEDs inside the jelly will light up, his top hat will turn around, or one of two songs will play.

Some of the struggles I faced were that I used a resistor on the speaker which made it too soft(Alex pointed this out for me 😀 ), I didn’t originally use the for loop for my servo so it wouldn’t turn, and I forgot an } so that my last two commands weren’t being read. 

This is the link to a video of the Gentleman Jellyfish.

REVIEW OF DIEGO’S BOX:

Diego made a black box that played a song once you pressed the buttons the right way. Each button emitted a single tone, and if you pressed two specific buttons at the right time, it played the Imperial March from Star Wars. The box had no instructions, so it was a nice surprise when I figured out how to play the song. It made it into a game in trying to unlock the song. The all black of the box was also cool because it meshed well with the Darth Vader theme song.

October 2nd, Assignment 8

I made a 4 button melody bank, so once a button is pushed, a corresponding melody will play.  There was an error where it just continuously played the melodies, it was solved by taking out some wires that weren’t necessary. I also didn’t know that the larger breadboard I was using had a disconnect on the side holes, so I had to reconnect the two areas with an additional wire. 

A very helpful video that explained the basic melody code much better than the Arduino website can be found here

Here is the video of my buttons being pushed and the melodies playing: https://youtu.be/f8aIFEv7x0s

Assignment 7 – September 27

For this assignment, I chose to create three buttons that would play different notes when pressed.  If two buttons are pressed at the same time, the buzzer will play a different note.

 

Above is my code(I published with Crayon but still no color?) and below is my schematic:

 

While the yellow and blue buzzers would turn off after playing, the green button would play continuously and I have no idea why. The serial monitor would show it being printed continuously as green with blue and yellow being printed along with it when they were pushed. All the buttons were running the same code and were wired exactly the same as well.

 

Bein able to play combination frequencies was an interesting byproduct of the green never turning off and I added in more functions that followed through with that later. I also tried several different frequencies to try and get more appealing notes(pulling suggestions from this blog and Arduino) but uploaded the code with the notes I practiced with because they were more obvious when trying to listen for them. 

Here is also a cool video from Vox that I found about design that has nothing to do with my instrument but just reminded me of this class.

analogWrite() with LEDs (Claire)

Here is the code for the Arduino:

// Created by Claire Neel, September 2017

int blue = 10; // this creates variables for the pin numbers
int green = 11;

void setup() {

analogWrite(green, 255); // will only run once, green light slowly drops in brightness
delay(1000);
analogWrite(green, 250);
delay(1000);
analogWrite(green, 200);
delay(1000);
analogWrite(green, 175);
delay(1000);
analogWrite(green, 155);
delay(1000);
analogWrite(green, 100);
delay(1000);
analogWrite(green, 55);
delay(1000);
analogWrite(green, 0);

}

void loop() {

analogWrite(blue, 255); // will run continously after green light is done running
delay(1000);
analogWrite(blue, 200); // goes from very bright to off in a loop
delay(1000);
analogWrite(blue, 155);
delay(1000);
analogWrite(blue, 100);
delay(1000);
analogWrite(blue, 55);
delay(1000);
analogWrite(blue, 0);
delay(1000);
}

Here is the schematic:

Here are pictures of my RedBoard:

 

I found this exercise to be very difficult because I kept missing whether the green light would blink or not. I didn’trealize how fast it would start, so I kept fiddling with the code. Making the setup() sequence longer helped because I had more time to double check that the code was actually running. Knowing that setup() only runs once and immediately starts is something I should have had at the forefront of my mind while checking everything. Also, I wouldn’t use the color green again, it’s harder to see.

 

LED w/ Light Sensor (Claire)

This post will detail how to set up a RedBoard to have a light sensor that causes 3 different colored LEDs to light up depending on how much light the sensor senses.                        

Below is the schematic for setting up the board:

Below is the code for the Arduino to run:

void setup() {
Serial.begin(9600); //This starts our light sensor
pinMode(LED_BUILTIN, OUTPUT); //This calls the 3 LEDs into operation
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
}

void loop() { //The loop will cause the program to run indefinitley
int sensorValue = analogRead(A0); //This is the variable supplied by the sensor.
Serial.println(sensorValue);
delay(1);

if (sensorValue > 650) // nothing in front of sensor = yellow light on
{
digitalWrite(LED_BUILTIN, HIGH);
}
else
{
digitalWrite(LED_BUILTIN, LOW);
}

if(sensorValue < 400) //finger in front of sensor = blue light on
{
digitalWrite(12, HIGH);
}
else
{
digitalWrite(12, LOW);
}

if(sensorValue > 400 && sensorValue < 600) //partial light blockage = red light on
{
digitalWrite(11, HIGH);
}
else
{
digitalWrite(11, LOW);
}

} //closes the loop

 

Below are pictures of the RedBoard and breadboard connected:

How to setup the breadboard and RedBoard:

  1. Run your first wire(black) from the 5V into row 1 of the bread board.
  2. Insert the first leg of the sensor into the same row as the black wire. (Row 1)
  3. Insert the second black wire into the same row as the second leg of the sensor. (Row 3)
  4. Run the second black wire back into the A0 port.
  5. Place a 10K resistor onto the row with the second leg of the sensor and the second black wire. (Row 3)
  6. Place the third black wire into the same row as the second leg of the resistor. (Row 5)
  7. Run the third black wire into the Ground Port.
  8. Place the first yellow, first blue, and first red into the same row as the third black wire. (Row 5)
  9. Create the chain for each light by placing the first wire on the same row as the first leg of it’s color corresponding LED light, the first leg of the resistor on the same row as the LED’s second leg, and the second wire in the same row as the resistor’s second leg.
  10. Then attach the second wire’s to the RedBoard: red to 11, blue to 12, and yellow to 13.
  11. Plug the RedBoard into a laptop using the USB cable.
  12. Run the Arduino code.
  13. If a light doesn’t light up, try switching the position of the LED legs.
  14. Move your finger in front of the sensor and watch the lights change!

Assignment 1: LED Sheepherding and Lollipop Switch

For starters, below is the video link example of an IM project.

Now, I’m going to explain how to build the switchboard I visualized, and I will upload some hand drawn plans below as well.

  1. Take a box and glue two sticks to the opposite sides of one another, sticking straight up.
  2. Cut off a tip of a straw and poke two holes into it.  One should be towards the front and another in the middle. The holes should run in opposite directions.
  3. Run the larger hole through a third stick and glue this stick to the 2 upright ones.
  4. Attach a fourth stick to the side of the straw that does not have the second hole, making sure it is long enough so that the tip will reach the outside of the box when the swinging hinge(the straw) is pushed back. Attach aluminum foil to the bottom of the stick
  5. Put a lollipop in the second hole and tape the bottom of the lollipop’s stick to the fourth stick.
  6. Build a circuit but use two wires instead of one connecting wire between the bread board and the Arduino.
  7. Tape the two wires to the box o that when the lollipop is licked, it moves the aluminum foil forwards, connecting the two tips of the wire.