Maker Education Manipulator A guest education robot
Lesson 12 The sensitive intelligent light
CONTENTS I. Introduction of subject II. About the light sensor III. Skills competition IV. Classroom summary
I. Introduction of subject
Wonderful sensor Voice-activated sensor 1 1 Color sensor
What is a sensor 2 The sensor is a detection device, can sense the measured information, and can, according to a certain law, convert the sensed information into electric signal or information output in other forms. The way by which we access the outside information The way by which mechanical equipment accesses the outside information Light sensor Humidity sensor Gas sensor Sound sensor Taste sensor Temperature sensor Pressure sensor Vision Smell Hearing Taste Touch
II. About light sensor
Light sensor 1 1 Light sensor
2 About light sensor GND 5V Include a sensitive resistor which can sense the light and shade change GND 5V Signal, which outputs the signal to the pin of the processor
1 3 Connection of light sensor 你知道光敏传感器与机械臂怎么连接吗? GND and 5V correspond to GND and 5V pins respectively SIG is connected to EIO7 pin
4 Reading of the light sensor value Step 2: print the light data Operation log 4 Step 3: output continuously Step 1: set the type of the interface EIO7 Step 2: print the light data
Exercise 1 5 Write a program to obtain the value of the light sensor, and through the light control, find out the maximum value and the minimum value of the light sensing data received.
III. Skills competition
It is time to operate by yourself!
I control my manipulator Operation purpose: further exercise of the manipulator and light sensor Operation task: write a program to achieve the sensitive intelligent light
Program example Note: LED light is connected to EIO5, and the light sensor is connected to EIO7
IV. Classroom summary
Summary What have we learned in this lesson? -Connection and operation method of the light sensor -Reading of light data of light sensor -Write a program to achieve the application of switching on LED light automatically when the light is lower than a certain value -Review basic knowledge about electronics and function and operation method of the manipulator interface
After-class thinking In addition to the light sensor, are there other ways available to achieve the switching on/off of the light automatically? How to achieve?
THANK YOU