Want to create interactive content? It’s easy in Genially!

Get started free

Ingles- Arduino- Tema 19

TEAM EGB4 TECHNOLOGY

Created on February 27, 2023

Start designing with a free template

Discover more than 1500 professional designs like these:

Transcript

cartoonist robot

start

We are currently going through constant changes in the climate and in several of its main variables, such as temperature and humidity.

What is it about?

In this activity we will build a tall structure in which we will place the ULTRASONIC Sensor pointing towards the floor. In the same upper part we will place a Bicolor LED that will indicate, with a red light, if the Ultrasonic Sensor detects an object (in this case, a car) in the parking spot. If the Ultrasonic Sensor does not detect any object, the Led will turn on a green light and indicate that parking is available.

Download the program here:

Download the manual here:

Link

Read more

Once downloaded, drag and drop the file onto mBlock to be able to program your robot.

In our project, we established that the limit distance, which will be measured by the ULTRASOUND Sensor, is 10 cm. If the sensor takes a greater distance, it means that the place is empty. It is important to note that the value of “distance” It can vary and must be defined based on the structure built by each team.

Goals:

  • Approach the knowledge and management of different electronic components by building an intelligent parking lot.
  • Analyze the operation of Ultrasonic distance sensors.
  • Analyze the use of visual signals in everyday life.

parts and devices

  • R8 Smart Brick
  • Battery
  • Ultrasonic Sensor
  • Bicolor
  • LEDRj11 Cables

Sensors and Actuators

ultrasonic sensor:

It is a component that uses high frequency waves to know the distance that separates it from an object. This type of sensor has two parts, one is the transmitter that emits the signal and the other is the receiver that receives the signal when it bounces off some nearby obstacle.

Bicolor LED

An LED is a light-emitting diode, that is, a particular type of diode that emits light when passed through by an electric current. In particular, the bicolor LED has the possibility of having a green color, a red color, or a mixture of both, achieving a tonality. orange. It is ideal to give light and colors to our Robotic constructions. It can be used in all ports of "R8".

To connect the components!

  • Connect the Ultrasonic to CON1 (Digital Pin 11 and 12) of the Smart Brick «R8»
  • Connect the Bicolor Led to CON3 (Digital Pin 13 and 4) of the Intelligent Brick «R8»

It's time to program!

Loop start foreverIf the value of the distance captured in the connector (Ultrasonic) is less than 10

  • The red light of the Bicolor LED turns on. If the value of the distance captured in the connector (Ultrasonic) is greater than 10
  • The green light of the Bicolor LED turns on.
Returns to the beginning of the Loop forever

Program download:

Link

Arming of the Program

We will use the following blocks:

Events:

  • "When turning on the R8"
Control:
  • «Forever» that will execute the action indefinitely
  • «If/Then/Else» that executes instructions conditionally depending on whether it is true or false.

Challenge to Solve

Modify the program to be able to count the vehicles that occupied the parking lot during the development of the class. This count must be displayed through the Arduino "Serial Monitor".