SlideShare a Scribd company logo
1 of 33
Astrobot
SESSION 5
Ultrasonic sensor
Ultrasonic
𝐷 =
∆𝑡
2
∗ 𝑐
• 𝐷 : distance
• ∆𝑡 : time delay
• 𝑐 : speed of sound
Note: 𝑐 = 343
𝑚
𝑠
= 0.0343
𝑐𝑚
µ𝑠
Coding
DC motor with gearbox
Used voltage : ( 3 to 12 ) DC V
Used Current : ( 190 to 250 ) mA
L298N Dual Motor Controller
Module
How to control the motor
Speed ?!
Analog output
PWM arduino Pins
How to control the motor
Rotation Direction ?!
( H-Bridge
circuit )
H-Bridge circuit
Details
What’s Next
Connection with
arduino
//Code
Functions
Structure of a Function
Structure of a
Function Data_Type FunctionName();
Let's Code !
Simple Code
w/Function
Let's Practice !
Coming Session
Astrobot session 5

More Related Content

What's hot

A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...
A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...
A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...
政德 劉
 
Seaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kV
Seaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kVSeaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kV
Seaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kV
Thorne & Derrick International
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPT
Sai_praneeth
 
Power point presenttation seminar
Power point presenttation seminarPower point presenttation seminar
Power point presenttation seminar
9766686371
 

What's hot (20)

Ur gen iii
Ur gen iiiUr gen iii
Ur gen iii
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
FPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERFPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLER
 
Serial communication in LPC2148
Serial communication in LPC2148Serial communication in LPC2148
Serial communication in LPC2148
 
A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...
A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...
A Wireless Application of The Rain, Humidity and Temperature Sensors Based on...
 
2008 sensor manual
2008 sensor manual2008 sensor manual
2008 sensor manual
 
To control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEWTo control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEW
 
Remote controlling of home appliance by moniruzzaman iiuc
Remote controlling of home appliance by moniruzzaman iiuc Remote controlling of home appliance by moniruzzaman iiuc
Remote controlling of home appliance by moniruzzaman iiuc
 
Analog to Digital converter in ARM
Analog to Digital converter in ARMAnalog to Digital converter in ARM
Analog to Digital converter in ARM
 
Physical prototyping lab5-complex_sensors
Physical prototyping lab5-complex_sensorsPhysical prototyping lab5-complex_sensors
Physical prototyping lab5-complex_sensors
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
 
Uart
UartUart
Uart
 
Invt gd100-user-manual
Invt gd100-user-manualInvt gd100-user-manual
Invt gd100-user-manual
 
Seaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kV
Seaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kVSeaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kV
Seaward PR11 PR15D PR33D High Voltage HV Phasing Unit 11kV 15kV 33kV
 
Object counter
Object counterObject counter
Object counter
 
Uart
UartUart
Uart
 
UART Communication
UART CommunicationUART Communication
UART Communication
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPT
 
Presentation on gesture control robot
Presentation on gesture control robotPresentation on gesture control robot
Presentation on gesture control robot
 
Power point presenttation seminar
Power point presenttation seminarPower point presenttation seminar
Power point presenttation seminar
 

Recently uploaded

Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
drjose256
 

Recently uploaded (20)

Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdf
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 

Astrobot session 5