SlideShare a Scribd company logo
LOOP
WHAT IS
DICTIONARY
Structure, series or process in which the
end is connected to the beginning.
LOOP
COMPUTER
reiteration of a set of instructions in a
routine or program.
PROGRAMMING
Follows the program flow and sends
the flow back to the beginning and runs
again
Repeats the program in a certain
number of times
ROBOTC
LOOP
ROBOTC
LOOP
 It will execute the code inside of its braces
for the specified number of times.
ROBOTC
LOOP EXAMPLE
The robot will move forward for 2 rotations
and stop for 1 second. It will repeat this
behavior 5 times total.
ROBOTC
LOOP
 It will execute the code inside of its braces
forever.
ROBOTC
LOOP EXAMPLE
The robot will move forward for 2 rotations
and stop for 1 second. It will repeat this
behavior forever.
ROBOTC
LOOP
 It will continually execute the code inside
of its braces until the specified condition is
true.
ROBOTC
LOOP EXAMPLE
The robot will move forward until the left
encoder reaches 720 counts (about 2
rotations), then the robot will stop.
ROBOTC
LOOP
 It will continually execute the code inside
of its braces while the specified condition
is true.
ROBOTC
LOOP EXAMPLE
The robot will move forward while the left
motor's encoder is less than 720 counts, then
it will stop its motors.
Direction: Write the correct answer for
each question.
1. A loop which execute the code inside of its braces for the specified number of times.
2. A loop which execute the code inside of its braces forever.
3. A loop which continually execute the code inside of its braces until the specified
condition is true.
4. The robot will move forward for 2 rotations and stop for 1 second. It will repeat this
behavior 5 times total. What type of loop is given?
5. Which of the three repeat loops can be used as a conditional block?
Square Dance Challenge
Program your robot to run around
the box two times.
Turn on touchLED to green after the
challenge.
ROBOTC
IF/ELSE

More Related Content

Similar to Loop

Loop and switch
Loop and switchLoop and switch
Loop and switch
Usain_21
 
Ai turning2 - Beginner
Ai   turning2 - BeginnerAi   turning2 - Beginner
Ai turning2 - Beginner
Romaric Saounde Tsopnang
 
Camp Cosmos robotics workshop
Camp Cosmos robotics workshopCamp Cosmos robotics workshop
Camp Cosmos robotics workshop
Edward Gomez
 
To Loop or Not to Loop: Overcoming Roadblocks with FME
To Loop or Not to Loop: Overcoming Roadblocks with FMETo Loop or Not to Loop: Overcoming Roadblocks with FME
To Loop or Not to Loop: Overcoming Roadblocks with FME
Safe Software
 
Unit IV.pptx Robot programming and Languages
Unit IV.pptx Robot programming and LanguagesUnit IV.pptx Robot programming and Languages
Unit IV.pptx Robot programming and Languages
Balamech4
 
Loops
LoopsLoops
Obstacle avoiding robot
Obstacle avoiding robotObstacle avoiding robot
Obstacle avoiding robot
Electronics - Embedded System
 
Obstacle Avoiding Robot Using Micro Controller
Obstacle Avoiding Robot Using Micro ControllerObstacle Avoiding Robot Using Micro Controller
Obstacle Avoiding Robot Using Micro Controller
Electronics - Embedded System
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
tdc-globalcode
 
Práctica 1 a 7 m bot ingles
Práctica 1 a 7 m bot inglesPráctica 1 a 7 m bot ingles
Práctica 1 a 7 m bot ingles
Departamento Tecnoloxia do CPI de Atios
 
Loop structures
Loop structuresLoop structures
Loop structures
tazeem sana
 
7 Steps to Autonomous for FRC LabVIEW Programmers
7 Steps to Autonomous for FRC LabVIEW Programmers7 Steps to Autonomous for FRC LabVIEW Programmers
7 Steps to Autonomous for FRC LabVIEW ProgrammersOregon FIRST Robotics
 
Newppt major
Newppt majorNewppt major
Newppt major
Shivangi Jain
 
Cse lecture-7-c loop
Cse lecture-7-c loopCse lecture-7-c loop
Cse lecture-7-c loop
FarshidKhan
 
Arduino based applications-part 3
Arduino based applications-part 3Arduino based applications-part 3
Arduino based applications-part 3
Jawaher Abdulwahab Fadhil
 
Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3a
Ruth Marvin
 
How to make your first robot report
How to make your first robot reportHow to make your first robot report
How to make your first robot report
Ramki M
 
Coding in Disaster Relief - Worksheet (Advanced)
Coding in Disaster Relief - Worksheet (Advanced)Coding in Disaster Relief - Worksheet (Advanced)
Coding in Disaster Relief - Worksheet (Advanced)Charling Li
 

