anchor.diff:  3,The Shell,1,Overview,,,,,"In this section you will start giving your robot commands through the shell in Calico<ul><li>There are two ways to give your robot commands: through the shell and with a script. This unit is all about the shell</li><li>With the shell, you can give your robot commands one-by-one and see what they do ― this is very useful because you receive instant feedback</li><li>The shell is in the red region in the picture below. To get to the shell&#44; click the <i>Shell</i> tab in the upper-left region of Calico."</ul><br><img alt="Shell and Script" src="/assets/img/shell_and_script.png" align="center" /></li><br><br><li>While working through the rest of the course and experimenting on your own&#44; it would be very useful to have the Calico Myro Reference (<a target="_blank" href="http://calicoproject.org/Calico_Myro">http://calicoproject.org/Calico_Myro</a>) open in another window. It lists every function you can use (using the search button in your browser will be useful).</li>
   3,The Shell,2,Name Your Robot,,,,9INgAYXAaJw,"This Program Will Help You:<ul><li>Start and become familiar with Calico and the shell</li><li>Learn some basic Python syntax</li><li>Connect to your robot and name him/her!</li></ul><br>New Functions Used (words after the # sign are comments (that you don't type!) to help you understand the functions/ideas):<ul><li><font color=&#34;#09933&#34;>from Myro import *</font> #The first command in EVERY program with Scribbler. It imports the Myro library and let you use functions like setName shown below</li><li><font color=&#34;#09933&#34;>init()</font> #This function connects to your robot. It is the second command in EVERY program. It opens a window where you enter the port you found in Unit 2 (it is likely &#34;com3&#34; for Windows or something like &#34;/dev/tty.Fluke2-0216-Fluke2&#34; for Macs). If you want to avoid typing this every time, you can copy and paste your path into the init() function&#44; so init(&#34;com3&#34;) or init(&#34;/dev/tty.Fluke2-0216-Fluke2&#34;)</li><li><font color=&#34;#09933&#34;>setName(&#34;name&#34;)</font> #You put the name you want for your robot in quotation marks. This name is remembered on your Scribbler and is displayed every time you run a program.</li><li><font color=&#34;#09933&#34;>getName()</font> #This returns the robot's name (so Shy Guy in this case)</li><li><font color=&#34;#09933&#34;>print(&#34;The text I want to print&#34;)</font> #This Python function prints text to the output window. Notice below how we can use print(getName()) below because getName() returns text</li></ul><br>As shown in the video&#44; please enter each command below line by line in the shell (but&#44; change the robot's name to whatever you want!). It's best if you don't copy and paste.<br><ul>from Myro import *<br>init()<br>setName(&#34;Shy Guy&#34;)<br>print(getName())</ul>"
   3,The Shell,3,Joystick,,,,f70IXT1DXWg,"This Program Will Help You:<ul><li>Drive your Scribbler around with a virtual joystick</li></ul><br>New Functions Used:<ul><li><font color=&#34;#09933&#34;>joystick()</font> #Opens up a window with a virtual joystick so you can drive the robot around. Later we'll combine this with other commands</li></ul><br>As shown in the video&#44; please enter each command below line by line in the shell:<ul>from Myro import *<br>init()<br>joystick()</ul>"
  -3,The Shell,4,Draw a Diamond,,,,ZnNetQ16m8Y,"This Program Will Help You:<ul><li>Draw straight lines with your Scribbler</li><li>Have your Scribbler turn left or right</li><li>Start thinking computationally ― how a series of commands can lead to drawing shapes with your robot!</li></ul><br>New Functions Used:<ul><li><font color=&#34;#09933&#34;>turnRight(amount&#44;seconds)</font> #Turn the Scribbler to the right for a given speed (amount) and time (seconds)</li><li><font color=&#34;#09933&#34;>forward(amount&#44;seconds)</font> Move forward at a given speed (amount) for a given time (seconds)</li><li><font color=&#34;#09933&#34;>turnLeft(amount&#44; seconds)</font> #Turn left at a given speed (amount) for a given time (seconds)</li></ul><br> As shown in the video&#44; please enter each command below line by line in the shell:<ul>from Myro import *<br>init()<br>turnRight(1,.2)<br>forward(1,1)<br>turnLeft(1,.4)<br>forward(1,1)<br>turnLeft(1,1.13)<br>forward(1,1)<br>turnLeft(1,.4)<br>forward(1,1)</ul>"
  +3,The Shell,4,Draw a Diamond,,,,ZnNetQ16m8Y,"This Program Will Help You:<ul><li>Draw straight lines with your Scribbler</li><li>Have your Scribbler turn left or right</li><li>Start thinking computationally ― how a series of commands can lead to drawing shapes with your robot!</li></ul><br>New Functions Used:<ul><li><font color=&#34;#09933&#34;>turnRight(amount&#44;seconds)</font> #Turn the Scribbler to the right for a given speed (amount) and time (seconds)</li><li><font color=&#34;#09933&#34;>forward(amount&#44;seconds)</font> #Move forward at a given speed (amount) for a given time (seconds)</li><li><font color=&#34;#09933&#34;>turnLeft(amount&#44; seconds)</font> #Turn left at a given speed (amount) for a given time (seconds)</li></ul><br> As shown in the video&#44; please enter each command below line by line in the shell:<ul>from Myro import *<br>init()<br>turnRight(1,.2)<br>forward(1,1)<br>turnLeft(1,.4)<br>forward(1,1)<br>turnLeft(1,1.13)<br>forward(1,1)<br>turnLeft(1,.4)<br>forward(1,1)</ul>"
   3,The Shell,5,Draw a Cone,,,,cs89feAcYMU,"This Program Will Help You:<ul><li>Extend your drawing skills and draw a circle with your Scribbler</li></ul><br>New Functions Used:<ul><li><font color=&#34;#09933&#34;>motors(left, right, time)</font> #Set individual speeds for the left and right wheels of the Scribbler. This means that to go straight you could set the left and right speeds to be the same&#44; and to turn make the speeds different.</li></ul><br>As shown in the video&#44; please enter each command below line by line in the shell:<ul>from Myro import *<br>init()<br>turnLeft(1,.3)<br>forward(1,1)<br>motors(1, -0.2, 8.4)<br>forward(1,1)</ul>"
  -3,The Shell,6,Take a Picture,,,,LXVeLCe11IQ,"This Program Will Help You:<ul><li>Take a picture with your Scribbler</li><li>Save that picture as a png on your computer!</li><li>Have your robot beep</li></ul><br>New Functions Used:<ul><li><font color=&#34;#09933&#34;>takePicture()</font> #Returns a picture taken by the robot. Note how we save that picture into a <u>variable</u>&#44; which is a memory location on your computer that holds data (a picture in this case)&#44; so that we can use the picture taken later</li><li><font color=&#34;#09933&#34;>show(pic)</font> #Opens a window to show a picture. In our case&#44; we named our picture variable &#34;pic&#44;&#34; so we do show(pic) to let the computer know <i>which</i> picture we want it to show. If we had instead named our picture variable &#34;my_scribbler_picture&#44;&#34; we would type show(my_scribbler_picture) to display the image</li><li><font color=&#34;#09933&#34;>savePicture(pic, &#34;scribbler_picture.png&#34;)</font> #This function saves a picture to an actual picture png file on your computer. The first parameter is the picture variable (remember we named it &#34;pic&#34; above) and the second parameter is the filename for your computer (remember to include the extension&#44; &#34;.png&#34;). <i>The picture is saved in the same folder that the program is running in&#34; which is most likely your Calico folder.</i> If you can't find the picture&#44; simply type the filename into your computer's search window.</li><li><font color=&#34;#09933&#34;>beep(duration&#44; frequency)</font> #Have Scribbler beep for some duration of seconds at some Hz frequency</li></ul><br>As shown in the video&#44; please enter each command below line by line in the shell:<ul>from Myro import *<br>init()<br>pic = takePicture()<br>show(pic)<br>savePicture(pic&#44; &#34;scribbler_picture.png&#34;)<br>beep(0.5&#44; 600)</ul>"
  +3,The Shell,6,Take a Picture,,,,LXVeLCe11IQ,"This Program Will Help You:<ul><li>Take a picture with your Scribbler</li><li>Save that picture as a png on your computer!</li><li>Have your robot beep</li></ul><br>New Functions Used:<ul><li><font color=&#34;#09933&#34;>takePicture()</font> #Returns a picture taken by the robot. Note how we save that picture into a <u>variable</u>&#44; which is a memory location on your computer that holds data (a picture in this case)&#44; so that we can use the picture taken later</li><li><font color=&#34;#09933&#34;>show(pic)</font> #Opens a window to show a picture. In our case&#44; we named our picture variable &#34;pic&#44;&#34; so we do show(pic) to let the computer know <i>which</i> picture we want it to show. If we had instead named our picture variable &#34;my_scribbler_picture&#44;&#34; we would type show(my_scribbler_picture) to display the image</li><li><font color=&#34;#09933&#34;>savePicture(pic, &#34;scribbler_picture.png&#34;)</font> #This function saves a picture to an actual picture png file on your computer. The first parameter is the picture variable (remember we named it &#34;pic&#34; above) and the second parameter is the filename for your computer (remember to include the extension&#44; &#34;.png&#34;). <i>The picture is saved in the same folder that the program is running in&#44; which is most likely your Calico folder.</i> If you can't find the picture&#44; simply type the filename into your computer's search window.</li><li><font color=&#34;#09933&#34;>beep(duration&#44; frequency)</font> #Have Scribbler beep for some duration of seconds at some Hz frequency</li></ul><br>As shown in the video&#44; please enter each command below line by line in the shell:<ul>from Myro import *<br>init()<br>pic = takePicture()<br>show(pic)<br>savePicture(pic&#44; &#34;scribbler_picture.png&#34;)<br>beep(0.5&#44; 600)</ul>"
   4,Sample Programs: Scribbler,1,Overview,,,,,"This unit has sample programs for you to experiment with and run on your robot. Rather than use the shell&#44; we're now going to use <i>Python scripts</i>. Python scripts are saved as .py files&#44; so you can easily save and run them at different times and on different computers.<ul><li>Start by running these sample programs on your own robot and looking through the code by clicking the Text Version button. <i>To run the code&#44; simply copy and paste from the linked code to Calico and click Calico's green </i>Run<i> button.</i></li><li>The goal of this unit is to show you all of Scribblers sensors and actuators</li><li>The sample programs generally get more complex&#44; so view these programs as showcases of Scribbler's capabilities and something that you will be able to do after a little learning and experimenting.</li><li>The Shell programs and Exercise programs (Unit 6) will lead you to create things like these sample programs (and even better!)&#44; but these samples come earlier on in the course for motivation&#44; inspiration&#44; and to get a taste of programming :)</li></ul><br> In Calico&#44; you type (or copy/paste) scripts in the blue region shown in the picture below."<br><br><img alt="Shell and Script" src="/assets/img/shell_and_script.png" align="center" />
   4,Sample Programs: Scribbler,2,Lost Woods,,,//raw.github.com/CSavvy/python/master/play_lost_woods.py,147YFt20SyI,"Scribbler sings a song using the beep function. While Scribbler can only beep two tones at once, (s)he can still sing Lost Woods from Zelda!"<ul><li>Click Text Version for the Python code</li></ul>
   4,Sample Programs: Scribbler,3,Draw Shapes,,,//raw.github.com/CSavvy/python/master/draw_shapes.py,I03Z2c5ukhg,"Scribbler loves geometry, especially simple shapes!<ul><li>Scribbler is remembering his (her?) younger days when (s)he could only draw four shapes. This wide variety consists of squares, triangles, circles, and hearts!</li><li>You can pick which shape to draw through a user interface made with Calico's Graphics library! Click a button and be impressed</li><li><font color="#FF0000">Note:</font> Be sure to also download the background image <a target="_blank" href="https://raw.github.com/CSavvy/python/master/shape_gui_background.png">HERE</a> (right click &#8594; save image as...) and put it in the same folder as the program!</li><li>Click Text Version for the Python code</li></ul>
  
