Ozobot Coding with OzoBlockly


Ozobot is a mini robot that can be programmed with OzoBlockly, a graphical drag and drop language. My kids have been working on a LEGO town for their OzoBots.

OzoBlockly supports line-following and colour reading behaviour and allow you to control the robot's movement and RGB LED light.

In this article we'll look at the OzoBlockly code that we used to program Ozobot with custom behaviour for the town.

OzoBot in Action

You can find out more in our Ozobot in LEGO town post, but here's the video that demonstrates Ozobot's behaviour as it follows the path and reads stickers to perform actions.


Using OzoBlockly

OzoBlockly runs in a web browser and offers drag and drop coding. OzoBlockly offers different levels of coding for different abilities starting with icon-based coding that can be used by kids who can't read yet. 

You can mix and match blocks from different levels so my kids were able to use some of the preprogrammed light sequences (rainbow and fireworks) within a more complex program. 

You can also program the lights by choosing precise colours and adding in delays. My 9 year old had specific requirements for the 'harbour' behaviour so that was directly coded. 

Ozobot's behaviour is a bit different to the robots my kids have programmed before so they needed some help figuring out how to get the behaviour they wanted. We worked together to understand things for the first time and then they could extend the code once the framework was in place.  

We like that you can mix up the line-following behaviour and the programmed movement within a single program.


Line Reading Behaviour

Out of the box, Ozobot is a line following robot that reads colour code commands. The line-following behaviour can still be accessed in custom coding mode. 

You can tell Ozobot to continue until the next intersection or line end. At intersections Ozobot will choose a random direction. 

The code for my kids LEGO town started really simply. Just using the line following capability to wander around the town choosing a random path at intersections.

Basic wandering code
The line colour changes at an intersection as Ozobot decides which way to go. Other behaviours could be added here in future.

If a line end is found (a dead end) then Ozobot turns round and carries on its journey.

Line End Colour Detection

When Ozobot reaches the end of a path it can check for a colour. We've used this feature by adding small coloured stickers at the end of paths to tell Ozobot what to do. 

This project is a work in progress but at the moment a blue path end sticker indicates an Ozobot home. Ozobot will turn its light blue and take a rest when it finds a home.

A blue sticker at the end of a line indicates a home


When Ozobot finds a red sticker that indicates a special behaviour. As well as line-following behaviour Ozobot's movement can be directly programmed. This capability is used to move forward and then read the colour of the sticker that is found.




A red sticker indicates a light show - Ozobot will do a light display. This feature is used under a translucent brick structure. Ozobot drives under a crystal dome and lights it up.

A blue sticker indicates a waiting spot such as the harbour. Ozobot alternates between blue and green lights while it waits.




