Summer Sale: 5% OFF Over $49, Code: Elephant5; 10% OFF Over $99, Code:Elephant10



Yahboom Omibox Robot Kit Basic Course 3.5 Automatic lighting

Posted by SuFiona on

Yahboom Omibox Robot Kit Basic Course 3.5 Automatic lighting

1.Preparation

1-1.The position of the Photo-resistor in the robot car

1-2. Learn how to use Photo-resistor graphically program building blocks

image.png

As shown in the figure above, we circled the red wire frame with a Photo-resistor, and we can use it  by programming.

2.Learning goals

In this lesson, we will learn about the use of Photo-resistor. When the light intensity is weak (night), the lights are on; when the light intensity is strong (day), the lights are off.

3.Search for blocks

image.png

image.png

image.png

4.Combine blocks

image.png

How to get threshold

1)Write the program shown below to display the value of the Photo-resistor output on the dot matrix.

image.png

2) Record the value A1 of the Photo-resistor output displayed on the dot matrix in the current environment.

3) Cover the light source sensor by your hand and record the value A2 of the Photo-resistor output displayed on the dot matrix at this time.

image.png

image.png

4)The threshold is a value in the middle of A1, A2.

5.Experimental phenomena

After the program is uploaded, the car is powered on normally. When the light is in a dark environment, the lights are turned on. When in a hight-brightness environment, the lights will be closed.

image.png 

image.png

The code of the experiment: 5.Automatic lighting.rar

0 comments

Leave a comment

Please note, comments must be approved before they are published