Nerd Stuff / Robots / sparki

Introducing: Sparki

I really love Kickstarter. Not only you can support great, innovative projects but also get some cool stuff. ArcBotics’ Sparki was one of those awesome projects Kickstarter launched last year. After having read some very good reviews about their last project “Hexy the Hexapod” I decided to back their latest one and I don’t regret that decision.

image (2)ArcBotics is a new company located Cambridge, Massachusetts which claims to hopefully be the IKEA of robotics in the future. I really liked their idea of producing affordable and easy to use robots for educational purposes. After inspecting it I must say that it’s really suitable for kids (+11) who want to learn how to program a robot. You can also decorate and paint Sparki’s 3D printed plastic shell to make it more individual and fancy. Since it’s an Arduino robot you only have to install the custom-enhanced Arduino software and then you can get started right away. I’m really fond of Arduino since I got in touch with it at University for the first time.

So, as always, here’s the technical stuff:

  • 1x Ultrasonic distance sensor
  • 1x 3-Axis Accelerometer
  • 3x Light-sensing phototransistors
  • 5x Line-following and edge detection sensors
  • 1x IR bounce for gripper
  • 1x 128×64 Graphic LCD
  • 1x RGB LED
  • 1x Buzzer
  • 1x IR Transmitter
  • 1x IR Receiver
  • 1x IR Remote control
  • 1x TTL Serial port for expansion (Arduino/Raspberry Pi)
  • 1x Port for Bluetooth Serial Module
  • Powered by 4xAA batteries
  • 2x Geared stepper motors
  • Marker holder for drawing

image (1)There’re a lot of cool things you can learn with Sparki such as using and implementing pathfinding algorithms and heuristics. I really wish there would have been something as cool and simple as sparki when I was a kid. I think I’d have loved it and it would have got me into computer science/robotics very early. So I’d have had more experience in programming by now and my studies would be a lot easier. So I can imagine that a tiny companion like Sparki could change or facilitate future decisions in our life. And it’s fun to work with it. No exhausting and complicated setting up and no weird errors.

The first thing that came into my mind was to modify the melody sample code so that Sparki could play the Flinstones intro. Being able to read music is a great advantage and I was happy that I learnt it as a kid. You can grab any sheet music and start writing down every single note. I must admit that it could become very annoying when you want to use a complicated and long song but maybe it’s worth it at the end 😉

 

And here’s the code for that awesome melody:

</pre>
/*******************************************
Flinstones

********************************************/
#include <Sparki.h> // include the sparki library
#include "pitches.h" // include a list of pitches

// notes in the melody:
int melody[] = { NOTE_G3, NOTE_C3, 0, NOTE_C4, NOTE_A4, NOTE_G3, NOTE_C3, 0, NOTE_G3, NOTE_F3, NOTE_E3, NOTE_E3, NOTE_F3, NOTE_G3, NOTE_C3, NOTE_D3, NOTE_F3, NOTE_G3, NOTE_C3, 0, NOTE_C4, NOTE_A4, NOTE_G3, NOTE_C3, 0, NOTE_G3, NOTE_F3, NOTE_E3, NOTE_E3, NOTE_F3, NOTE_G3, NOTE_C3, NOTE_D3, NOTE_C3};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = { 2, 2, 4, 2, 4, 2, 2, 4, 2, 4, 4, 4, 4, 4, 2, 2, 1, 2, 2, 4, 2, 4, 2, 2, 4, 2, 4, 4, 4, 4, 4, 2, 2, 1};

void setup() {
// play each note in the arrays
for (int thisNote = 0; thisNote < 34; thisNote++) {

// calculate the note duration as 1 second divided by note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000/noteDurations[thisNote];
sparki.beep(melody[thisNote],noteDuration);

// to distinguish the notes, set a minimum time between them.
// the note's duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;

delay(pauseBetweenNotes);
// stop the tone playing:
sparki.noBeep();
}
}

void loop() {
// no need to repeat the melody.
}

&nbsp;

&nbsp;
<pre>

You can order your own Sparki on the ArcBotics site ,btw 😉

Leave a comment