Posts

week10

Image
  In this week's lab, we explore H-bridge; I understand how using H-bridge separates the high current with adrino.  I understand the use of AI AO and BI BO, but I find every H-bridge is kind of different. Also, I see the coding part is a little hard to understand, does the use of the H-bridge kind change the code? or do I have to include something?  In lab 3, I tried to use the step motor, but it didn't work out since I don't have the H-bridge. Instead, I am using a motor driver. But in the picture, the power source is a 9v battery, and I don't have that either, so I changed to a 12v power jack but with a bigger resister for 20k omega, but it still doesn't work; I think maybe some problem of my code.  

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

Week3

Image
In the first lab about tone, I was confused by the figure on the lab reading. I missing the ground, so the reading of the press sensor was not changing by my press, it only changes by itself. After I connected with the ground I do have the analog value in my control, but the value I have is always in the range of 0-30. I don't know if it is too small, and also wondering why the umber I have have such a big gap with I don't have the ground before. The problem I have when I put the speaker with press sensor is that when I have the map number some with the lab, my speaker doesn't response. Then I think about the number I have in AnalogRead is way more smaller than 500, so I changed the range to 20,100. And the speaker works. I changed some numbers in the map and delay trying to see if what those numbers are doing. I kind find they are changing the frequency, but still don't understand what they exactly are.  For the one with play it loud, I also confused by the lab(why is

Week 2 Lab

Image
  In this week's lab, I kind met some fundamental problems, so I kind can't achieve any lab successfully. I think it maybe some setting problems with my Arduino. For the first lab Digital input & output with Arduino, I think I do understand the concept that to use different pin to control the power by coding.  I do think my circuit is right, and I also tested my led are working. In the Arduino I verified my cod, everything  went through successfully. But after I upload it it saids programmer is not responding    Then I move to the lab Analog in with an Arduino. First of all I kind son't understand what dose Analog means in this content. Dose it means all the changing  parameters? In my understanding it is more like how to use different sensors working with Arduino. And in this coding I do have some hard time to understand some words. Like the const int and int, what should be const int and what should be int? And is the analogWrite and analogRead have to be appeared as