SlideShare a Scribd company logo
1 of 7
Download to read offline
Dpto de Tecnoloxía CPI de Atios Programación 1ºESO
mBot-Makeblock-Scratch
1 ReyesMontero
curso 2017
Practice 1 mBot; avoid obstacles
Programme mBot to be able to avoid any obstacle, wall ... Using the ultrasonic sensor.
The mBlock environment is similar to Scratch, so it will not be difficult for you to understand the
following commands, or to find the programming blocks.
1. We have to check in which port the ultrasound sensor is connected (which will measure
the distances). In this programming it appears in port nº 10 but in your robot it can be
different.
2. We establish the verification distance in 15 cm..
3. If the distance is less than 8 cm, the robot must retreat at a speed of maximum of 100.
4. If the distance is less than 50 cm, turn to the right at the average speed (50), if it is not less
than 50, it turns to the left.
5. If the distance is not less than 15, move forward.
Check the maze distances are enough, if not, you correct and adapt the programming.
Dpto de Tecnoloxía CPI de Atios Programación 1ºESO
mBot-Makeblock-Scratch
2 ReyesMontero
curso 2017
Practice 2 mBot; playing with the colours of light (LED)
The 12 RedGreenBlue LEDs of mBotRangerson are very cool, they are placed in a circle.
Each RGB LED can be programmed to control the brightness of the three colours (red, green and
blue) and combine these three colours to produce different colours of light.
Now, we will learn how to control the RGB LEDs with blocks:
The Auriga board of mBot contains 12 LEDs. If we choose the option "all" we can control the colour of the
12 LEDs. If we selected a number "2" we could control the colour of the LED number 2. The minimum value
of light is "0" and the maximum light is 255.
1. You can try different values for the Red, Green and Blue and observe what colour comes out.
2.Do you find out what color comes up by putting the next block?
If we want to change colour, we will
have to add some waiting time (0.5 seconds) to be able to observe it.
You can also put a different colour for each LED.
1. Now we programme the following algorithm:
2. Next, design your own colour sequence.
When you finished, save it with the name programme-Practice2. playing with colors and upload the Virtual Classroom.
Dpto de Tecnoloxía CPI de Atios Programación 1ºESO
mBot-Makeblock-Scratch
3 ReyesMontero
curso 2017
Practice 3.- Produce music with mBot
With this simple program, the robot plays different
notes and repeats them twice.
Could you programme the robot to play a simple song? For example Beethoven's "Ode to Joy".
• Note the letters to identify musical notes (Do = C = D Re, Mi = E, F = Fa, Sol = G, A = A, B = Si)
• The number corresponds to the scale (1,2,3,4,5)
• The pulse corresponds to the duration (Minim = 2, Quarter note = 1, Quaver= 1/2, Semiquaver =
1/4, Demisemiquaver = 1/8)
Dpto de Tecnoloxía CPI de Atios Programación 1ºESO
mBot-Makeblock-Scratch
4 ReyesMontero
curso 2017
Practice 3.1.- We program the song of "happy birthday"
With this program, repeated continuously (cyclically) a
sequence (forever)
1. Turn on all LEDs in red
2. Play different notes
3. Wait 0.4 sec
4. Turn on the LEDs in green
5. Repeat notes
6. Wait
In the table below, there is an equivalence of notes and
sound frequencies, the higher the frequency, the acute the
sound.
DO RE MI FA SOL LA SI
NOTA C2 D2 E2 F2 G2 A2 B2
Frecuencia Hz 65.4 73.4 82.4 87.3 98.0 110.0 123.5
NOTA C3 D3 E3 F3 G2 A3 B3
Frecuencia Hz 130.8 146.8 164.8 174.6 196.0 220.0 246.9
NOTA C4 D4 E4 F4 G4 A4 B4
Frecuencia Hz 261.6 293.6 329.6 349.2 392.0 440.0 493.9
NOTA C5 D5 E5 F5 G5 A5 B5
Frecuencia Hz 523.2 587.3 659.3 698.5 784.0 880.0 987.8
NOTA C6 D6 E6 F6 G6 A6 B6
Frecuencia Hz 1046.5 1174.7 1318.5 1397.0 1568.0 1760.0 1975.5
NOTA C7 D7 E7 F7 G7 A7 B7
Frecuencia Hz 2093.0 2349.3 2637.0 2793.8 3136.0 3520.0 3951.1
NOTA C8 D8 E8 F8 G8 A8 B8
Frecuencia Hz 4186. 0 4698.6 5274.0 5587.7 6271.9 7040.0 7902.1
Dpto de Tecnoloxía CPI de Atios Programación 1ºESO
mBot-Makeblock-Scratch
5 ReyesMontero
curso 2017
Practice 4.- The mBot follows the light of a flashlight
To the left and right of the LED ring, the robot has two light sensors (LDR) "ligth_sensor 1" and
"light_sensor2"
First of all we must calibrate or test the ambient light of the room where we are, and also when we
approach the light of a flashlight. We will use the following command ;
For this program to work, you must restore the default software on mBotRanger
Connect menu - Restore the default program - mBotRanger
Once the ambient light has been checked, we must programme it to follow the lantern light, which
should be higher than the one set for ambient light.
• If light is detected >200 by the right sensor,
then it turns to the right, and it plays a sound.
• If light is detected >200 by the left sensor, then
it turns left and plays another sound different.
• If it does not detect light >200 then it moves
forward.
Now you:
Try changing the values of the light sensor because
this programme works in the dark. If you do not get
darkness in the room, you are able to get dark you
must change the values of the light sensor to values
higher than what you originally measured.
Dpto de Tecnoloxía CPI de Atios Programación 1ºESO
mBot-Makeblock-Scratch
6 ReyesMontero
curso 2017
Practice 5.- mBot follows a line
With the module "follow-lines" we can get the robot to move along a black line on a white
surface or vice versa. This sensor is placed at low side front of the robot.
This sensor consists of 2 electronic components: an LED that emits light and a PHOTOTRANSISTOR
IR (photodiode) that receives the reflected light signal.
The black surfaces reflect little light. The white surfaces reflect a lot of light.
Let's create a variable (black_line); the value sent
by the sensor may be (0,1,2,3)
• If the value is = 0 then it is on the black line,
and it will continue straight.
• If the value is = 1, then it does not detect
the line with the right sensor, and it must rotate
to the left.
• If the value is = 2 then it does not detect
the line with the left sensor and must rotate to
the right.
• If the value is = 3, does not detect the
black line with any sensor and must backtrack.
• The speed must not be too high, so that it
does not get out the path (80) and we will adjust.
Now you:
How would the programme be if we want to follow a white line on a black background?
Dpto de Tecnoloxía CPI de Atios Programación 1ºESO
mBot-Makeblock-Scratch
7 ReyesMontero
curso 2017
Practice 6.- We measure the temperature with mBot
The board of our mbot contains a temperature sensor that offers analog measurement of temperature in the
range of approximately - 40 °C to +125 °C. (-40ºF to 275ºF)
This is a NTC thermistor. The thermistor bases its operation on the variation that suffers the resistance of the
semiconductor material whena change in temperature occurs. It NTC (NegativeTemperatureCoefficient), the
strength of the semiconductor decreases with increasing temperature.
We will use the following command;
In the following example we will schedule to show us on the makeBlok
screen of the computer, at room temperature at three different
temperature ranges: Fahrenheit, Celsius and Kelvin.
To do this, we create three variables (temperature in ° C, ºK and ºF) that are associated with each of the
scales
• Direct measurement in ºCelsius (Centigrade)
• Measurement in degrees Kelvin = ºC + 273
The "penguin" object will tell us every 6 seconds, the numerical value of the temperature (approximate value
using the rounding function) on the three scales.
The programme would look like this:
In order for this program to work, you must restore the default software to mBotRanger
Connect menu - Restore the default program - mBotRanger

