> > |
META TOPICPARENT |
name="Ultra-sonicDistanceMeasurement" |
Report of Ultrasonic Distance Measurement Project
Week 1 & 2 reports
Week 1
- I was able to successfully installed the Arduino application and I also started practicing "c" since we would be using it.
- Also we met to do some training on Ubuntu since it's been a while some of us used it.
- I also read about the ultrasonic distance measurement.
- The ultrasonic sensor normally measure distance based on echo.
- It does calculation based on the traveling time and the returning time.
Week 2
- I was able to test my blinking light which worked perfectly
- Answered Uli's questions
- code for the blinking LED
// the setup function runs once when you press reset or power the board int pin=13;
void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(pin, OUTPUT); }
// the loop function runs over and over again forever void loop() { digitalWrite(pin, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(pin, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
Week 3
- Sound waves are oscillations with a frequency of some Hz up to ~ 20 KHz They are transmitted through the oscillation of the atoms or molecules of the medium (for us mostly air).
- Concerning the vacuum, since there are no atoms/molecules in vacuum, there is total silence
- humans can only hear frequencies up to 20kHz
- the SOS is a distress signal with the 'S' being the three dits and the 'U' being the three dals.
- I wrote a code in the simulator the url : https://circuits.io/circuits/4515295-the-unnamed-circuit/edit
- code for the sos blinking LED
// Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; int s = 200; int o = 650; //innitializing the s and o
// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }
// the loop routine runs over and over again forever: void character(int speed) { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(speed); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(200); // wait for a second } void loop(){ for(int x=1; x<=3; x++){ character(s); } delay(700); for (int x=1; x<=3; x++){ character(o); } delay(700); for (int x=1; x<=3; x++){ character(s); } delay(2000); }
Week 4 & 5
- I downloaded the newping library.
- I moved it to the libraries in the arduino folder
- In the arduino IDE i imported the newping library by going to "Sketch - include library - Newping".
Enoch Sowah - 2017-03-27
Comments
|