In this recitation, we built circuits with the Infrared Distance Sensor
Here is the code
Q1: We want the LED light up when the object reaches a certain range of distance above the sensor. I think if we can have the device in the study room, the light can be turned on automatically when a student approaches and be turned off when the student leaves which can save energy by giving light in only a certain area when there is a few people and is no need to turn all lights on.
Q2; Coding is like cooking. While you look at the recipe, it tells you step by step how to cook a dish. It is same with codes because you need to tell the computer what to do by using the detailed language that it can understand. While codes need to be treated more carefully because it will not work if a tiny part is missing or wrong, cooking is less strict.
Q3: The invention of the computer begins a new era and it benefits human a lot for it allows us to create things that were only imaginary before. It also built platforms for people to share ideas and make progress faster than before. Those interactions become a necessary part of our life and it also bring side effects. People begin to be afraid of computers for its great power and the changes it brings make us worried about being left behind. The point is that we should grow up with the computer and accept changes and come up with new ideas as well.