positive.code: 6,Exercises,8,SpyBot Revisited,,,,bu0TT-mO8a0,"Edit the SpyBot sample program so that you control it with a flashlight instead of a joystick (a combination of SpyBot and Follow Light).<ul><li>The final product could be something like:</li></ul>"
  6,Exercises,9,Flashlight Path Revisited,,,,bEkwX0OIx-M,"Edit the Flashlight Programming sample program so that it moves along a 1/4 circle arc to the left or right rather than turn at right angles.<ul><li>The final product could be something like:</li></ul>"
  7,Resources,1,Final "Test",,,,,If you wish to challenge yourself and take a &#34;test&#34; we wrote&#44; please follow the link below. It tests your skills at transferring Scribbler knowledge to graphics:<ul><li><a target="_blank" href="/assets/pdf/ScribblerTest.pdf">Final Test</a></li>
  7,Resources,2,More Programs,,,,,These are some additional programs that you can experiment with on your Scribbler:<ul><li><a target="_blank" href="https://raw.github.com/CSavvy/python/master/extras/maze.py">Maze</a> ― Navigate through a maze using IR sensors</li><li><a target="_blank" href="https://raw.github.com/CSavvy/python/master/extras/guitar_tabs.py">Guitar Tabs</a> ― Have Scribbler convert a guitar tab text file to robot beeps!</li><li><a target="_blank" href="https://raw.github.com/CSavvy/python/master/extras/line_encoded_music.py">Line Encoded Music</a> ― Scribbler draws over printed bars and plays notes (<a target="_blank" href="http://youtu.be/TUlU66CRyhg">video</a>)</li></ul><br>More programs are be added to <a target="_blank" href="https://github.com/CSavvy/python/tree/master/extras">our GitHub folder</a>
  7,Resources,3,Links,,,,,<img alt="Shell and Script" src="/assets/img/earth_link.png" align="right" /><br>These are some useful links and important resources for using Scribbler with Calico:<ul><li><a target="_blank" href="http://calicoproject.org/Learning_Computing_With_Robots_Using_Calico_Python">Deepak Kumar's Textbook&#44; Learning Computing with Robots</a> ― A great tool for learning Python and about the Scribbler</li><br><li><a target="_blank" href="http://calicoproject.org/Calico">The Calico Project</a> ― the site that has everything (Calico updates&#44; sample curriculums&#44; support...)</li><li><a target="_blank" href="http://calicoproject.org/Calico_Myro">Calico Myro Reference</a> ― Very useful! A list of all Myro functions</li><li><a target="_blank" href="http://calicoproject.org/Calico_Graphics">Calico Graphics Reference</a> ― Very useful! A list of all Myro Graphics functions</li><li><a target="_blank" href="http://calicoproject.org/Calico_Graphics">Calico Simulator Reference</a> ― A reference for the Calico Simulator</li><li><a target="_blank" href="http://wiki.roboteducation.org/Demo_Programs">Calico's Demo Programs</a> ― Note that some of these need to be updated for more recent Myro versions. Debugging them is good practice though! You can see what's different (where errors are coming from) in the <a target="_blank" href="http://calicoproject.org/Calico_Differences">Calico Differences Page</a></li><li>Sample middle school curriculums from Calico's webpage: <a target="_blank" href="http://wiki.roboteducation.org/Middle_School_Computing_with_Robots:_2009">2009</a>&#44; <a target="_blank" href="http://wiki.roboteducation.org/Middle_School_Computing_with_Robots:_2010">2010</a><br><br></ul>If you want more...<ul><li><a target="_blank" href="http://www-inst.eecs.berkeley.edu/~cs188/pacman/pacman.html">The Berkeley Pac-Man Projects</a> ― A set of exercises for learning AI in Python using Pac-Man</li><li><a target="_blank" href="https://code.google.com/p/aima-python/wiki/ReadMe">AIMA Sample Code</a> ― Python implementation of algorithms from Russell and Norvig's AI textbook&#44; 'Artificial Intelligence: A Modern Approach'</li></ul>
  
negative.code: 5,Sample Programs: Simulator,3,Draw Shapes,,,//raw.github.com/CSavvy/python/master/simulator/simulator_draw_shapes.py,M51N7ENfetI,"Scribbler loves geometry, especially simple shapes!<ul><li>Scribbler is remembering his (her?) younger days when (s)he could only draw four shapes. This wide variety consists of squares, triangles, circles, and hearts!</li><li>You can pick which shape to draw through a user interface made with Calico's Graphics library! Click a button and be impressed</li><li><i>Remember that the simulator has some randomness ― the drawing isn't perfect</i></li><li><font color="#FF0000">Note:</font> Be sure to also download the background image <a target="_blank" href="https://raw.github.com/CSavvy/python/master/shape_gui_background.png">HERE</a> (right click &#8594; save image as...) and put it in the same folder as the program!</li><li>Click Text Version for the Python code</li></ul>
  5,Sample Programs: Simulator,4,Cupid Shuffle!,,,//raw.github.com/CSavvy/python/master/simulator/simulator_cupid_shuffle.py,TJkBfPCxX3M,Have Scribbler do the Cupid Shuffle dance!<ul><li>Calico plays the .wav song file from your computer while Scribbler dances</li><li><font color="#FF0000">Note:</font> Be sure to also download the wav file <a target="_blank" href="https://github.com/CSavvy/python/blob/master/shuffle2.wav?raw=true">HERE</a> and put it in the same folder that the program is in</li><li>Click Text Version for the Python code</li></ul>
  5,Sample Programs: Simulator,5,360 GIF,,,//raw.github.com/CSavvy/python/master/simulator/simulator_360_gif.py,2omOtBVY8f8,"The Scribbler spins in a circle, using the Fluke's camera to take pictures<ul><li>As it takes pictures, it flashes the front LED and beeps</li><li>When it finishes its circle, it saves the pictures as a gif titled 'scribbler_360'</li><li>Click Text Version for the Python code</li></ul>"
  5,Sample Programs: Simulator,6,SpyBot,,,//raw.github.com/CSavvy/python/master/simulator/simulator_spybot.py,CuZ9PMXUPNo,Use Calico's Graphics library and the Scribbler's picture taking abilities to make a video stream. Spy on ALL the objects placed on the floor!<ul><li>You can also move the robot around with a joystick while streaming!</li><li>Click Text Version for the Python code</li></ul>
  5,Sample Programs: Simulator,7,SpyBot with IR,,,//raw.github.com/CSavvy/python/master/simulator/simulator_video_stream_with_ir.py,iu1rTSV8QNE,"<ul><li>Make another video stream, but this time change the image to red, white, and blue based on the brightness of the pixels when Scribbler detects something is close with the IR sensor</li><li>It's also cool if you pick up Scribbler and hold it as a video camera to test out the color changes</li><li>Click Text Version for the Python code</li></ul>"
  6,Exercises,1,Overview,,,,,"This unit has exercises for you to do to practice programming with the Scribbler. You can work on these in the simulator or with the actual robot&#44; whichever is easier for you (but remember that some functions like the line sensor are not implemented in the simulator).<ul><li>You're given simple problems to solve with your robot (like certain shapes to draw, etc) without the code to do it... exciting!</li><li>When you're done with the exercises we give you, come up with your own programs to do cool things or extend the Sample Programs we made to do something different (we include a few of these extension exercises in this unit)</li><li>If you are desperate for program ideas and have exhausted your imagination with the sensors and motors&#44; try image processing problems. The possibilities are endless : )</li></ul>"<br>Time to get coding... <img alt="Shell and Script" src="/assets/img/terminal.gif" align="center" />
  6,Exercises,2,Draw a Cylinder,,,,,Draw a right circular cylinder with Scribbler<ul><li>The final product should be something like:</li></ul><img alt="Shell and Script" src="/assets/img/cylinder.jpg" align="center" />
  