BEGINNER PROGRAMMING LESSON

Slides:



Advertisements
Similar presentations
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Display Block.
Advertisements

BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Switches.
Calibrating Color Sensors
By Droids Robotics INTERMEDIATE PROGRAMMING LESSON BRICK BUTTONS AS SENSORS.
By Sanjay and Arvind Seshan
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
By Sanjay and Arvind Seshan
By Sanjay and Arvind Seshan
By Sanjay and Arvind Seshan
Proportional Control with the Sound Sensor
Parallel Beam Synchronization
BEGINNER PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
By Sanjay and Arvind Seshan
SIMPLE & OPTIMIZED ULTRASONIC WALL FOLLOW
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON
Beginner Programming Lesson
BEGINNER PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
SIMPLE & OPTIMIZED ULTRASONIC WALL FOLLOW
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
By Sanjay and Arvind Seshan
Gyro Turns © 2015 EV3Lessons.com, Last edit 12/19/2015.
INTERMEDIATE PROGRAMMING LESSON
Parallel Beam Synchronization
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
BEGINNER PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
By Sanjay and Arvind Seshan
BEGINNER PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
Beginner Programming Lesson
INTERMEDIATE PROGRAMMING LESSON
Lesson 8: line following
By Sanjay and Arvind Seshan
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
BEGINNER PROGRAMMING LESSON
Repeating Actions (Loops)
Beginner Programming Lesson
Line Followers: Basic to Proportional
BEGINNER PROGRAMMING LESSONS
BEGINNER PROGRAMMING LESSON
BEGINNER PROGRAMMING Lesson
BEGINNER PROGRAMMING LESSON
Proportional Control with the Sound Sensor
Line Followers: Basic to Proportional
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
INTERMEDIATE PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSONS
By Sanjay and Arvind Seshan
By Sanjay and Arvind Seshan
BEGINNER PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
Presentation transcript:

BEGINNER PROGRAMMING LESSON Sound Block BEGINNER PROGRAMMING LESSON

LESSON OBJECTIVES Learn to use the Sound Block Understand why the Sound Block can be useful in programming Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Sound Block The Sound Block plays sounds to the EV3 You can play files, tones, and notes Located in Green Tab Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

MORE ON Sound Blocks Four Modes Stop Stop playing any sounds Play File Play a .rsf sound file This is used for playing sounds (eg. Hello) Play Tone Play any music note (eg. D, D#) Also plays custom frequencies via a data wire Play Note Play a key on a piano Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Inputs C D E A B F E A B A B Volume of sound Wait for the sound to finish before moving on Sound file name Frequency/Note of sound Duration of sound Piano note to play Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Sound BLOCK CHALLENGE 1 Make a program that plays hello after you press the touch sensor Hints: You will have to use a wait block You will have to use the sound block in File mode Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Challenge 1 solution Wait for touch Play Hello Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Sound block CHALLENGE 2 Pick up your robot and place it on different colors. Check if the color sensor reads black. If so, have the robot say “black”. If the color sensor sees red, have the robot say “red” For any other color, play a note of your choice for 0.01 seconds Make sure that the sound waits for completion Repeat this forever Bonus Challenge: Can you the above while having the robot move? Have the robot drive over different colors to test your code Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Challenge 2 Solution Loop forever If Black, play Black Switch set to measure color If Black, play Black Loop forever If Red, play Red Set as default Play a note for any other color Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Challenge 2 Bonus Solution Switch set to measure color If Black, play Black Loop forever Move on at 10 power If Red, play Red Set as default Play a note for any other color Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Additional Challenges Add more colors to the switch so that as the robot drives over additional colors, it say “green”, “blue”, “yellow”, etc. Make the code stop after the robot detects 5 colored bands Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

Discussion Guide Why might you want to know how to use the sound block? You might want to know what part of the code you are at. See Debugging lesson in Intermediate The sound block is a fun way to add emotion to your robot You can use sounds to interact with the user in a game by saying “good job”, “game over”, etc. Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)

CREDITS This tutorial was created by Sanjay Seshan and Arvind Seshan More lessons are available at www.ev3lessons.com                           This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Copyright © EV3Lessons.com 2016 (Last edit: 7/04/2016)