Video

%

This project is still a prototype.

We are still implying a lot of tests to make this project as simple as possible for you.
But to give an idea anyway and for those who are advanced and can not wait anymore, here is the prototype.
You can follow the steps below.
Contact us for the assambly parts. You can also help with the complete product. Tips and ideas are welcome!

We make the parts out of acrylic or wood.
We design the parts around the Tokymaker, motors, wheels,….
Because we want to make it easy for you, we have a previewed example below.

 

The aim of the robot

The aim of the robot is to drive controlled by IoT or with the light sensors. When an object is detected less than 10 cm in front of the robot, it stops.

 

IoT controlled

You can control the robot with the Adafruit platform. On the Adafruit dashboard there is a direction slidebar and a speed slidebar.
You can enable this function when you press Touchpad 1.

 

 

 

 

Light controlled

You can control the robot with a flash light. When you shine with a flashlight in a certain direction on the robot, the robot will turn in that direction.
You can enable this function when you press Touchpad 3.

You can stop the robot when you press Touchpad 2.

The inputs are :

  • 2 light sensors

The outputs are :

  • speaker
  • 2 continuously rotation servo motors
  • screen

 

Material

Tokymaker

Learn to code your own prototypes using the simple visual coding interface and just one finger and program it without installing software or connecting cables.

Assembly parts

Contact us for getting the parts, or you can download the part drawings here :
Than you need to print them on cardboard.

2 continuous servo motors

A continuous rotation servo is a servo that does not have a limit on its range of motion. Instead of having the input signal determine which position the servo should rotate to, the continuous rotation servo relates the input to the speed of the output and direction.

2 light sensors

We can use scissors or a cutting knife for cutting the cardboard.

Speaker

A buzzer or beeper is an audio signalling device.

Assembly

Step 1: calibrate the servo motors

If you don’t have the parts, and you want to make it with cardboard you can follow next steps :

  1. Download the prepared design :
  2. Print it on A4 paper
  3. Cut the red lines

Step 1: calibrate the servo motors

The First thing we need to do is to calibrate the servo motors.

 

  • Download the calibrate code :
  • Place the 2 servo’s at output 1 and output 2
  • Use a screwdriver to adjust the resistor of the 2 servos so that the servomotors no longer rotate. There should also be no sound coming from the servos. Make sure this is accurate.

Step 2 : side & front walls

Add the 2 side walls and the front wall together

Step 3 : first floor

Place the first floor in the 2 side walls

Step 4 : servos & middle part

Place the 2 motors in the 2 holes of the side walls with the shaft facing out, and the wires facing to the front wall of the robot.

Place the middle part into the first floor.

Step 6 : second floor

Place the second floor. Make sure the cables are well placed.

After this, you can insert the rubber band. So it will make it easier.

 

 

Step 7 : speaker

Add the speaker

Step 8 : cables

Add cables like on the picture

Step 9 : third floor

Add the third floor. Make sure the cables are well placed.

The 2 motor cables and the servo cable should be placed at the right side, the other 2 should be placed at the left sight.

Step 10 : Tokymaker

Connect the cables with the inputs and outputs of the tokymaker.

Look to the robot in the way you can read the tokymaker, like in the picture of step 11.

Input 1 : right lifht sensor (right cable)
Input 2 : left light sensor (left cable)

Output 1: right motor
Output 2: left motor
Output 3: speaker

Step 11 : speaker cable

Place the speaker cable like on the picture

Step 12 : light sensor

Place the light sensors

Step 13 : batteries

Place the batteries

Step 14 : batterie cable

Place the batterie cable like in the picture

Step 15 : back wall

Add the back wall

Step 16 : wheel connections

Connect the wheel connections and power cable

Step 17 : wheels

Add the wheels, rubber and sonar sensor

Result

Code

You can download the game here :

IoT connection & variables

The first thing we need to do is connect our Tokymaker with IoT. You can do it with the first 2 codes.

  • Connect with a WiFi router via the IoT Block “WIFI : set”
  • Log in to Adafruit via the IoT “IOT : loginuser” Block

Also we need to declare the variables.

  • Left0 : these variable is for calibrate the LEFT motor. If the motor still runs in the STOP mode, than you can calibrate it with this variable. Try to put some numbers until it stops rotating. Example : -3, -2, -1, 1, 2, 3. If the motor doesn’t rotate in the STOP mode take 0. (see video)
  • Right0 : these variable is for calibrate the RIGHT motor. If the motor still runs in the STOP mode, than you can calibrate it with this variable. Try to put some numbers until it stops rotating. Example : -3, -2, -1, 1, 2, 3. If the motor doesn’t rotate in the STOP mode take 0. (see video)
  • SPEED : these variable will speed up the left and right motor simultaneously with the same speed
  • LEFT and RIGHT are variables for controlling the left and right motor
  • FlagLight : is a boolean, when it’s true the Light controlled mode of the robot will be active
  • FlagIoT : is a boolean, when it’s true the IoT controlled mode of the robot will be active
  • STOP : is a boolean, when it’s true the STOP mode of the robot will be active, and the robot should not move. If it is still moving, recalibrate the Left0 and Right0

Text on screen

This part of the code will show the text on the screen.

IoT connected?

With these IF-function we can see when we are connected to WiFi. If we are connected the onhead LED will bright green. Otherwise it will not bright.

IoT control

This part of the code is the “IoT control mode” were we can control our robot with a flash light.
The first thing we do is enable the boolean of the “IoT control mode” and disable the “Light control mode” and “STOP mode”.

After that we program the motors.

The IF function is for stopping the robot and enable the STOP mode of the robot, so it can bump to other objects.

Light control

This part of the code is the “Light control mode” were we can control our robot with a flash light.
The first thing we do is enable the boolean of the “Light control mode” and disable the “IoT control mode” and “STOP mode”.

After that we program the motors.

The IF function is for stopping the robot and enable the STOP mode of the robot, so it can bump to other objects.

 

Stop the robot

This part of the code is the “STOP mode” were we can stop moving our robot.
The first thing we do is enable the boolean of the “STOP mode” and disable the other modes.

After that we program the motors so that they aren’t moving anymore.

IoT dashboard

Adafruit

Step 1

  • Create an account on the IoT platform Adafruid via: https://www.adafruit.com

Step 2

  • Go to https://io.adafruit.com and log in with your account
  • Copy your AIO Key

Step 3

  • Make a dashboard like in the video

 

Amazing gadget! I got it as a present from a friend and I’m still amazed. It only took me about an hour to assemble, and now I’m experimenting with its possibilities. Kudos! Héctor

Maker in Residence at Zer0 Lab, Hackacademy