User Review: Hacking the MARK Robot by Philip Mallon

Over the past six weeks I have had the privilege to test an early release of the new educational robot from TinkerGen. It is called MARK.

What is different about this robot is that it combines AI, robotics and electronics. A good combination. While it is intended for the younger age group, older STEM students and makers will also enjoying discovering what MARK can do. Follow my mindmap as I explore some of MARK’s untapped secrets.

Philip Mallon is a Systems Engineer & STEM Educator from Sydney, Australia. He originally published this review on Facebook, and you can find it here.

Image may contain: camera and text
My Mindmap captures some of the projects I have been working on with MARK in March 2020. Start from the top left and work clockwise to the top right. I am using Mindmanager from Mindjet. Color codes, photos, videos and icons are used to annotate my results. Green means it works with a thumbs up – red with a thumbs down means I had problems.

MARK stands for Make A Robot Kit and is the top model in an educational range of products from TinkerGen.

TinkerGen is a Seeed Studio spin off and has their backing so you are getting plenty of innovation and support. A fantastic feature of MARK is that it uses Seeed’s Grove electronic modules so you can extend the standard sensor and actuator configuration and add more digital Grove components to MARK.

No photo description available.

There is no other robot on the market that has all of the features of MARK. Not only does it support AI, Grove electronics extensions and robotics control with DC motors but the AI camera comes with pan and tilt control.

You can do all of this just with the software IDE called Codecraft but if you want to explore further there are opportunities to do so as MARK is open sourced for both hardware and software.

To dig a bit deeper go to the Sipeed website and also check out BetaRavener’s uPyLoader to examine MARK’s firmware.

Improve your understanding of how MARK works and you will discover how to extend what MARK can do,

Some more details about how to use uPyLoader.

I got the windows executable version so I did not have to compile it and it has a good GUI.

uPyLoader is not the only way to interact with MARK at the lower level.

Just use a serial terminal program like Putty and program in micropython directly. I have not even had the need to adjust the existing firmware configuration but you can do this with a flash tool called kflash.

Image may contain: text

While MARK has two built in neopixels and Codecraft supports this I wanted to go further and see if I could use Seeed studio’s LED strip of 10 neopixels. There are three versions of the LED strip but I choose the one with the smaller number of LEDs and it is quite suitable to become my police flashing lights. At first I discovered that only 5 of the 10 LEDs lite up and wanted to see what the limitation was.

While MARK has two built in neopixels and Codecraft supports this I wanted to go further and see if I could use Seeed studio’s LED strip of 10 neopixels.

There are three versions of the LED strip but I choose the one with the smaller number of LEDs and it is quite suitable to become my police flashing lights.

At first I discovered that only 5 of the 10 LEDs lite up and wanted to see what the limitation was.

Here is my Codecraft program for the flashing police lights.
Note by using Codecraft’s function calls you can improve the readability of the code.

Examine the micropython code produced by Codecraft and you will see the reason for the limitation of 5 LEDs. D[8] means that my Grove LED Strip is connected to D8 as selected initially by the Codecraft code. I also connected the LED Strip to D8 on MARK’s electronic board called MArkDuino.

Next to this port parameter is the max LED limit – just change this to support the 10 LEDs of the LED strip.

# generated by Codecraft for cyberEye
# codes make you happy
from gpio import *
from modules import ws2812
import time
from camera import *
import utime
 
class globalvals:
    RedLED = 0
    distance = 0
 
ws2812_8 = ws2812(fm.board_info.D[8],5,1,2)
 #---------------------------------------------------------------------------------------------------------
def start_handler_0():
    pass
    ws2812_8.set_led(2,(255, 255, 255))
    ws2812_8.display()
    globalvals.RedLED = 1
    while True:
        time.sleep(0.02)
        if globalvals.RedLED == 1:
            definition_fun()
        else:
            definition_fun2()
        globalvals.distance = get_ultrasonic_distance(4)
        lcd_string(globalvals.distance, 200, 200)
        utime.sleep_ms(1000);
 #-------------------------------------------------------------------------------------------------------------

After downloading my police lights program to MARK and connecting MARK to my PC I use uPyoader to explore MARK’s firmware and locate the police lights program now renamed ‘user.py’.

This program is executed just after ‘boot.py’ in MARK start up sequence. Without any drastic change just alter the LED upper limit from 5 to 10 with a text editor then reboot MARK. Do not forget to also switch on MARK’s power switch to see the result.

The Grove LED Strip with 10 neopixels is on MARK’s Grove interface at Digital Port 8.

Now I have not only headlights for MARK but MARK takes on the role of a police car and this can be changed to any emergency vehicle with different flashing patterns.

Location

Image may contain: screen

As GPS does not work indoors I wanted a location system to let MARK know where it was.

So I tried locating position codes along the robot mat where MARK will navigate.

The two methods I tried were QRcodes and AprilTags. Lets go to the Sipeed website and see what they have to offer.

One issue I had was that Sipeed do not change their documentation with newer major firmware changes,

An example is the substitution of the key module ‘clock’ with’ timer’. The first example program in their website still uses the older clock reference and anyone testing their code will have problems.

This is an example of poor version control that not only impacts the actual code performance but all of the documentation, tutorials etc also have to be updated. Sipeed has not done this.

The gold standard for quality in this area is set by OpenMV and you soon discover that they have implemented proper version control and their libraries, examples and tutorials are far superior to those of Sipeed.

Luckily the MaixPy IDE from Sipeed is identical to the OpenMV IDE and most programs from OpenMV will work on both. So I was able to get the QR program to code for locations and now MARK knows where it is.

Image may contain: camera

So if QR works then AprilTags should be even better.

Starting with OpenMV this was the case using an OpenMV camera , the OpenMV4. Fantastic results here with OpenMV detecting even small AprilTags at any angle.

No photo description available.

After a couple of failed attempts I was able to transfer the micropython program to MARK with success .

With the help of TingerGen I downloaded a new tool that allowed me to edit my program and download it directly into MARK

I now have two location programs that works with MARK – QR codes & April Tags

No photo description available.

Here are my references. MARK is a fantastic educational robot and I can recommend it for STEM education. Even better makers can extend it with Seeed Studio enormous Grove range of sensors and actuators.

For now there is no problem with digital IO devices and I hope the range will be extended to include some I2C based remote sensors and actuators.

I will publish more on this in the future.

Philip Mallon is a Systems Engineer & STEM Educator from Sydney, Australia. He originally published this review on Facebook, and you can find it here.
To support our Kickstarter Campaign, click here to be taken to the project page.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s