intro.to physical computing(week4)

Class

Assignments

PROJECT 1🥳🥳🥳

For project1 Echo and I worked together to make two outcomes. The first one is a fortune teller and the second one is a traffic light box. During the process of making these two works, Echo and I found it’s very interesting to cooperate and help each other with our skills. (Thanks Echo!!!)

❤️ NO.1 Fortune teller(Sexy Prophet)

The first work is based on Echo’s obsession of magical stuffs. We wanted to build something like magic wand. But didn’t figure out ways to make it come true based on the knowledge we’ve learned so far, and also didn’t know how to put all the electronic components into a small space like a wand. We decided to make a fortune teller (prophecy box) at last. Two of the most important electronic components that we used are photocell resistor(analog input) and LCD screen(digital output).

1.Electrical Components:

Breadboard*1

Photocell resistor*2

Potentiometer*1

LCD screen*1

Resistors

Dupont threads

2.Circuit:

We found some reading materials about how to connect the LCD screen on the Internet.

Although this picture looks nice and neat, with the increase of threads, it can be easy to make mistakes actually. Echo and I spent hours to debug and build same circuit on different breadboard.

(Reference)

3.Code:

We used photocell resistor to control the LCD screen. Photocell resistor provides analog input, if analog input goes down, which means the user has touched the box, a random answer will be shown on the LCD screen. If the analog input doesn’t change, “Questions?” will be shown on the screen.

4.Outlook:

❤️ NO.2 Traffic light box

The second work is based on my thoughts of traffic light. My basic idea is to use a range sensor to detect whether there is somebody crossing the road when the red light is on and output the alarming sound if it wants to break the traffic rule.

1.Electrical Components:

Breadboard*1

Range sensor*2

Speaker*1

LED lights*3

Resistors

Dupont threads

2.Circuit:

The circuit of this work is not difficult, but when I tried to put it into a container, everything became tuff. The threads of speaker were so fragile that kept breaking away from the circuit. Every time that I changed the position of it in the container the volume and the pitch will also change.

3.Code:

(Reference)

We used a range sensor as the digital input to control the speaker. The speaker turns on when the red light is on, and only outputs sounds when there’s a distance change.

4.Outlook: