WEEK 5 : SENSORS AND ACUTUATORS


SERVO MOTOR :

In this week, we were introduced to servo motor. We turned it back and forth across 180 degrees by using Arduino tools and following the instructions of our teacher Mr. Carl James. It was very fun because I was controlling hardware using software. 


                                                   


Let me give you a short brief on Servo motor.

Servo motors have three wires : Power, Ground, and Signal. The power wire is typically red, and should be connected to positive pole of your power source. The ground wire is typically black or brown and should be connected to the negative pole of your power source. The signal pin is typically yellow or orange and should be connected to PWM pin on the board and the pin number is 9.


The below pictures shows, how I used my Servo Motor with my Arduino kits.  




This is the code that I used to control the motor.






ULTRASONIC SENSOR :

After the Servo Motor, our teacher introduced us to Ultrasonic Sensor. First, let's discuss a little bit about Ultrasonic Sensor.

An Ultrasonic Sensor is a device that uses sound waves to measure distances. In an Arduino Uno setup, an ultrasonic sensor typically includes a transmitter that sends out ultrasonic pulses and a receiver that listens for the echoes when those pulses bounce back from an object.


We connected the sensor to the Arduino Uno then programmed it and measured some distances with the sensor.





This is the code that I used to control the sensor.




This is the video of what was actually happening.
 
 


This was the serial porter  giving values  


And all of these interesting and fun things we did in week 5.

Comments

Popular posts from this blog

Main Project : A Lie Detector

Recommender System