LogoLogo
  • Welcome!
  • Tobbie II
    • Product Overview
    • [DOWNLOAD] Raw HEX Code
    • [DOWNLOAD] Tobbie II Android Mobile App
    • 0 - Pre Testing Tobbie II & Micro:bit Kit
    • 1- Creating the program
      • 0 - Assembly Checker Program
      • A - Explorer Program
      • B - Follow Me Program
      • C - Singing & Dancing Program
      • D - Light Tracking Program
      • E - Thermometer Program
      • F - Calculator Program
      • G - Rock Paper Scissor Program
      • H - Rolling Dice Program
      • I - Message Board Program
      • K - Compass Program
      • L - Bowling Program
    • 2 - Flashing the program to Tobbie II
    • 3 - Android Remote Controlled Application
      • Troubleshooting
    • 4 - Tutorial Videos
  • Crystal Kits/ Magic Cactus / Magic Crystal Hedgehog
    • Products Overview
    • How does it work?
    • Manuals
    • Troubleshooting
Powered by GitBook
On this page
  • Raw HEX code: Download Here
  • Summary: Learn how to programming Tobbie to explore the world!
  • Step 1: Create Variable GO and set GO = 0
  • Step 2: Programming how Tobbie can wake up when you press button A
  • Step 3: Programming how Tobbie can stop explore when you press button B
  • Step 4: Tell Tobbie what to do. And Tobbie will do it. Forever!

Was this helpful?

  1. Tobbie II
  2. 1- Creating the program

A - Explorer Program

A step-by-step explanation of how to programming Tobbie II to explore the world by itselves!

Previous0 - Assembly Checker ProgramNextB - Follow Me Program

Last updated 5 years ago

Was this helpful?

Raw HEX code: Download Here

Summary: Learn how to programming Tobbie to explore the world!

Step 1: Create Variable GO and set GO = 0

You can specify what Tobbie will do when it just start out by using the block below

1 - Create a variable

Variable is valuable for any type of programming. In this case GO variable is acting as a counter to help Tobbie keep track of how many task its has on hand

You can declare variable by following the below screen

2 - You will be ask to add variable name then click OK

3 - Scroll down to see the option to tell Tobbie what is the value of variable GO

You can specified a value of a variable by using the block below

Don't worry if you cannot see the variable you just name. You can choose from a list of available variable by click on the down arrow

4 - Let's see the complete block of code

Step 2: Programming how Tobbie can wake up when you press button A

1 - We want Tobbie can react and show us the count down that Tobbie is going to explore the world so we can set Tobbie on a flat surface

You can specify what Tobbie will do once the button A is pressed using the block below

2 - Then we can add count down by programming the LED of Tobbie

3 - But we also want Tobbie to make some noise once its ready to depart to their adventure!

4 - After pausing for 100ms (it is very quick), Tobbie will add one to the variable GO (this mean Tobbie has finished one task!)

5 - Let's see the complete block of code

Step 3: Programming how Tobbie can stop explore when you press button B

1 - We want Tobbie can stop exploring to conserve energy when pressing button B

You can specify what Tobbie will do once the button B is pressed using the block below

2 - Since Tobbie is going to stop, we need to tell Tobbie to set variable GO back to 0 (mean Tobbie has no task to do. For now! )

3 - We also want Tobbie make some noise and show that on its LED indicator

4 - Let's see the complete block of code

Step 4: Tell Tobbie what to do. And Tobbie will do it. Forever!

You can program Tobbie to do the same task forever by using the block

1 - We want to create Logic component for Tobbie. Tobbie now can check if its has a task on hand or not & proceed with the program or if not, stop its program on the course

You can using Logic Block to check the status of variable GO

2 - If the condition is being satisfied, then Tobbie can proceed to go forward

You can check the Installation guide for Tobbie II Extension on Makecode

3 - Next, let's utilise the IR sensor that Tobbie II equipped with to detect obstacle!

There are two case for Tobbie, so you can using If-else statement

4 - First scenario: Programming Tobbie what to do once its receive IR sensor data (mean they found obstacle)

5 - Second Scenario: Programming Tobbie to continue walking and not showing any warning.

6 - If Tobbie II receive the signal that the GO variable = 0, means that Tobbie II doesnt't have any task to perform, Tobbie II will stop rotating & walking altogether

7 - Let's see the complete block of code

1- Creating the program
630KB
01.Explorer.hex
Specify what to do when the Micro:bit start (In this case, connect to power)
You can see a list of available variable & option to make a new one
Button A program
When pressing the button A, Tobbie will so screen 3,2,1 consecutively
After showing the countdown indicator, Tobbie will play the melody one time then pause for 100ms
Button B Program
This will show the cross sign on LED then run music one & pause for 200ms
Forever Block
If-else block