More Related Content

Similar to Práctica 1 a 7 m bot ingles

GDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationGDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationMithi Sevilla
 
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)Una Tao
 
Presentation2 1-150523155048-lva1-app6892
Presentation2 1-150523155048-lva1-app6892Presentation2 1-150523155048-lva1-app6892
Presentation2 1-150523155048-lva1-app6892Nirav rathod
 
The Doppler EffectWhat is the Doppler effect, and why is it impo.docx
The Doppler EffectWhat is the Doppler effect, and why is it impo.docxThe Doppler EffectWhat is the Doppler effect, and why is it impo.docx
The Doppler EffectWhat is the Doppler effect, and why is it impo.docxcherry686017
 
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Shu Shin
 
Pablo Magani - BCI SSVEP Speller
Pablo Magani - BCI SSVEP SpellerPablo Magani - BCI SSVEP Speller
Pablo Magani - BCI SSVEP SpellerPablo Magani
 
ECET 105 help A Guide to career/Snaptutorial
ECET 105 help A Guide to career/SnaptutorialECET 105 help A Guide to career/Snaptutorial
ECET 105 help A Guide to career/Snaptutorialpinck199
 
ECET 105 help A Guide to career/Snaptutorial
 ECET 105 help A Guide to career/Snaptutorial ECET 105 help A Guide to career/Snaptutorial
