programming from an early age -with bee- bots! · programming language, which can therefore also be...
TRANSCRIPT
Programmingfromanearlyage- withBee-
Bots!©Kinderlabor®,2015- 2017
First,apolite request...
PleasenotethatKinderlabor ownsthecopyrightforthisscript.Inthecaseofuse/distributionoutsideyourschoolorbeyondthecopyrightlaw,weaskthatyouobtainpermissionfromus
beforehand.ThankyouJ
HowdoBee-BotshavetodowithIT?Computersciencerevolvesaroundtheautomaticsolutionofproblems.Forexample,wetrytofindthequickestconnectionfromAtoBataspecifictime withthehelpofatraintimetable.Peopleusedtodothisbylookingitupinaprintedtimetable.Nowadayscomputersaresupposedtorelieveusofthistaskbyreferringtoadigitaltimetableandshowingustheresultsofthesearchonawebpageorinanapp.
ThejobofITspecialistsistoteachthecomputerhowtodothat.Thisisdoneintwosteps.First,analgorithm ("recipe")mustbedesigned,thenthecomputermustbeprogrammed (fedwiththerecipe)sothatitcansolvetheproblemautomaticallyforusbyusingtherecipe.
ByusingtheBee-Bots,childrencanfindoutexactlyhowthisprocessworksinaverysimpleform.Forexample,theproblemcouldbethatthebeehastogettotheflower.ThechildrenfirstconsiderasuitablepathandthenprogramtheBee-Botsothatitrunsdownthatpathautomatically.Theskillsrequiredtoachievethisarethesameasfor"big"computerscience:forwardthinking,accuratework,creativityandteamwork.TheBee-BotworksverymuchlikeLOGO,a"real"programminglanguage,whichcanthereforealsobetaughtwithgreatereaseafterprogrammingwiththeBee-Bot.ProgrammingwithBee-Botscanthereforebeseenasanintroductiontocomputerscience.
Whatisprogramming?Programmingmeansgivingacomputer(orarobot)asequenceofcommandssothatitdoesexactlywhatwewantittodo.
Aprogram consistsofoneormorecommandsequences.Programsarewritteninaprogramminglanguageandthenrunbythecomputer.
Aprogramminglanguageisalanguagethatthecomputerunderstands.Itconsistsofcommandsthatcanbeusedwhenusingthecomputer.
Example:Bee-Bothasto"fly"totheflower.Itunderstandsfourdifferentcommands:onetellsittomoveonefieldforward,onetomovebackwards,anothertoturn90degreestotheleftandthelastinstructshimtoturn90degreestotheright.Thepathtotheflower(forexample,forward,leftturn,forward,forward,forward)isrecordedasaprogramwiththehelpofthecorrespondingcommandbutton.AfterpressingtheGObutton,theBee-Botfollowstheprogramtherebyreachingtheflowerasdirected.
TheprogramminglanguageoftheBee-Botisexplainedindetailonthenextpage.
TheBee-BotLanguageBee-Botunderstands- viabuttons -four differentcommands:
Moveone fieldforwards!
Turnonthe spotto the right!
Moveone fieldbackwards!
Turnonthe spotto the left!
LearningtheBee-Botcommands
Preparation:Thechildrenallsitinarow(allfacingthesamedirectionandwithenoughspacearoundthem).Theycannowplayrobotandcarryoutcommandsthemselves.
Procedure:Theinstructorpresentshim- orherselfselfinfrontofthechildren(facingthesamedirection),showsthemthefourbigcommandcardsoneafteranother,makingsureeveryonecanseethemanddemonstrateswhattheymean(onestepforward,onestepbackward,quarterturntotheright,quarterturntotheleft).
Thenitisthechildren‘sturn.Theinstructorstandsinfrontofthemandshowscommandsinsuccession,whicheachchildthenhastocarryout.Aftereachmovement,allthechildrenstopinthenewposition,andthentheprocedurecontinueswiththenextcommand.Iftheyalldoitright,theyshouldallmovetogetheratthesametime;atthebeginning,thechildrenoftengetconfusedbywhichdirectiontheyshouldbegoingin,andthechildrengetoutofsync.Beforegoinganyfurther,allerrorsshouldbeidentifiedandcorrectedtogether.
☺
☺
☺
☺
Thesmileyindicateswhichwayupthecardshouldberead.
Learningobjective:Thechildrenshouldknowthefourcommandsandbeabletocarrythemout.
UsingtheBee-BotcommandsPreparation:Anarraymadeupof4x4fieldsisaffixedtothefloorwithmaskingtape,sothatachildcaneasilystandonafield.Aflowercardisplacedononeofthefields.
Procedure:Theinstructorexplainsthetask:Achildactsasarobotandissteeredtotheflowerbytheotherchildrenwithoutusingwords.Theinstructorsetsthestartingfieldandoneofthefourdirectionsthechildistoface.Theotherchildrengivethe"robot" asequenceofcommandcardsthattellitwhattodoinordertosteerit.Therobotimmediatelycarriesouteachcommandandthenthenextcommandisselected.Ateachstep,theotherchildrencheckwhethertherobotis"workingcorrectly"(i.e.carryingoutthecommandsproperly)andwhetherthecommandsthemselvesarecorrect.Commandsthatsteertherobotoutsidethefieldarenotcorrect;thesecommandsmustberevoked.Commandsthatsendtherobotinthewrongdirectioncanbecorrectedagainwiththenextcommands.Iftherobotreachestheflower,itmustbe"charged",thatistosayanotherchildtakesitsplace(facingthesamedirection).Anotherchildcanthenplacetheflowerinanewfieldandtheprocedurecontinuesasbefore.
Learningobjective:Thechildrencanusethefourcommandsforaspecificpurposeanddeterminewhetherthemovemadebythe"robot" matchesthecommandtheygave.
FirstprogrammingProcedure:Thistimeeverythingisdoneasbeforebuttherobotgetsallthecommandsatonce,intheformofaprogram– i.e.abatchofcommandsthatareexecutedinasequence.Theinstructorexplainsthatitisnotpracticaltohavegototherobotaftereachstep.Itwouldbebettertogiveitallthecommandsatonceandthensitbackandwatchhowitdoesitsjob.Withthehelpofthechildren,theinstructorcreatesasuitablepileofcards,asintheexampleshownontheright,usingthefollowingfivecommands:
Sincetherobotisnotrunningwhiletheprogramisbeingcreated,thechildrenhavetoworkoutwhereitwouldbe.Thisprocesscanbesupportedbylayingoutthecardsonthefield(seenextpage).Thecardsarethenputintoapile(startwiththefirstcard,thenthenextcardunderthepile).Therobotnowgetsthefinishedpile– theprogram.Tocarryoutthetask,ittakesthetopcardfromthepile,carriesoutthecorrespondingmovementandplacesthecardbackunderthepilefacingdown(i.e."commandexecuted").Inthefirstround,theinstructorcanactouttheroleoftherobotanddemonstratethesequence.Ifallthecommandsareexecuted,thechildrenchecktoseeiftherobothasreachedthetargetdestination.
1. 2. 3. 4. 5.
☺☺ ☺
☺
☺
Layingoutthecards:
Forwards/backwardscards:between thestartandtargetfieldofeachstep
Turningcards:on thefieldonwhichtherobotshouldturn
Learningobjective:Thechildrencancreateaprogram- asequenceofcommandsthattherobotcanusetosolveapre-giventask.
FirstprogrammingVariants:The"robot"isblindfoldedbeforetheflowerisplacedonafield.Thechildrennowcreatetheprogram,andbeforetherobotcanseeagain,theflowerisremovedbutthechildrenrememberwhereitwas.Therobotthencarriesouttheprogram,andwhenithaslandedonthecorrectfieldattheend,everyoneclaps“welldone”toeachother.Alternatively,therobotcanalsowaitinanotherroomandcomeinwhentheprogramisfinished.Whencreatingtheprogram,thechildrenshouldworkasquietlyaspossible(evenwithoutwords!)sothattherobotcannothearanythingaboutwheretheflowerisbeingpositioned.
Checks:Iftherobotlandsonthewrongfield,thechildrenneedtofindouthowthishappened.Wastheprogramnotcreatedproperlyordidtherobotnotcarryitoutproperly?Todothis,thepileofcardsisplacedonthefield(startingfromthetopandturningoveronecardaftertheother)asshownonthepreviouspage.Now,everyonehastotrytofindtheproblemtogetherbyrunningthroughthesequenceagainstepbystep.Whatisimportantisthatnooneis"blamed",thefocushereshouldbeonproblemsolving.
Learningobjective:Whenrunningaprogramstepbystep,thechildrencantellifitiscorrectornot.Theycanidentifyerrors(withtheprogramortherobot).
WorkingwiththeBee-BotPreparation:Every2-3childrenaregivenaBee-Bot,atransparentmat(4x4fields),abeehive,aredflower,agreenflower,someobstaclesaswellasasetofcommandcards.Thechildrenaretoldthattheynowhavearealrobot,butthatitworksinexactlythesamewayasthechild-robotdidbefore.Insteadofmakingthesequenceofcardsintoaprogramandgivingthistotherobot,thecommandsaretypedintotheBee-Botoneaftertheother.Afterpressingthegreen”GO"button,theBee-Botwillruntheprogramthathasbeenentered.Important:The"X"buttonmustalwaysbepressedbeforetheBee-Botisgivenanynewcommands,sothatBee-Bot"forgets" theoldprogram.
"GO"(runthestoredprogram)
"X"(deletethestoredprogram)
"II"(1secondpausecommand)
WorkingwiththeBee-BotProcedure:TheinstructorexplainsthatBee-Bot(justlikethechild-robotbefore)hastobesteeredtotheflower.TheBee-Botisplacedonthemat(bytheinstructororthechildrenthemselves).Theflowerisplacedunderthemat.Thechildrenfromeachgrouplayoutaseriesofcommandcardsfortheirrespectivetask(justlikebeforeonthebigfield,butthistimeusingthesmallcommandcards).EachchildcantakeitinturnstotypetheprogramintotheBee-Bot(remembertopress"X"beforehand!)andthenstarttheBee-Botbypressing"GO".Thechecksandtroubleshootingarecarriedoutasbefore.Thecommandsequenceisstillpending,soitispossibletocheckwhethertheprogramcontainserrorsorifanyerrorshavebeenmadewhentyping.Atypicalmistakeisthat“X"hasnotbeenpressedbeforetypingintheprogramandtheBee-Botthereforestartswiththe"old"programfromthepreviousround.
Note:Theon/offswitchisontheundersideoftheBee-Botaswellasaswitchthatcanbeusedtoturnthesoundsonandoff.Whenthesoundison,theBee-Botprovidesaudiofeedbackthathelpsthechildren (e.g.confirmationoftheinput).However,iflotsofBee-Botsarerunningatthesametime,thesoundscanalsobeconfusinganddisturbing.Inthiscase,theyshouldbeturnedoff.
Learningobjective:ThechildrencanusetheBee-Botandsteerittospecificdestinationsusingprogramsthathavebeentypedin.
Understandingthe Bee-BotPreparation:Thisisatheorytaskfordeepeningthechildren’sunderstanding.Thesolutionforthistaskcanthenbetestedinapracticalexercise.Theinstructorwillhandoutalloraselectionofthefollowingworksheetstothechildren.EachworksheetisdesignedtogetthechildrentoworkoutwhichoftwoflowerstheBee-Botwill“fly”towiththeprogramshown(fromtoptobottom).The“backwards"commandisalsopracticedhere,asitisnotusedatallbysomechildrenwhentheyplaywiththeBee-Bot.
Procedure:ThechildrenuseapenciltocircletheflowerontheworksheetsthattheythinktheBee-Botisgoingtoflyto.Thesolutionisthencheckedbysettingupthesituationshownontheworksheetandbytypingintheprogram(remembertopress"X"before!).
Learningobjective:ThechildrencancorrectlyinterpretshortBee-Botprograms(with"backwards"commands)asawhole.
IstheBee-Botgoingtogotothegreenflowerortheredflower?
1.
2.
3.
4.
5.
IstheBee-Botgoingtogotothegreenflowerortheredflower?
1.
2.
3.
4.
5.
IstheBee-Botgoingtogotothegreenflowerortheredflower?
1.
2.
3.
SettingandsolvingtasksProcedure:Nowthebeehive,secondflowerandobstaclescomeintoplay.Theaimisforthechildrentosettasksforthemselves.TheinstructorexplainsthatfirstofalltheBee-Bothastomovetooneortwoflowersfromthechosenstartingfieldandthen"fly"tothebeehive.Obstaclecardscanbeusedtoblockcertainfields,whichmeansthattheBee-Botmustnotenterthesefields.Thelevelofdifficultycanbevaried tosuitthecapabilitiesofthechildren.Thesecondflower,obstaclesandeventhebeehiveshouldnotreallybeusedwithchildrenwhostillhaveproblemssolvingtheprevioustaskoftheBee-Bot’sroutetotheflower.AdvancedchildrencanworkwithoutcommandcardsandprogramtheBee-Bot"fromtheirheads".Belowarethreeexampletasks(easy,medium,difficult).Itisleftuptotheinstructor/childrentodecidewhetherthebeehivecanbe"flownover".
Learningobjective:ChildrencanusetheBee-Bottosolvecomplextasks.
Tasksusing two Bee-BotsProcedure:TwochildrenaregivenoneBee-Boteachandatransparentmat.EachchildputshisorherBee-Botonafield.TheaimistoprogramthetwoBee-Botsinsuchawaythattheyswapplaceswithoutcollidingintoeachother.Inthisinstance,thetwochildrenmustworktogetherandconsiderthecorrespondingcommandsforbothBee-Bots.Theinstructorcanspecifythestartingfieldsatthebeginningandthenlaterthechildrencanchoosethesethemselves.Dependingonthechildren’scapabilities,thechildrencanalsobeaskednotjusttoswaptheirplacesbuttofacetheminthesamedirectionastheotherBee-Botatthebeginning.Obstaclescanalsobeusedhere.IftherearecollisionsthesecanofcoursebefunandtheBee-Botsdonotmindbumpingintoeachother.Herearethreeexampletasks:
Learningobjective:ThechildrencanworktogethertosolvecomplextaskswiththeBee-Bot.
Yourturn!Bee-BotparcoursProcedure:Usingthetemplate,thedimensionsofwhichcorrespondexactlytoaBee-Botfieldonthetransparentmat,thechildrencanpaintacoursefortheBee-Botonthekraft paperanddecoratethecoursehowtheywant.TheBee-Botcanthenalsorunoffthecourse.Thechildrencanchoosethestartingandfinishingpoints,setupobstacles,or,forexample,drawa"snake"fortheBee-Bot,whichitthenhastorunalong:
Dependingonthechildren’scapabilities,theinstructorcanpointthefollowingouttothechildrenorletthemdiscoveritthemselves:theBee-Botonlystaysinthefieldsiftheyfittogetherexactly.Iftherearegapsoroffsetfields,theBee-Botcannolongerfollowthefields.
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
☺
Commandcardstoprinto
ffandcuto
ut