ev3 programming - unified robotics
TRANSCRIPT
![Page 1: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/1.jpg)
EV3 Programming
![Page 2: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/2.jpg)
Software Used: Ev3 Education
Edition
Can be downloaded here:
https://education.lego.com/en-us/downloads/mindstorms-ev3/software
![Page 3: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/3.jpg)
Creating a New File
Got to file in the upper left-hand corner, hover over new project, and select program. A new window named “Project” should pop up.
![Page 4: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/4.jpg)
Programming Basics
• At the bottom of the screen are colored tabs that represent different categories of code blocks.
• By default, the program is open on the green tab of code blocks, which are the “Action” blocks.
![Page 5: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/5.jpg)
Action
• In the middle of the green section are the 2 “Move” blocks: Move Steering and Move Tank, which both use motor ports B and C on the brick.
• Move Steering
• Move Tank
Move Steering
MoveTank
Large Motor
MediumMotor
Display Sound BrickStatusLight
![Page 6: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/6.jpg)
Block Properties
Number of RotationsFrom motors (exclusiveTo On for Rotations)
Power (1-100)
Direction of Steering
Turning setting(On,On for SecondsOn for DegreesOn for Rotations)
Left Power
Right Power
Number of RotationsFrom motors (exclusiveTo On for Rotations)
![Page 7: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/7.jpg)
Simple Program Example
• This program will make the robot go forward 10 rotations, turn for one rotation, and then go 10 more rotations.
![Page 8: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/8.jpg)
Sensors
BrickButtons
ColorSensor
GyroSensor
MotorRotation
Timer TouchSensor
UltrasonicSensor
Useful to have when you need to trigger an event
![Page 9: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/9.jpg)
Flow Control• This section contains
all the blocks for sequencing
• Loops are essential for making continuing programs
• Switches are used to allow two different outcomes. Can be determined directly by sensor input.
LoopWaitStart (inProgram bydefault)
Switch Loop Interrupt
![Page 10: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/10.jpg)
Switch Options
Here are the many options of triggering the switch, most of which have to do with sensors.
![Page 11: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/11.jpg)
Sample Switch and Loop Program
This program will move forward when
The ultrasonic sensor detects a distance less than 50 cm, and will stop otherwise.
![Page 12: EV3 Programming - Unified Robotics](https://reader031.vdocuments.net/reader031/viewer/2022022121/621293fced2af555bb2b6a57/html5/thumbnails/12.jpg)
Have Fun Programming!