ECET 105 help A Guide to career/Snaptutorialpinck243
 
Microcontroladores: Programación del microcontrolador PIC en C
Microcontroladores: Programación del microcontrolador PIC en CMicrocontroladores: Programación del microcontrolador PIC en C
Microcontroladores: Programación del microcontrolador PIC en CSANTIAGO PABLO ALBERTO
 
Data representation in a computer
Data representation in a computerData representation in a computer
Data representation in a computerGirmachew Tilahun
 
Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Meifani Sumadijaya
 
Introduction to Arduino with ArduBlock & SparkFun LilyPad
Introduction to Arduino with ArduBlock & SparkFun LilyPadIntroduction to Arduino with ArduBlock & SparkFun LilyPad
Introduction to Arduino with ArduBlock & SparkFun LilyPadBrian Huang
 
Electronz_Chapter_6.pptx
Electronz_Chapter_6.pptxElectronz_Chapter_6.pptx
Electronz_Chapter_6.pptxMokete5
 
Smart Safety Door based on Arduino Uno R3
Smart Safety Door based on Arduino Uno R3Smart Safety Door based on Arduino Uno R3
Smart Safety Door based on Arduino Uno R3Ziddan Kundrat
 
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors B...
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors  B...Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors  B...
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors B...Faqih Fadhila Ardiansyah
 
Application in comprog
Application in comprogApplication in comprog
Application in comprogMARKVILLAPLAZA
 
Camp Cosmos robotics workshop
Camp Cosmos robotics workshopCamp Cosmos robotics workshop
Camp Cosmos robotics workshopEdward Gomez
 

Similar to Práctica 1 a 7 m bot ingles (20)

GDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationGDGPH Hack Fair Presentation
GDGPH Hack Fair Presentation
 
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
 
Switch Control and Time Delay - Keypad
Switch Control and Time Delay - KeypadSwitch Control and Time Delay - Keypad
Switch Control and Time Delay - Keypad
 
Presentation2 1-150523155048-lva1-app6892
Presentation2 1-150523155048-lva1-app6892Presentation2 1-150523155048-lva1-app6892
Presentation2 1-150523155048-lva1-app6892
 
The Doppler EffectWhat is the Doppler effect, and why is it impo.docx
The Doppler EffectWhat is the Doppler effect, and why is it impo.docxThe Doppler EffectWhat is the Doppler effect, and why is it impo.docx
The Doppler EffectWhat is the Doppler effect, and why is it impo.docx
 
publish manual
publish manualpublish manual
publish manual
 
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
 
Pablo Magani - BCI SSVEP Speller
Pablo Magani - BCI SSVEP SpellerPablo Magani - BCI SSVEP Speller
Pablo Magani - BCI SSVEP Speller
 
ECET 105 help A Guide to career/Snaptutorial
ECET 105 help A Guide to career/SnaptutorialECET 105 help A Guide to career/Snaptutorial
ECET 105 help A Guide to career/Snaptutorial
 
ECET 105 help A Guide to career/Snaptutorial
 ECET 105 help A Guide to career/Snaptutorial ECET 105 help A Guide to career/Snaptutorial
ECET 105 help A Guide to career/Snaptutorial
 
Microcontroladores: Programación del microcontrolador PIC en C
Microcontroladores: Programación del microcontrolador PIC en CMicrocontroladores: Programación del microcontrolador PIC en C
Microcontroladores: Programación del microcontrolador PIC en C
 
Data representation in a computer
Data representation in a computerData representation in a computer
Data representation in a computer
 
Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3
 
Introduction to Arduino with ArduBlock & SparkFun LilyPad
Introduction to Arduino with ArduBlock & SparkFun LilyPadIntroduction to Arduino with ArduBlock & SparkFun LilyPad
Introduction to Arduino with ArduBlock & SparkFun LilyPad
 
