element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sensors
  • Technologies
  • More
Sensors
Blog Hillstar MGC3130 3D Controlled Sparki Robot (3)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Sensors to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: gpolder
  • Date Created: 20 Aug 2014 7:23 PM Date Created
  • Views 736 views
  • Likes 2 likes
  • Comments 1 comment
  • 3d_gesture
  • sparki
  • robot
  • arduino
Related
Recommended

Hillstar MGC3130 3D Controlled Sparki Robot (3)

gpolder
gpolder
20 Aug 2014

As promised here is my blogpost with the final description of the Hillstar MGC3130 controlled Sparki robot.

 

Video

First a video showing the robot in action:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Implementation details

 

First I made a small trolley to carry the electrode:

imageimageimage

 

Next I made proper connections between the two units:

image

 

Finally I created software by combining and adapting some demo code:

#include <Sparki.h> // include the sparki library
#include <Wire.h>
#include <Hover.h>


// Pin declarations for Hover
int ts = 0;
int reset = 1;


Hover hover = Hover();
byte event;
String output_string = "";
bool driving_forward = false;


void setup() {
  delay(4000);
  sparki.clearLCD();
  sparki.println("Initializing Hover...please wait.");
  sparki.updateLCD();
  hover.begin(ts, reset);
  sparki.clearLCD();
  sparki.println("Ready for Gestures!.");
  sparki.updateLCD();
}


void loop(void) {

  // Check if Hover is ready to send gesture or touch events
  if (hover.getStatus(ts) == 0) {
   
    //Get the event over i2c and print it
    event = hover.getEvent();
   
   
    //This section can be commented out if you don't want to see the event in text format
    output_string = hover.getEventString(event);
    if (output_string != ""){
      sparki.print(event);
      sparki.println(" = " + output_string);
      sparki.updateLCD();
    }


    switch(event)
    {
      case 40:
        driving_forward = true;
        break;
      case 80:
        sparki.moveBackward();
        break;
      case 36:
        sparki.moveLeft();
        delay(500);
        sparki.moveStop();
        break;
      case 34:
        sparki.moveRight();
        delay(500);
        sparki.moveStop();
        break;
      case 72:
        sparki.gripperOpen();
        break;
      case 66:
        sparki.gripperClose();
        break;
      case 68:
        sparki.servo(80);
        break;
      case 65:
        sparki.servo(-80);
        break;
      case 48:
        driving_forward = false;
        sparki.gripperStop();
        sparki.servo(0);
        break;
    }
   
    if (driving_forward) {
        sparki.moveForward();
    } else {
        sparki.moveStop();
    }
   
    //Reset Hover for next event
    hover.setRelease(ts);

  }
}

 

Thanks for reading, feel free to submit comments and remarks below.

  • Sign in to reply
  • dubbie
    dubbie over 5 years ago

    I like the idea of a trolley added to a mobile robot. I might have to try out that idea.

     

    Dubbie

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube