How to export RoboMind scripts to Sparki?

97 views
Skip to first unread message

Robo

unread,
Nov 13, 2014, 11:40:20 AM11/13/14
to robomind-a...@googlegroups.com
From RoboMind Desktop version 5.2 it is possible to export scripts to the Arduino based Sparki Robot (http://arcbotics.com/products/sparki/).

How does this work?

Robo

unread,
Nov 13, 2014, 11:48:27 AM11/13/14
to robomind-a...@googlegroups.com
In RoboMind version 5.2 we introduced our first attempt to support an Arduino based robot called Sparki

Its export functionality is still less direct than Lego NXT, where you can directly upload RoboMind scripts via USB. Rather, an .ino script is generated from the RoboMind script, which then has to be copied to the Sparkiduino software to be uploaded...

Inline image 1


Then read how to upload the generated script.

the main parts of that page are copied here:

How to Upload Sparki Code

This guide will show how to upload code to Sparki. Uploading new code erases old code, and replaces it with the new code.

Warning_TriangleFollowing this example will erase the program that interacts with the remote. You can restore Sparki’s original program by uploading Examples > Restore_Default

With the SparkiDuino software installed, plug in your Sparki’s USB cable into your computer’s USB port and Sparki. You cannot program Sparki with the bluetooth module.

Plug-In Sparki

win_32px If using Windows, it may take some time for the drivers to install automatically while Sparki is plugged in. Please be patient.

Select the ArcBotics Sparki board by selecting it from Tools | Board.

SparkiDuino_Board

Select the serial device of the Arduino board from the Tools | Serial Port menu.

ideaIf you’re not sure which port is Sparki, try looking at the ports before plugging in Sparki, and after plugging in Sparki. The new one should be Sparki.

win_32pxOn Windows, this should be something like COM3COM4, or COM5. If you see COM1 and COM2, they are unlikely to be Sparki.

osx_32xOn the Mac, this should be something like/dev/tty.usbmodem1411 for a USB board.

SparkiDuino_Serial

To have some code to upload, we will use one of the examples – the RGB – from the Sparki examples. All example code and code you write upload the same way.

Here we are selecting the RGB example. When this RGB code is selected and uploaded, the RGB LED on Sparki will rotate between Red, Green and Blue.

SparkiDuino_Example

With this code selected, it should show up in the code box now. You can press the second button from the left (the left-pointing arrow). The code will first compile, then upload:

Compile-Uploading

While the code is being uploaded, Sparki’s status light first pulses red while in programming mode, then blinks rapidly while the program is being sent. It then goes solid red, off, then runs the program:

https://www.youtube.com/watch?v=jsZBltz4Jgw

And show it is done uploading:

Done Uploading

Now your Sparki will blink Red, Green then Blue!

Reply all
Reply to author
Forward
0 new messages