SlidePub
Home
Categories
Login
Register
Home
General
sensors for business an technology device
sensors for business an technology device
ssuserf7e5ff
4 views
12 slides
Aug 13, 2024
Slide
1
of 12
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
12
About This Presentation
Sensor technology introduction
Size:
132.21 KB
Language:
en
Added:
Aug 13, 2024
Slides:
12 pages
Slide Content
Slide 1
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Introduction to Sensors
Slide 2
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
What are sensors?
•Your answers here!
Slide 3
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
What are sensors?
•A sensor tells a robot one simple thing about it’s
environment
–Temperature
–Distance
–Light intensity
•Allow robots to see and feel the physical world
through which they travel
•Two main types of sensors: digital and analog
Slide 4
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Analog Sensors
•Can provide a range of feedback
•The robot will interpret feedback from the sensor
as a number from 0 to a pre-defined maximum
(1024 for most Vex sensors)
•A light sensor has many states:
–If it is very bright, the sensor will return a number
close to 30
–If it is very dark, the sensor will return a number close
to 1000
Slide 5
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Digital Sensors
•Can distinguish between two different “states”
•The meaning of the states depends on the
sensor
•A bumper sensor has two “states”
–If it is pressed, it is a 0
–If it is not pressed, it is a 1
Slide 6
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Variables
•A value-holding “container” with a label
•You can retrieve the value in this “container”
when it is needed
»There are different types of values you can store
in variables.
»You will use the “int” type, which allows you to
store any whole number from 0 to a large
number (positive or negative)
»You can assign a starting value to your variable
which will store that value at the start of the
program
Slide 7
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Bump Sensor Introduction
•Open the project “BUMPERTEST.ECP”
•Download it to your robot and open the terminal
window
Slide 8
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Understanding bump sensor code
•Comments - allows you to leave notes to
yourself and others about your code
•The compiler ignores comments
Slide 9
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Understanding bump sensor code
•While Loop – block of code that repeats itself as
long as the condition inside the parenthesis is
true
–The == operator returns true if both sides are equal,
and false if they are not equal
–In our code loop will always equal 1, so this loop will
run forever
Slide 10
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Understanding bump sensor code
•Bumper sensor – stores the value of the digital
input 6 to the variable “bumper”
–Now the robot knows if the bump sensor is being
pressed in (0) or not (1)
Slide 11
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Understanding bump sensor code
•Print to screen – displays information in the
terminal window
–This particular code displays the value of the bump
sensor
For now, make sure your settings are as
follows:
* Variable: the variable you want to display
* Message: the message with the variable
* Directive: %d
* Type-cast: int
Slide 12
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.
Writing your own code
•We are going to write a program that runs one
motor until a bump sensor is pressed in
•Begin by opening easyC
Tags
sensors
Categories
General
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
4
Slides
12
Age
475 days
Related Slideshows
22
Pray For The Peace Of Jerusalem and You Will Prosper
RodolfoMoralesMarcuc
30 views
26
Don_t_Waste_Your_Life_God.....powerpoint
chalobrido8
32 views
31
VILLASUR_FACTORS_TO_CONSIDER_IN_PLATING_SALAD_10-13.pdf
JaiJai148317
30 views
14
Fertility awareness methods for women in the society
Isaiah47
29 views
35
Chapter 5 Arithmetic Functions Computer Organisation and Architecture
RitikSharma297999
26 views
5
syakira bhasa inggris (1) (1).pptx.......
ourcommunity56
28 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-12)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better