Arduino Sketch Essay

Great Essays
8. Overview of the Arduino Sketch
8.1 General Codes
MediaTek labs states that an Arduino sketch “is a source code file representing the core controlling logic for the LinkIt ONE development board. It consists of two main structures: setup and loop” (MediaTek Labs, n.d.).
In this section I will discuss what the above code do. First, LinkIt ONE initializes the Ubidots account, then the sensors, Wi-Fi or GPRS, the location and finally the serial port. To minimize battery consumption, I did not use the GPS antenna to detect and acquire automatically the location. I manually added the location of the device in the codes using latitude and longitude coordinates. The Eco-Smart Can device will try to update the collected data to Internet on the Ubidots
…show more content…
Cytron Technologies explain in their user’s manual of the HC-SR04 sensors that the ultrasonic sensor uses sonar to determine distance to an object like bats or dolphins do. To start the measurement, the code triggers the digital Trig pin (Pin D12) of the sensor with a high (5V) level signal of 10μs (micro second), this initiate the sensor to transmit out eight cycle of ultrasonic burst at 40kHz (kilohertz) and wait for the reflected ultrasonic burst. When the signal comes back and is detected by the sensor; the sensor will set the Echo pin (pin D11) to high (5V) and delay for a period (time) which proportion to distance taken by sonar waves to travel from the sensor to the object and back to sensor. To obtain the distance, we need to first divide time by 2. We know that, Distance = Speed × Time; in this case, Trash distance = (Echo pin high time/2) × velocity of sound (340m/s). The range of the HC-SR04 sensor is from 2 cm - 400 cm with an accuracy of 3 mm and the Velocity of sound in dry air at 20 °C (68 °F) is 340 m/s. Since the duration for which the trig pin and echo pin stays high is in microseconds (μs). Therefore, Velocity of sound in cm/μs = (340m/s × 100)/1000000 = 1/29.1 cm/μs. Finally, Trash distance (cm) = (Echo pin high time in µs/2) x (1/29.1 cm/μs) = Echo pin high time/58.2 cm. (Cytron Technologies, 2013). See data sheet in Appendix …show more content…
This project can be taken further. In the future, I will like to improve this device by adding a solar panel to charge the battery to make it autonomous, with minimum human intervention. In addition, create a real-time monitoring of the civic body’s garbage vehicles using Radio Frequency Identification (RFID). Each maintenance staff has to scan his/her RFID card so that who and when and at what time trash cans were emptied is recorded. It will help ensure that everyone is doing their job. The velocity of the sound that I am using in my code, is when the sound travels in a dry air at 20 °C (68 °F), but since the trash will be exposed to different weather sometimes our readings will be affected. Therefore, I think to fix this issues we can use the data of the temperature & humidity sensor to compensate the changes in order to keep our reading accurate. This project has countless way to improve

