Programming Challenges | Kamigami Robots

Programming Challenges

Challenge 1: Zig-Zag

Create a program with a single button that makes the robot run in a zig-zag line. This game shouldn’t use the joystick at all — just one button to make the robot go.

  1. Make a new game and name it “Zig-Zag”.
  2. Add an X Button Pushed trigger.
  3. Add actions to that trigger to make the robot run in a zig-zagging line:
    1. Turn right
    2. Run forward
    3. Turn left
    4. Run forward
    5. Turn right
    6. Run forward
    7. Turn left
    8. Run forward
  4. Tap the “play” button at the top to preview your actions. If the zig-zag doesn’t look right, edit the actions until you’re happy with it.

Now tap Done to save your game and try it out. Tap the X button and the robot should run in a zig-zag line, just like you programmed it!

Challenge 2: Flipper

Create a program that reacts to the robot’s gyroscope sensor. Make a new game called “Flipper” and then program the robot to behave like this:

  1. Your robot doesn’t like being upside down.
    When the robot flips upside down, turn its eyes red and play an angry buzzing sound.
  2. Your robot likes flipping right-side up.
    When the robot flips right-side up, set its eyes to blue.

When you’re done programming, go back to the play screen, and flip your robot over to see if the robot behaves like you want.

Challenge 3: Flipped out

Modify your “Flipper” program to count the number of times the robot flips upside down and react differently after its flipped 3 times.

  • When you flip the robot upside down 3 times, it gets very mad!
    Program the robot to blink its eyes red and spin back and forth.

Hint: You’ll need to use the “Increment score” action and add a “Score ≥ 3” trigger.