Electronz_Chapter_6.pptx
Electronz_Chapter_6.pptxElectronz_Chapter_6.pptx
Electronz_Chapter_6.pptx
 
Smart Safety Door based on Arduino Uno R3
Smart Safety Door based on Arduino Uno R3Smart Safety Door based on Arduino Uno R3
Smart Safety Door based on Arduino Uno R3
 
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors B...
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors  B...Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors  B...
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors B...
 
Application in comprog
Application in comprogApplication in comprog
Application in comprog
 
Camp Cosmos robotics workshop
Camp Cosmos robotics workshopCamp Cosmos robotics workshop
Camp Cosmos robotics workshop
 
Arduino: Arduino starter kit
Arduino: Arduino starter kitArduino: Arduino starter kit
Arduino: Arduino starter kit
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 

Práctica 1 a 7 m bot ingles

  • 1. Dpto de Tecnoloxía CPI de Atios Programación 1ºESO mBot-Makeblock-Scratch 1 ReyesMontero curso 2017 Practice 1 mBot; avoid obstacles Programme mBot to be able to avoid any obstacle, wall ... Using the ultrasonic sensor. The mBlock environment is similar to Scratch, so it will not be difficult for you to understand the following commands, or to find the programming blocks. 1. We have to check in which port the ultrasound sensor is connected (which will measure the distances). In this programming it appears in port nº 10 but in your robot it can be different. 2. We establish the verification distance in 15 cm.. 3. If the distance is less than 8 cm, the robot must retreat at a speed of maximum of 100. 4. If the distance is less than 50 cm, turn to the right at the average speed (50), if it is not less than 50, it turns to the left. 5. If the distance is not less than 15, move forward. Check the maze distances are enough, if not, you correct and adapt the programming.
  • 2. Dpto de Tecnoloxía CPI de Atios Programación 1ºESO mBot-Makeblock-Scratch 2 ReyesMontero curso 2017 Practice 2 mBot; playing with the colours of light (LED) The 12 RedGreenBlue LEDs of mBotRangerson are very cool, they are placed in a circle. Each RGB LED can be programmed to control the brightness of the three colours (red, green and blue) and combine these three colours to produce different colours of light. Now, we will learn how to control the RGB LEDs with blocks: The Auriga board of mBot contains 12 LEDs. If we choose the option "all" we can control the colour of the 12 LEDs. If we selected a number "2" we could control the colour of the LED number 2. The minimum value of light is "0" and the maximum light is 255. 1. You can try different values for the Red, Green and Blue and observe what colour comes out. 2.Do you find out what color comes up by putting the next block? If we want to change colour, we will have to add some waiting time (0.5 seconds) to be able to observe it. You can also put a different colour for each LED. 1. Now we programme the following algorithm: 2. Next, design your own colour sequence. When you finished, save it with the name programme-Practice2. playing with colors and upload the Virtual Classroom.
  • 3. Dpto de Tecnoloxía CPI de Atios Programación 1ºESO mBot-Makeblock-Scratch 3 ReyesMontero curso 2017 Practice 3.- Produce music with mBot With this simple program, the robot plays different notes and repeats them twice. Could you programme the robot to play a simple song? For example Beethoven's "Ode to Joy". • Note the letters to identify musical notes (Do = C = D Re, Mi = E, F = Fa, Sol = G, A = A, B = Si) • The number corresponds to the scale (1,2,3,4,5) • The pulse corresponds to the duration (Minim = 2, Quarter note = 1, Quaver= 1/2, Semiquaver = 1/4, Demisemiquaver = 1/8)
  • 4. Dpto de Tecnoloxía CPI de Atios Programación 1ºESO mBot-Makeblock-Scratch 4 ReyesMontero curso 2017 Practice 3.1.- We program the song of "happy birthday" With this program, repeated continuously (cyclically) a sequence (forever) 1. Turn on all LEDs in red 2. Play different notes 3. Wait 0.4 sec 4. Turn on the LEDs in green 5. Repeat notes 6. Wait In the table below, there is an equivalence of notes and sound frequencies, the higher the frequency, the acute the sound. DO RE MI FA SOL LA SI NOTA C2 D2 E2 F2 G2 A2 B2 Frecuencia Hz 65.4 73.4 82.4 87.3 98.0 110.0 123.5 NOTA C3 D3 E3 F3 G2 A3 B3 Frecuencia Hz 130.8 146.8 164.8 174.6 196.0 220.0 246.9 NOTA C4 D4 E4 F4 G4 A4 B4 Frecuencia Hz 261.6 293.6 329.6 349.2 392.0 440.0 493.9 NOTA C5 D5 E5 F5 G5 A5 B5 Frecuencia Hz 523.2 587.3 659.3 698.5 784.0 880.0 987.8 NOTA C6 D6 E6 F6 G6 A6 B6 Frecuencia Hz 1046.5 1174.7 1318.5 1397.0 1568.0 1760.0 1975.5 NOTA C7 D7 E7 F7 G7 A7 B7 Frecuencia Hz 2093.0 2349.3 2637.0 2793.8 3136.0 3520.0 3951.1 NOTA C8 D8 E8 F8 G8 A8 B8 Frecuencia Hz 4186. 0 4698.6 5274.0 5587.7 6271.9 7040.0 7902.1
  • 5. Dpto de Tecnoloxía CPI de Atios Programación 1ºESO mBot-Makeblock-Scratch 5 ReyesMontero curso 2017 Practice 4.- The mBot follows the light of a flashlight To the left and right of the LED ring, the robot has two light sensors (LDR) "ligth_sensor 1" and "light_sensor2" First of all we must calibrate or test the ambient light of the room where we are, and also when we approach the light of a flashlight. We will use the following command ; For this program to work, you must restore the default software on mBotRanger Connect menu - Restore the default program - mBotRanger Once the ambient light has been checked, we must programme it to follow the lantern light, which should be higher than the one set for ambient light. • If light is detected >200 by the right sensor, then it turns to the right, and it plays a sound. • If light is detected >200 by the left sensor, then it turns left and plays another sound different. • If it does not detect light >200 then it moves forward. Now you: Try changing the values of the light sensor because this programme works in the dark. If you do not get darkness in the room, you are able to get dark you must change the values of the light sensor to values higher than what you originally measured.
  • 6. Dpto de Tecnoloxía CPI de Atios Programación 1ºESO mBot-Makeblock-Scratch 6 ReyesMontero curso 2017 Practice 5.- mBot follows a line With the module "follow-lines" we can get the robot to move along a black line on a white surface or vice versa. This sensor is placed at low side front of the robot. This sensor consists of 2 electronic components: an LED that emits light and a PHOTOTRANSISTOR IR (photodiode) that receives the reflected light signal. The black surfaces reflect little light. The white surfaces reflect a lot of light. Let's create a variable (black_line); the value sent by the sensor may be (0,1,2,3) • If the value is = 0 then it is on the black line, and it will continue straight. • If the value is = 1, then it does not detect the line with the right sensor, and it must rotate to the left. • If the value is = 2 then it does not detect the line with the left sensor and must rotate to the right. • If the value is = 3, does not detect the black line with any sensor and must backtrack. • The speed must not be too high, so that it does not get out the path (80) and we will adjust. Now you: How would the programme be if we want to follow a white line on a black background?
  • 7. Dpto de Tecnoloxía CPI de Atios Programación 1ºESO mBot-Makeblock-Scratch 7 ReyesMontero curso 2017 Practice 6.- We measure the temperature with mBot The board of our mbot contains a temperature sensor that offers analog measurement of temperature in the range of approximately - 40 °C to +125 °C. (-40ºF to 275ºF) This is a NTC thermistor. The thermistor bases its operation on the variation that suffers the resistance of the semiconductor material whena change in temperature occurs. It NTC (NegativeTemperatureCoefficient), the strength of the semiconductor decreases with increasing temperature. We will use the following command; In the following example we will schedule to show us on the makeBlok screen of the computer, at room temperature at three different temperature ranges: Fahrenheit, Celsius and Kelvin. To do this, we create three variables (temperature in ° C, ºK and ºF) that are associated with each of the scales • Direct measurement in ºCelsius (Centigrade) • Measurement in degrees Kelvin = ºC + 273 The "penguin" object will tell us every 6 seconds, the numerical value of the temperature (approximate value using the rounding function) on the three scales. The programme would look like this: In order for this program to work, you must restore the default software to mBotRanger Connect menu - Restore the default program - mBotRanger