Related Documents

  • Decent Essays

    SYSTEM IMPLEMENTATION: At some fixed interval the PC Master sends request to the Wireless sensor node through the sub master for Data collection. The request send by the PC Master is in the form of frames. The frame which is transmitted by PC master will contain both the sub master id & the wireless sensor node id from where the data should be retrieved. The sub master receives the frame is then check for the wireless sensor node id…

    • 358 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    Upon arriving at the art museum, a giant, electric blue rope greets me at the entrance. The artwork surprises me since I did not expect to see such thing in a small museum. The rope comes out of from between a woman’s tattooed that stick out from a hole in the wall. It continuously extends from there and intertwines through bright white pillars on the ground level. The almost mile-long rope snakes up the building through horizontal columns that separate each story.…

    • 1067 Words
    • 5 Pages
    Improved Essays
  • Decent Essays

    Pt1420 Unit 1 Essay

    • 508 Words
    • 3 Pages

    1. What are the least, and most, amount of distinct zeroes of a 7th degree polynomial, given that at least one root is a complex number? Answer: If the equation is 7th degree then it has 7 roots.…

    • 508 Words
    • 3 Pages
    Decent Essays
  • Decent Essays

    Pt1420 Unit 6 Essay

    • 225 Words
    • 1 Pages

    1. Significant figures are all the digits that can be known precisely in measurement as well as a last estimated digit. 2. The measurements are continuously reported to the correct number of significant figures, because the calculated answer frequently depends on the number of significant figures in the values used in the calculation. To determine significant rules in measurements, there are six rules that are applied to establish significant figures.…

    • 225 Words
    • 1 Pages
    Decent Essays
  • Brilliant Essays

    Pt1420 Unit 1 Essay

    • 1006 Words
    • 5 Pages

    Task 1 Using Word, draw a time-line and identify the ten most significant events related to the “History of computing”. Provide a brief explanation – to justify each of your ten choices. Suggest some reliable sources from which anyone could find further information about each of your selected events. A short History of Computer Viruses: 1983 – This is the year when the term “Virus” was introduced by Frederick Cohen for the computer programs that are infectious as it has the tendency to replicate.…

    • 1006 Words
    • 5 Pages
    Brilliant Essays
  • Improved Essays

    Qa Lab Day 1 Essay

    • 492 Words
    • 2 Pages

    QA Lab day one: I tested five games during this QA lab ,There Might Be Ponds, office mayhem, Kanji Samurai, The Fog, and an unnamed tower defence game. All five of the games tested where digital and for the most part functional. I had never tested these games before this being my first QA lab. I enjoyed most of the games thoroughly but i found myself liking There Might Be Ponds the most. There Might Be Ponds is a charmfull puzzle game that implements a intersting to hand mechanic in which you use both analog sticks on a controller to solve puzzles as if you were manipulating the environment with your hands.…

    • 492 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Ev71 Essay

    • 986 Words
    • 4 Pages

    Background Main Goals To find out the origin, population dynamics, natural selection, and seasona periodicity of the VP1 gen of EV71 (common cause of hand, foot, and mouth disease(HFMD)). To get a better understanding of the disease. How Did the Main Questions Raise Up?…

    • 986 Words
    • 4 Pages
    Improved Essays
  • Improved Essays

    Have you ever needed to do a certain simple task, but wished there was a machine to do it for you? The purpose of a Rube Goldberg machine is to create a complicated system in order to complete a tiny, simple task. What is a Rube Goldberg machine you may ask? A Rube Goldberg machine is an over- engineered contraption that uses a chain reaction to accomplish simple tasks such as turning on the music, pouring a glass of water, etc. This specific Rube Goldberg machine’s task is to move the last piece on the chessboard to score checkmate by using the most complicated arrangement possible.…

    • 469 Words
    • 2 Pages
    Improved Essays
  • Decent Essays

    Ultrasound has been used for many years to help diagnosis. Ultrasound describes sound frequencies beyond the range of normal human hearing and 20 kilohertz. Ultrasound uses focused low-energy ultrasound waves to visualize the interior of the body in a noninvasive and painless way. Many people are to thanks for the evolution of ultrasound. Dating back to the 1700’s.…

    • 338 Words
    • 2 Pages
    Decent Essays
  • Great Essays

    Goals Of Phase One Essay

    • 1541 Words
    • 7 Pages

    *Goals of Phase One (Mikaela Romano): The main goals of our group during phase one is to finalize the design of our jacket and blanket and to schedule time to work with Mrs. Freeman during phases two and three. The biggest goal of this phase for our group is to start our prototype and to work out all of the kinks with our design. Past, Present, and Future Technology (Kaley Barnes): The pas of the modern day sweatshirt and athletic attire is very interesting.…

    • 1541 Words
    • 7 Pages
    Great Essays
  • Improved Essays

    Ultrasound Technicians, also known as diagnostic medical sonographers, use equipment that makes sound waves to produce or record a picture of the internal organs. Sonography is an important medical field because it allows technicians and physicians to see and diagnose a patient’s condition in a minimally intrusive way. What once may have required exploratory surgery now is a quick outpatient procedure with minimal patient discomfort. Ultrasound works by using a high rate of sound waves and echoes: it’s like echolocation which some animals use to find objects by sound. An Ultrasound machine uses high rythm sound waves that pulses into the body by using a transducer probe (the main part of the machine).…

    • 1032 Words
    • 5 Pages
    Improved Essays
  • Decent Essays

    My First Simulator Essay

    • 692 Words
    • 3 Pages

    KATRINA’S COMMENTS TO OTHER INSTRUCTORS A couple of days later as we were getting ready to do an introduction into the simulator procedures, I overhead an instructor asking how things were going with our training, as I approached her, she was making unprofessional comments about my training; when she realized I was close enough to hear her, she ceased speaking. KATRINA’S RELATIONSHIP WITH MY FIRST-OFFICER In addition, it was clear she was pretty friendly with the other pilot (my first officer training as my co-pilot) while we were in the simulator as he made it very clear to her he was going to “brown nose” to get through the training.…

    • 692 Words
    • 3 Pages
    Decent Essays
  • Improved Essays

    I would definitely call myself a tech and science nerd. I am in robotics and I am currently taking two sciences; so I definitely qualify for my geek card. Something that has always intrigued me is the future of technology and science, and one of the most interesting possibilities of technology would being able to augment myself and /or others. Robotics is something that’s always been intriguing to me, and of course anyone in robotics have always thought about the implications of augmenting the human body. I do have both good and bad thoughts about augmentation.…

    • 413 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    METHODS Listed below are the steps needed to create a Data Pipeline. Below the commands are the results from successful processing of those commands. 1) Verify or create required IAM Roles (for CLI or API only). IAM roles determine what actions pipelines can perform and what resources it can access. IAM roles determine what actions applications can perform and what resources they can access on a pipeline resource, such as EC2 instance Through CLI or AWS Data Pipeline console create the following roles: DataPipelineDefaultRole - Grants AWS Data Pipeline access to your AWS resources…

    • 705 Words
    • 3 Pages
    Improved Essays
  • Superior Essays

    Use Of Technology Essay

    • 1300 Words
    • 5 Pages

    Today we as a culture spend more time using the computer to learn, meet and ask. Is this a bad thing or can this expand our knowledge and bring new inventions to our society? In 2011, Americans connected to the Internet more than ever before, it was a time of expanding our knowledge as individuals. Computers were dropping in price and making it so most american families could use the internet, the Internet is what holds everything it 's a vast computer network. It can link smaller computer networks worldwide.…

    • 1300 Words
    • 5 Pages
    Superior Essays