A green sticker indicates a trick - Ozobot will charge forward and push or knock over an obstacle and then do a firework light display to celebrate.


    Other behaviours can be added later using this approach. 

    Loading OzoBlockly Programs

    OzoBlockly is available as a web app. It can be used from PCs and tablets. Saving projects only works on PCs at the moment though. Saving is to a downloaded file rather than to a cloud-based account. 

    For a longer term project like this it's important to be able to save work so we've used a PC although a tablet would have been more convenient for working close to the board. (We'd love to see saving to an account in future so it's easy to access previous projects.)

    You load code onto an Ozobot by placing it onto the computer screen which displays a sequence of colours. The longer your code is the longer this takes. 

    With this project we would go through a few iterations of coding and uploading and then the boys would play with their Ozobots and explore the new feature they had added. 

    What Next?

    The play board still has plenty of blank space. The boys are planning more LEGO structures and paths for Ozobot to navigate. They can reuse the behaviours that are already programmed by adding coloured stickers. And they have the option to add more code too.


    Name

    2013,13,2014,4,2016,2,2017,4,2018,1,2019,1,3d modelling,9,3d pen,2,3d printer,2,3d printers,5,3d printing,35,3DTin,2,about,3,accessories,1,active,2,activities,4,ada,1,ada lovelace,3,adafruit,2,adaptive tech,1,advent calendar,7,adventure games,4,advice,1,age ratings,1,ai,1,airhogs,1,alan turing,2,alexa,2,algorithms,1,alice,3,amazon,4,amazon dot,2,amazon echo,3,amazon fire,11,amazon prime,2,android,7,angry birds,1,animation,8,anki,3,app,21,app toy,4,app toys,13,appcessories,1,apple,1,apps,24,arcbotics,1,architecture,8,arckit,10,arduino,47,art,10,artificial intelligence,8,astronauts,2,astronomy,1,audio,1,augmented reality,12,author interviews,1,automaton,2,awards,1,bare conductive,1,bats,1,battle bots,3,battling robots,2,BBC Make it Digial,1,bedtime,1,bee-bot,4,beetle blocks,1,beginners,2,benjamin franklin,3,bett,1,BFX Festival,2,big day in,1,big kid,1,big kids,162,big tablets,1,bigtrak,2,bike,2,binary,2,birthday,5,birthday party,2,bitsbox,2,black friday,4,blockly,4,blockscad,6,blog tours,4,blogging,1,bloxels,2,bluetooth,3,board games,13,book,7,books,28,boolean box,1,bose,1,boys,1,breadboard,3,bricks,1,brixo,1,building a robot,1,buying guide,2,cake,1,camera,6,cameras,1,camping,2,camps,2,card game,2,cardboard,1,careers,2,catroid,1,celebration,1,cellphone,1,ces,4,CES 2016,1,ces 2017,1,charity,1,charles babbage,1,charles wheatstone,1,chemistry,3,chess,1,chibitronics,2,chip,1,chocolate,2,christmas,50,circuit cubes,1,circuit playground,11,circuit scribe,10,cleaning,1,climbing,1,code,2,code clubs,2,code gamer,1,code-a-pillar,2,code-gamer,1,codebug,1,coder,2,coder mip,1,coding,192,coding toys,2,cognitive learning,1,coji,4,communication,4,comparison,3,competition,10,computational thinking,10,computer,4,computer games,1,computer science,6,computer vision,2,computers,3,computing,1,conductive ink,1,conductive playdough,6,connected toys,20,construction,42,conversational ai,1,costumes,4,cozmo,2,craft,19,craft cutter,7,crafts,3,creative thinking,1,creativity,6,crochet,1,crowdfunding,151,cryptography,1,css,1,cube,1,cube 3,1,cubs,1,curiosity,1,curious chip,1,cyber monday,1,cyber security,1,da vinci,1,da vinci minimaker,2,dads,2,dash&dot,13,data,2,deals,8,decorations,1,dens,2,design,13,design process,1,design thinking,16,digital literacy,4,digital making,5,digital parenting,48,disability,1,disney,1,disney infinity,1,diy synth,1,dog tech,1,dolls,2,dot,1,drawing,9,drones,7,duinokit,1,dymo,1,earth day,1,Easter,6,ebooks,13,echo,2,eco,1,edblocks,1,edible,1,edison,6,edtech,2,education,86,egypt,1,electric paint,1,electricity,4,electro mat,4,electronic ink,1,electronic pets,3,electronic toys,7,electronics,132,electronics coding,1,electronics kit,20,electronics kits,5,electronics. robots,1,elementary,1,elmoji,1,emojis,1,energy,1,engineering,22,ereader,1,ereaders,6,esafety,2,escape rooms,1,escape the room,2,etextiles,3,event,9,ewriter,1,exercise,7,facts,1,family,20,family tech,5,fashion,1,fathers day,1,female,1,Festival of Code,1,fiction,1,fitness tracker,5,fizzbit,1,FLL,1,flotilla,4,flow charts,1,flutterbye fairy,1,flying,1,followgrams,1,food,1,force awakens,3,force band,1,force friday,3,fortnite. gaming,1,fpv,1,future,2,gadget,1,gadgets,14,game,3,games,26,games console,2,games consoles,9,gaming,4,gaming laptop,1,geography,1,george boole,1,get set go,11,gift,3,gift guide,50,gifts,15,girls,33,giveaway,4,glow in the dark,1,google,1,google home,1,grace hopper,3,grove,1,guest posts,3,guide,6,hackaball,5,hacksoton,2,halloween,17,halloween costumes,7,halo,1,handwriting,1,hardware,2,harry potter,1,headphones,1,health,1,hedy lamarr,1,hexbug,4,hexbug aquabots,1,hexbug project,1,high school,1,history,36,holiday,1,holidays,3,home,1,home automation,4,home education,6,homeschool,10,homework,1,honeycomb,1,hot toys,12,hour of code,5,html,4,humanoid,5,ICT,1,if kids can code,1,IKEA,1,in app purchasing,1,indiegogo,15,industry,1,industry event,1,information,1,innotab,5,innotab 3,3,innotab 3s,1,internet access,1,internet safety,3,interviews,1,invention,8,inventor,1,ios,3,IoT,5,ipad,10,ipad mini,1,iphone,2,jacquard,1,japan,1,java,1,javascript,5,jewellery,2,joto,1,k'nex,7,k'nex robotics,2,kano,10,keyboard,1,kickstarter,120,kids,9,kindle,7,kindle fire,9,kit,2,kits,5,klutz,1,kobo,1,kodu,1,kubo,1,label printer,2,languages,1,laptop,3,laptops,2,last minute,1,leap motion,1,leapfrog,3,leappad,7,leappad 2,3,leappad ultra,3,leappad2,1,leapreader,1,learning,8,learning resources,5,learning tablet,2,learning tablets,9,leds,4,lego,46,lego boost,2,lego chain reactions,1,lego dimensions,1,lego mindstorms ev3,7,lego power functions,2,lego technic,7,lego wedo,2,leibniz,1,let's start coding,1,lighting,1,lights,1,lightseekers,3,literacy,1,little bits,1,little kid,1,little kids,142,littlebits,18,logiblocs,1,logic,7,logical thinking,8,logo,1,loom,1,machines,2,magnetic,1,magnets,1,make it,2,makeblock,14,makedo,2,maker,23,maker faire,2,makey makey,8,makey makey go,1,making,40,mardles,1,margaret knight,1,mars,1,mars rover,1,marty,2,math,4,maths,6,mbot,14,mbot ranger,1,me arm,1,meccano,7,meccanoid,8,meccanoid 2.0,1,mechanisms,1,medium,1,merge vr,1,michael faraday,4,micro:bit,13,micro:bit in wonderland,3,microbit,2,microcontroller,9,microscope,2,microsoft,1,middle school,6,miles kelly,1,mindstorms,4,minecraft,22,minecraft mods,1,mixed reality,1,mobile,1,modelling,1,modular electronics,2,mom,1,monsters university,1,morse code,4,mothers day,4,motion capture,1,motors,4,mover kit,7,movie,1,movies,4,mu,1,mu toys,1,multiplayer game,1,mum,1,munzee,1,music,12,my first robot,3,national dog day,1,nature,2,new year,2,news,137,nikola tesla,3,nintendo,3,nintendo labo,1,nintendo switch,1,numbers day,1,oculus rift,1,ohbot,4,older kids,1,ollie,5,on the web,1,online safety,4,openscad,2,opinion,8,origami,2,osmo,4,outdoors,21,ouya,1,ozobot,14,paper circuit,2,papercraft,19,parental controls,2,parenting,48,parents,9,parrot,3,party,2,pc,1,people,18,pet tech,2,pets,3,phone,1,phones,1,photography,1,photon,1,physics,3,pi day,1,picks,2,pimoroni,1,pinoccio,1,pixel art,13,pixel kit,2,pixelart,8,play,2,playstation 4,3,plezmo,1,pocket code,1,pocket money,1,pokemon,5,pokemon go,5,poll,1,pre order,1,pre-teens,1,prehistory,1,preschoolers,46,primary,44,prime day,1,prime numbers,1,printable,1,products,36,professor einstein,1,programming,20,project,23,projects,88,pumpkin,1,puzzles,6,python,11,racing,1,raspberry pi,34,reading,12,remote control,1,research,3,resource,1,resources,6,retro,2,review,202,rights,1,robot,17,robot dog,1,robot fish,2,robot games,2,robot wars,4,ROBOTERRA,1,robotical,1,roboticals,1,robotics,37,robots,139,roby,1,role models,1,role play,4,romo,1,romotive,1,root,1,roundup,5,rover,1,safer internet day,1,safety,2,sam labs,9,samuel morse,3,sandbox,1,school,3,schools,4,science,25,scratch,51,scratchjr,4,screen time,9,screenless,26,screens,1,sensors,9,servos,1,shakespeare,1,silhouette cutter,2,simbrix,10,skills,1,skylanders,4,skylanders superchargers,1,skylanders swap force,1,smart pens,1,smartphone,1,smartwatch,3,snap circuits,5,snow,1,snowman,1,social media,4,solar power,3,soldering,2,sonic pi,1,sony koov,2,sound,5,sounds,1,space,10,sparki,3,speaker,4,speech sythesis,1,sphero,16,sphero mini,1,spider,2,spinmaster,1,star wars,10,stars,1,STEAM,26,stem,26,stem mouse,1,stephen hawking,1,stikbot,1,stocking fillers,1,stocking stuffers,1,stop motion,3,stop motion studio,1,storage,1,story,2,strawbees,2,students,1,subscription,5,subscriptions,1,sugru,3,summer,12,swift,2,t-shirt,1,tablet,2,tablets,26,tangible coding,2,tech,4,tech age,3,tech age parenting,4,tech craft,16,tech event,4,tech heroes,1,tech is bad,7,tech is good,4,tech toys,15,tech trends,1,tech will save us,5,techalice,3,techforgood,1,technology,2,technology will save us,6,teen,1,teens,104,teknikio,2,tekno,1,teksta,2,tenka labs,1,tesla,1,textiles,1,thames & kosmos,2,the extraordinaires,1,tim berners lee,1,tinkercad,3,tinkering,1,tinybop,3,tips,1,toddlers,14,toot-toot,1,top pick,1,top toys,1,touch,2,toy,1,toy fair,4,ToyFairNY,1,toys,6,toys to life,9,travelling,1,turing tumble,1,TV,1,tween,2,tweens,174,two-way radios,1,tynker,2,typing,5,ubtech,1,ubtech jimu,1,ux,1,vacation,1,valentines day,3,vehicles,1,videos,4,view-master,2,views,11,virtual reality,8,voice assistants,2,voice recognition,3,voice recorder,9,vr,4,vtech,10,walkie talkies,1,walking,1,watch,1,wearable,6,wearables,8,web,2,websites,1,welcome,1,wifi,1,wii,2,wii u,2,william gilbert,3,windows 8,1,winter,2,women,1,wonder league,1,wonder workshop,4,world book day,1,wowee,1,wowwee,7,writing,8,writing. education,1,xbox one,2,xyzprinting,5,YRS,1,zoomy 2.0,1,
    ltr
    item
    TAKWEB: Ozobot Coding with OzoBlockly
    Ozobot Coding with OzoBlockly
    https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVeqsY4jFjQzyGbb16BFH-DGsVDFKz9-Pah2LiGyChhD5zHh7GvnqlSjnxHyojkGytKDvLrH1aEmzF9qROHQPJc2nxcNLSEAOJcsW1Pxl1DeycP86XWCjZM1dklUBP5UUBM6IUlJMca8fj/s640/ozotown-lightshow.png
    https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVeqsY4jFjQzyGbb16BFH-DGsVDFKz9-Pah2LiGyChhD5zHh7GvnqlSjnxHyojkGytKDvLrH1aEmzF9qROHQPJc2nxcNLSEAOJcsW1Pxl1DeycP86XWCjZM1dklUBP5UUBM6IUlJMca8fj/s72-c/ozotown-lightshow.png
    TAKWEB
    https://takweb123.blogspot.com/2016/02/ozobot-coding-with-ozoblockly.html
    https://takweb123.blogspot.com/
    https://takweb123.blogspot.com/
    https://takweb123.blogspot.com/2016/02/ozobot-coding-with-ozoblockly.html
    true
    9029141400980853117
    UTF-8
    Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy