Demo Sketch for Hexy

Post all your questions, problems and suggestions here.

Demo Sketch for Hexy

Postby i4lingual » Tue Sep 17, 2013 4:06 am

Just finished building my Hexy and works fine with PoCoMo though servos Jitter a fair amount.
I am wondering if anyone has any Arduino sketches they'd be willing to share with some built in routine like dancing or whatever.
It is going to take me a while to learn how to write a program so was hoping I could start to enjoy Hexy with something other people have written, as being tethered to PoCoMo gets old fast :)

Edit TooManySecrets:

Moved to questions
Posts: 1
Joined: Tue Sep 17, 2013 3:54 am

Re: Demo Sketch for Hexy

Postby Piero78 » Thu Sep 19, 2013 5:37 am

I search a sketch whit the code to move Hexy forward, left etc...
Posts: 11
Joined: Wed Oct 24, 2012 7:38 am

Re: Demo Sketch for Hexy

Postby dfaroah » Fri Jul 04, 2014 2:01 am

I cant find any examples of these "skeches" when running a search on here :/
Posts: 5
Joined: Fri Jul 04, 2014 12:27 am

Re: Demo Sketch for Hexy

Postby roboalchemist » Fri Jul 04, 2014 7:58 am

There is currently only one example sketch that comes with hexy:

Code: Select all
#include "Servotor32.h" // call the servotor32 Library
Servotor32 hexy; // create a servotor32 object

void setup() {

void loop() {
  // blink the status led
  digitalWrite(STATUS_LED, HIGH);
  hexy.delay_ms(500); // wait 500mS
  digitalWrite(STATUS_LED, LOW);
  hexy.delay_ms(500); // wait 500mS
  // kill all servos
  for(int i=0; i<32; i++){
  // center servos 0,1,2,3
  hexy.delay_ms(100); // wait 100mS
    // get a ping from the ultrasonic sensor in CM
    //Serial.print("CM: ");
    //hexy.delay_ms(200); // wait 200mS
    hexy.process(&Serial); //process input from the USB
    hexy.process(&Serial1); //process input from the board serial (i.e. bluetooth)

You can see where it has it move on of the servos:
Code: Select all

1500 is center, 500 is full left rotate 90 degrees, and 2500 is full right rotate 90 degrees.

Although it runs an Arduino controller and can be programmed as such, its primarily intended to be used with PoMoCo. We're are working on an Arduino move code generator, but that won't be until the next PoMoCo release. We have also hired a tutorial writer, who is working on Sparki right now, and will be working on Hexy after they're done in a month or so. If you need a basic Arduino code tutorial, the Sparki one covers the basics:
Joseph Schlesinger - ArcBotics Co-Founder/CTO
Site Admin
Posts: 672
Joined: Mon Jul 16, 2012 3:02 am

Return to Questions, Problems and Suggestions

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests