Spring 2018 : Workout #2 (3/11)

Novice Coders

Today we will be working on two projects. The first one is a warm up designed to let you play with some elements of the Scratch programming language without getting overwhelmed by all the features of the language. The project is called 10 Blocks. Read through the write up and give it a go. Work on it for 10 to 15 minutes then share what you’ve done with your fellow coders. We do this by adding your project to the Spring Studio. Don’t know how to add your project to the studio? Find another coder who does! Look and see what other coders did. Have questions how they did something? Search them out and ask! This is an important part of our Dojo experience. Don’t skip it! Try to finish up this exercise by 1:30. Don’t let the perfect be the enemy of the good.

The second project for today is called Build a Band. In this project the focus will be on making sounds! The instructions are very simple. Create a Sprite. Add sound blocks. Experiment with ways to make your project interactive! So get to it! Find the Sound block section. Figure out what the blocks do. Remember if you want to know more about a block go to the Tips pull down and then click on the blocks tab in the tips section. How can you make your project more interactive? Can you make it respond based on a key the user presses on the keyboard? How about if the user clicks a sprite with the mouse? These types of control blocks are found in the Events block section. Want an advanced challenge? See if you can figure out how to use your video input to make your project interactive. The video sensing blocks are in the light blue Sensing Blocks section.

After you have played around with your Band, go ahead and share it by clicking the share button on the top right of the screen. Make sure you give it a name and somehow indicate it is a Build a Band project. Next link it to our Spring studio. Ask around if you are having trouble doing this. Once you have your project linked into the Studio, wait for other people to get theirs up. Better yet, go help them! Feel free to check out other band projects in the studio later. Today we are going to do a gallery walk. That means that we set up our project and have other coders walk by and try out your project. Everybody should feel free to ask questions and offer constructive criticism (advice) about each other’s work. Good luck and have fun!

mBot Coders

Today let’s continue our exploration of the capabilities of the mBot robot. Do you remember all the sensing capabilities of the mBot? It can sense distance. It can follow a line. It can sense how bright a light is. It can also sense commands from the IR remote. What can you do with these inputs?

Let’s start with distance. Can you code up your mBot to display the output of the distance sensor? Can you figure out what units the answer is in? Is it feet? Inches? Meters? Centimeters? Millimeters? Can you make the mBot display a warning tone if something gets closer than 5 units? Can you have the mBot change its LED colors such that as it senses something getting close the LEDS change from green (object “far away” so mBot is safe) to yellow (object getting close so we might need to worry) to red (DANGER! DANGER! DANGER!)

Look in the Spring studio at the mBot-race-simulation-starter remix. This is basically an emulator that simulates how the mBot would behave if it was placed on these tracks trying to follow the lines. Can you write an emulator for one of the sensing elements? How about the light sensor? How would you do it?

Are you ready to try to drive your mBot around? Carefully put the wheels on! Code up some logic on how to avoid running into things. Then go! Did it do what you expected it to do? What do you do if it doesn’t do what you thought you told it to do?

Everybody Else

Working on something else? Try to recruit people to work on a similar project. Don’t be an island unto yourself. (Or why are you here?)