I received my Sparki today… Yay! But I am having trouble getting started… Brand new to Sparki and Arduino…
I installed SparkiDuino on my Mac OS 10.8.4 Macbook Air… It installed just fine… I dragged it into the Applications folder and even restarted my computer in case that was needed. Chosen board is ArcBotics Sparki. Chosen serial port is /dev/tty.usbmodem1421 .
The trouble is that I can’t get any of the Examples to compile… other than getting the Wheels program to compile and download when I first opened up SparkiDuino. So the Sparki will run that one short program but I can’t get anything else to work.
I opened. File --> Examples -->Remote and got the code at the very end of this email… However, when I tried to compile and download the code to the USB connected Sparki I got the following message in orange below the code.
‘class SparkiClass’ has no member named ‘gripOpen’
Remote.ino: In function ‘void loop()’:
Remote:42: error: ‘class SparkiClass’ has no member named 'gripOpen’
Remote:43: error: ‘class SparkiClass’ has no member named ‘gripClose’
REMOTE CODE:
/*
IR Remote
Sparki has a sensor that lets it receives commands from
the included remote control. Try moving it around!
*/
#include <Sparki.h>
SparkiClass robot;
void setup() {
robot.begin();
}
// /------^-----
// | |
// | 69 70 71 |
// | 68 64 67 |
// | 7 21 9 |
// | 22 25 13 |
// | 12 24 94 |
// | 8 28 90 |
// | 66 82 74 |
// ____________/
void loop() {
int code = robot.readIR();
if(code != -1){
Serial.println(code);
}
switch(code){
// Movement buttons
case 64: robot.moveForward(); break;
case 25: robot.moveBackward(); break;
case 9: robot.moveRight(); break;
case 7: robot.moveLeft(); break;
case 21: robot.moveStop(); break;
// Gripper Buttons
case 13: robot.gripOpen(); break;
case 22: robot.gripClose(); break;
default:
break;
}
}