Posts

Showing posts from October, 2021

Project 2 Prototypes

Image
 In this project, we are trying to make a Pedal Set that can replace the keyboard's Space / Return / Delete buttons.   To achieve that, we want to use an ultrasonic distance sensor to have the parameter. In our plan, when the pedal touches on the bottom, in the P5, it will type in the key that we planed.   First, we tried the ultrasonic distance sensor on Adriano. To read the distance, it needs the trigger and Echo,  and the distance will be calculated in CM. But I find out when it goes totally close, the number will be around 790.  So we tried to read the number on P.5. And give an if statement to control the action. Also, In the end, it will behave more than one sensor to handle different feedbacks, so it probably will use an array. In the current stage, we only try to have the number in P5, but we do have some problems with that; I think I can have the numbers under the console, but can not use it, probably I don't know how to get rid of " "   We are inspired by t

WEEK 6

Image
 This week we learned more about the serial. From my understanding, the goal of learning it is to connect Arduino with P5.  I reviewed the slid to read more about how the transaction was down. Lab 2 Serial Input to P5.js I was having a hard time understanding all the functions.  Also, the P5 serial control is unclear to me to control. Also, I have problems understanding the orders of open Arduino, P5 serial control, and P5.  I was correct on every coding part, but my console said it is undefined. The p5 serial control can read the number, and the p5 also has the canvas drawing.  But the undefined keep shows up. So the problem very much happens on the p5 side. And I tried a lot of ways to change some code, it didn't help.  Ends up I changed my browser to chrome, and it works.  Lab3 In lab3, what confused me is which code is actually connecting p5 and Arduino? Are serial read and serial write the same? Are they connected with each other?  In lab 3, the mouse drag one; I think my LED

Week 4

Image
 In the group project, we are trying to make an interactive teddy bear that can make different sounds by touching other parts of it.  In the circuit part, we have two different sensors, one is the touch sensor, and the other is a flex sensor. Each one of the sensors is the bear's hands. The touch of different hands can make a different sound. When you touch both hands together, we can have a whole melody.  To make the circuit, we used a wire wrapper to make the sensor have a longer wire to achieve the bear's hands. And for it can be easily fitted with the bear, we used a smaller size breadboard. But later on, we may also be going to soldering it on the board. The first question we met is that the speaker's sound is too quiet, so to make it louder, we changed an Arduino Uno, which has a 5.5v output, and that dose helped a lot.  Coding-wise, we are trying to finger out to separate these two sensors. We used the if statement and also set up the frequency separately. To make t