---+ 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 <literal>// the setup function runs once when you press reset or power the board<br />int pin=13;<br /><br />void setup() {<br /> // initialize digital pin LED_BUILTIN as an output.<br /> pinMode(pin, OUTPUT);<br />}<br /><br />// the loop function runs over and over again forever<br />void loop() {<br /> digitalWrite(pin, HIGH); // turn the LED on (HIGH is the voltage level)<br /> delay(1000); // wait for a second<br /> digitalWrite(pin, LOW); // turn the LED off by making the voltage LOW<br /> delay(1000); // wait for a second<br />}</literal> 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 : <a href="https://circuits.io/circuits/4515295-the-unnamed-circuit/edit" target="_blank">https://circuits.io/circuits/4515295-the-unnamed-circuit/edit<img alt="" border="0" height="12" src="%PUBURL%/TWiki/TWikiDocGraphics/external-link.gif" width="13" /></a> * code for the sos blinking LED <literal>// Pin 13 has an LED connected on most Arduino boards.<br />// give it a name:<br />int led = 13;<br />int s = 200;<br />int o = 650;<br />//innitializing the s and o<br /><br />// the setup routine runs once when you press reset:<br />void setup() {<br /> // initialize the digital pin as an output.<br /> pinMode(led, OUTPUT);<br />}<br /><br />// the loop routine runs over and over again forever:<br />void character(int speed) {<br /> digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)<br /> delay(speed); // wait for a second<br /> digitalWrite(led, LOW); // turn the LED off by making the voltage LOW<br /> delay(200); // wait for a second<br />}<br />void loop(){<br /> for(int x=1; x<=3; x++){<br /> character(s);<br /> }<br /> delay(700);<br /> <br /> for (int x=1; x<=3; x++){<br /> character(o);<br /> }<br /> delay(700);<br /> <br /> for (int x=1; x<=3; x++){<br /> character(s);<br /> }<br /> delay(2000);<br /> }</literal> 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". %USERSIG{EnochSowah - 2017-03-27}% ---++ Comments %COMMENT%
This topic: Embedded_Systems
>
WebHome
>
StudentProjects
>
3WheelRobot
>
Ultra-sonicDistanceMeasurement
>
ReportOnUltrasonicDistanceMeasurements
Topic revision: r1 - 2017-05-01 - uli
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback