[Final project] Cat toy

Cats love to chase a moving thing even it is not a bird of a mouse. For this characteristic, there are some apps to catch a goldfish or mice for cats. And they love to play with them.

02/02/2012 NEWS: News. RSPCA game app for the ipad for cats. Pic Annette Dew MM444705
02/02/2012 NEWS: News. RSPCA game app for the ipad for cats. Pic Annette Dew MM444705

cats-playing-2

 

 

 

I do love cats, do love playing with cats, so wanted to give them more playful toy with physical interactions.

<Idea>

Cats love to sit on a laptop. Maybe because it is warm? We do not know the reason exactly but  they love to sit there and distract us when we do our work with a laptop.

maxresdefault 245_laptop3 axzq861_700b

In addition, cats are interested in the moving things on a screen. Even there is a lot of videos for cats on Youtube.

screen-shot-2016-11-01-at-9-18-17-pm

So, why not making a toy with a laptop screen?

It would be combination of p5js and physical computing. When a cat put his legs on a sensor, it might be a piezo or a pressure sensor, a bird or a mice will be shown up a screen. Moreover, some sensor will be connected to a camera on a laptop, so a cat could see his or her face.

kakaotalk_photo_2016-11-01-21-35-50_71

 

 

 

[Midterm] PPAP Machine (Arduino Turntable)

 

Dominic and I did our midterm project together as a team, and we created a small and funny vinyl turntable using Arduino.

This idea was started when we learned about a wheal sensor in the Pcomp class a few weeks ago. When I came up with ideas about our midterm project, I remember the sensor and thought it would be fun to change that sensor like a vinyl record. I talked about this idea to Dominic and he liked this idea, so we just started our project from this tiny idea. We decided that Pen Pineapple Apple Pen as our song and developed our idea to a kind of simple game such as Rock Band.

<Pen Pineapple Apple Pen Song>

https://www.youtube.com/watch?v=d9TpRfDdyU0

 

<How it works?>

You input pen, pineapple, and apple all in the correct sequence followed by each of three LEDs are turned on. After you success to play the whole song, it is played automatically.

<How to make?>

We changed our plan of using a wheel sensor to using rotary encoders for the turntables, because we wanted to be able to fully spin them.

Dominic use the Arduino Mega because we need more interrupt pins more than two which the Arduino Uno has. And also interrupts are used Interrupts referred to the bildr website.

Dominic did most of the coding and I could learn a lot from him. That was an big advantage of team work. I also could learn a lot in a class, but also a classmate could be your great tutor as well.

Moreover, I did not know that I liked to solder a lot. Luckily I joined the help session about soldering a few days ago and it was a great opportunity to practice soldering by myself.

kakaotalk_photo_2016-10-25-20-44-17_32

 

It was an also good chance to use a piezo sensor. It was needed to make a pen pad work.

This was a first attempt of a piezo sensor and a LED.

After it worked, I made a prototype of it. It was really excited moment when the LED was turned on flowed by hitting a box.

 

The biggest part was translating the song to codes and put them in the right sequences. Dominic found the video, https://www.youtube.com/watch?v=3XXajtg0zKc, and transcribed them into MIDI notation using an online audio program. (Dominic’s translation : https://onlinesequencer.net/334305) And converting them into code was the final step. (Link to the code: Click here)

 

<Design>

I wanted to represent the song in the box design, so I choose to put leopard pattern on the box and two fruits on the records. Also, I wanted to make user experience design. That’s why I put the three LEDs on the top of the each records and the pen pad, and also put the reset button on the top to be found easily. On the side, the speaker was made with a just simple way, made holes with a small screw driver.
kakaotalk_photo_2016-10-25-20-44-12_85

kakaotalk_photo_2016-10-25-20-44-09_48

kakaotalk_photo_2016-10-25-20-44-11_20

 

<Play the box!>

 

 

 

#6. Digital Input & Output – Traffic Lights

I made two LEDs are turned on and off by pressing a pushbutton. For this, two digital outputs which were a green LED and a red LED and one digital input which was a pushbutton were needed. LEDs were separately connected to digital output 2 and 4, because they should be turned on and off respectively based on pressing the pushbutton.  I set only the red one was turned on when the button was open, and the green one was turned on when the button was closed. It means that if the buttonState was low , digitalWrite of the red LED should be high and the green LED should be low to be turned on only the red LED. On the contrary to this, if buttonState was high which means 5V was flew through the button, only the green LED should be high to be turned on. The result looked like a traffic light.

screen-shot-2016-10-05-at-1-52-28-am

#3. Switches (pushbutton) – part 1

I set a pushbutton switch on a breadboard. The start was not bad. However…

kakaotalk_photo_2016-10-04-19-09-56_12 kakaotalk_photo_2016-10-04-19-09-58_38

And I was faced an unexpected problem. I just moved the location of LED connected to the above leg of the pushbutton, then the switch worked in opposite way. The switch is opened with untouched, and if I pushed the button, it was open and current was flew. It was so weird. You can see this with the below video.

#2. Measuring voltage with a multimeter

I used a multimeter to measure voltage.

I compared the difference of voltage following the number of LEDs.

First, I turned the dial of the multimeter on 20V.

(I had turned it on 2V and checked voltage, but the multimeter had not worked because the power through the arduido is 5V.)

1) Set One LED

  • Resistance: 2. 76V
  • LED: 19.4V

kakaotalk_photo_2016-10-04-18-54-09_26

 

 

2) Set two LEDs

  • Resistance: 1.17V
  • 1st LED: 1.85V
  • 2nd LED: 1.92V

 

kakaotalk_photo_2016-10-04-18-54-10_43

Those were serial circuits and I could see the voltage was dropped from the power to the ground through the circuit.

#1. Success and fails to turn the light on LED

My very first experience to play with a breadboard and LED!

Sometimes LED is lighten up, sometimes it did not work, but haven’t found the reason. I thought I connected between power and ground with wired properly, but guess there are some mistakes.

 

My first attempt was failed. Anybody please explain the reason.

 

kakaotalk_photo_2016-09-14-16-05-14_22

I changed the arrangement of elements and it worked successfully.

kakaotalk_photo_2016-09-14-16-05-12_32

I made another shape of circuit.

kakaotalk_photo_2016-09-14-16-05-08_46

 

In the same circuit, I added one more LED next to the previous one, but…

I should not have put it just next to the first one? Current can not flow between LEDs directly from one another? I will connect with a wire between two of them. We’ll see.

kakaotalk_photo_2016-09-14-16-05-10_16