Similar to Loop (20)

Loop and switch
Loop and switchLoop and switch
Loop and switch
 
Intro to RobotC
Intro to RobotCIntro to RobotC
Intro to RobotC
 
Ai turning2 - Beginner
Ai   turning2 - BeginnerAi   turning2 - Beginner
Ai turning2 - Beginner
 
Camp Cosmos robotics workshop
Camp Cosmos robotics workshopCamp Cosmos robotics workshop
Camp Cosmos robotics workshop
 
To Loop or Not to Loop: Overcoming Roadblocks with FME
To Loop or Not to Loop: Overcoming Roadblocks with FMETo Loop or Not to Loop: Overcoming Roadblocks with FME
To Loop or Not to Loop: Overcoming Roadblocks with FME
 
mini proj_UNIKLBMI
mini proj_UNIKLBMImini proj_UNIKLBMI
mini proj_UNIKLBMI
 
Unit IV.pptx Robot programming and Languages
Unit IV.pptx Robot programming and LanguagesUnit IV.pptx Robot programming and Languages
Unit IV.pptx Robot programming and Languages
 
Loops
LoopsLoops
Loops
 
Obstacle avoiding robot
Obstacle avoiding robotObstacle avoiding robot
Obstacle avoiding robot
 
Obstacle Avoiding Robot Using Micro Controller
Obstacle Avoiding Robot Using Micro ControllerObstacle Avoiding Robot Using Micro Controller
Obstacle Avoiding Robot Using Micro Controller
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
Práctica 1 a 7 m bot ingles
Práctica 1 a 7 m bot inglesPráctica 1 a 7 m bot ingles
Práctica 1 a 7 m bot ingles
 
Loop structures
Loop structuresLoop structures
Loop structures
 
7 Steps to Autonomous for FRC LabVIEW Programmers
7 Steps to Autonomous for FRC LabVIEW Programmers7 Steps to Autonomous for FRC LabVIEW Programmers
7 Steps to Autonomous for FRC LabVIEW Programmers
 
Newppt major
Newppt majorNewppt major
Newppt major
 
Cse lecture-7-c loop
Cse lecture-7-c loopCse lecture-7-c loop
Cse lecture-7-c loop
 
Arduino based applications-part 3
Arduino based applications-part 3Arduino based applications-part 3
Arduino based applications-part 3
 
Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3a
 
How to make your first robot report
How to make your first robot reportHow to make your first robot report
How to make your first robot report
 
Coding in Disaster Relief - Worksheet (Advanced)
Coding in Disaster Relief - Worksheet (Advanced)Coding in Disaster Relief - Worksheet (Advanced)
Coding in Disaster Relief - Worksheet (Advanced)
 

Recently uploaded

Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Loop

  • 1.
  • 2.
  • 4. WHAT IS DICTIONARY Structure, series or process in which the end is connected to the beginning. LOOP COMPUTER reiteration of a set of instructions in a routine or program. PROGRAMMING Follows the program flow and sends the flow back to the beginning and runs again Repeats the program in a certain number of times
  • 6. ROBOTC LOOP  It will execute the code inside of its braces for the specified number of times.
  • 7. ROBOTC LOOP EXAMPLE The robot will move forward for 2 rotations and stop for 1 second. It will repeat this behavior 5 times total.
  • 8. ROBOTC LOOP  It will execute the code inside of its braces forever.
  • 9. ROBOTC LOOP EXAMPLE The robot will move forward for 2 rotations and stop for 1 second. It will repeat this behavior forever.
  • 10. ROBOTC LOOP  It will continually execute the code inside of its braces until the specified condition is true.
  • 11. ROBOTC LOOP EXAMPLE The robot will move forward until the left encoder reaches 720 counts (about 2 rotations), then the robot will stop.
  • 12. ROBOTC LOOP  It will continually execute the code inside of its braces while the specified condition is true.
  • 13. ROBOTC LOOP EXAMPLE The robot will move forward while the left motor's encoder is less than 720 counts, then it will stop its motors.
  • 14. Direction: Write the correct answer for each question. 1. A loop which execute the code inside of its braces for the specified number of times. 2. A loop which execute the code inside of its braces forever. 3. A loop which continually execute the code inside of its braces until the specified condition is true. 4. The robot will move forward for 2 rotations and stop for 1 second. It will repeat this behavior 5 times total. What type of loop is given? 5. Which of the three repeat loops can be used as a conditional block?
  • 15. Square Dance Challenge Program your robot to run around the box two times. Turn on touchLED to green after the challenge.