Serial panel using SONAR
Serial panel using SONAR
Monitor
2024 to 2025
Objectives
Serial Monitor
Trig
Schematic Diagram
Arduino pin LED color
8 Red
9 Red
Arduino pin configuration
LEDs 10 Yellow
11 Yellow
12 Green
13 Green
5 Trig
4 Echo
SONAR 5V 5V
GND GND
2 Buzzer signal
Buzzer
Blocks Overview
Operators in programming
1. Less Than:
2. Greater Than:
3. Equal To:
4. And:
5. Or: Not:
Distance sensor block calculate distance in cm. To use this block you need to select trig and echo pins same
as you connected with arduino
Trig
Conditions in programming
Conditions are basic “if, else” logic statements that modify how code is executed. Conditions are a key part
of the decision-making process for computers.
Example
Add operators and distance block here to compare or
check condition
Blocks
Example code
Nested Conditions
Blocks
Screenshot
● Press Shift + window+s keys together from
keyboard
● Save screenshot on desktop
● Turn-in
Display distance with 1 second delay and baud rate 9600 on Pictoblox serial
monitor.
Serial Monitor
Guidelines:
1. Serial monitor is located lower right side of pictoblox app.
check slide: 5
2. Use communication extension to code & use serial monitor.
check slide: 5
3. Use joining operator. check slide: 10
4. Use distance sensor block. check slide: 12
5. Use loop to keep repeating the process
1. Make your code in pictobox App and upload in robot to check.
2. Once you confirm your all tasks are working properly TURN IN for evaluation.
Convert distance from cm to Inch and display distance on serial panel in both cm
and inch
Hints Scale
1. Use arithmetic operators to calculate/ convert
distance
2. Use communication blocks to use serial panel
3. Use joining operator to join different terms.
4. Use distance sensor block to get data from
sensor
5. Use loop to keep repeating the operation
Output example