RobotGrrl / Arduino-SSC32

Library for the Arduino for the Lynxmotion Serial Servo Controller
7 stars 0 forks source link

problems of a missing .h #1

Open FrankOcean11 opened 9 years ago

FrankOcean11 commented 9 years ago

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

In file included from C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:19:0, from arduino___ssc32.ino:2: C:\Program Files (x86)\Arduino\libraries\SSC32/WProgram.h:10:20: fatal error: wiring.h: No such file or directory

include "wiring.h"

                ^

compilation terminated. Error compiling.

RobotGrrl commented 9 years ago

Just change the include to Arduino.h ...... Common problem with many old libraries and newer version of Arduino ide.

Also I have no idea if this library works any more. I would do it a different way nowadays.

-E

On Sep 4, 2015, at 1:17 AM, Frank notifications@github.com wrote:

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

In file included from C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:19:0, from arduino___ssc32.ino:2: C:\Program Files (x86)\Arduino\libraries\SSC32/WProgram.h:10:20: fatal error: wiring.h: No such file or directory

include "wiring.h"

^ compilation terminated. Error compiling.

— Reply to this email directly or view it on GitHub.

FrankOcean11 commented 9 years ago

i when on and downloaded that wiring.h pasted the file in C:\Program Files (x86)\Arduino\libraries\SSC32/ closed the ide and reopen compile again and now i got far to many errors then before and now it has gone beyond my expertise to fix.

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

In file included from C:\Program Files (x86)\Arduino\libraries\SSC32/WProgram.h:10:0, from C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:19, from arduino_ssc32.ino:2: C:\Program Files (x86)\Arduino\libraries\SSC32/wiring.h:55:17: error: conflicting declaration 'typedef uint8_t boolean' typedef uint8t boolean; ^ In file included from C:\Program Files (x86)\Arduino\libraries\Streaming/Streaming.h:24:0, from arduinossc32.ino:1: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:117:14: error: 'boolean' has a previous declaration as 'typedef bool boolean' typedef bool boolean; ^ In file included from C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:19:0, from arduino_ssc32.ino:2: C:\Program Files (x86)\Arduino\libraries\SSC32/WProgram.h:20:83: error: default argument given for parameter 3 of 'long unsigned int pulseIn(uint8_t, uint8_t, long unsigned int)' [-fpermissive] unsigned long pulseIn(uint8_t pin, uint8t state, unsigned long timeout = 1000000L); ^ In file included from C:\Program Files (x86)\Arduino\libraries\Streaming/Streaming.h:24:0, from arduinossc32.ino:1: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:235:15: error: after previous specification in 'long unsigned int pulseIn(uint8_t, uint8_t, long unsigned int)' [-fpermissive] unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); ^ arduinossc32:9: error: no matching function for call to 'SSC32::SSC32()' arduinossc32.ino:9:21: note: candidates are: In file included from arduinossc32.ino:2:0: C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:27:2: note: SSC32::SSC32(bool) SSC32(bool blah); ^ C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:27:2: note: candidate expects 1 argument, 0 provided C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:23:7: note: SSC32::SSC32(const SSC32&) class SSC32 { ^ C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:23:7: note: candidate expects 1 argument, 0 provided arduinossc32.ino: In function 'void setup()': arduinossc32:15: error: 'class SSC32' has no member named 'begin' arduinossc32.ino: In function 'void loop()': arduinossc32:25: error: 'class SSC32' has no member named 'servoMove' arduinossc32:31: error: 'class SSC32' has no member named 'servoMove' arduinossc32:36: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:41: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:47: error: 'class SSC32' has no member named 'beginGroupCommand' arduinossc32:47: error: 'SSC32_CMDGRP_TYPE_SERVO_MOVEMENT' was not declared in this scope arduinossc32:48: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:49: error: 'class SSC32' has no member named 'servoMoveTime' arduino___ssc32:50: error: 'class SSC32' has no member named 'endGroupCommand' no matching function for call to 'SSC32::SSC32()'

RobotGrrl commented 9 years ago

WProgram.h changed to Arduino.h in a later version of the ide.

Give me a few mins and I'll log in to computer and fix it...

On Sep 4, 2015, at 1:28 AM, Frank notifications@github.com wrote:

i when on and downloaded that wiring.h pasted the file in C:\Program Files (x86)\Arduino\libraries\SSC32/ closed the ide and reopen compile again and now i got far to many errors then before and now it has gone beyond my expertise to fix.

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

In file included from C:\Program Files (x86)\Arduino\libraries\SSC32/WProgram.h:10:0, from C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:19, from arduino_ssc32.ino:2: C:\Program Files (x86)\Arduino\libraries\SSC32/wiring.h:55:17: error: conflicting declaration 'typedef uint8_t boolean' typedef uint8t boolean; ^ In file included from C:\Program Files (x86)\Arduino\libraries\Streaming/Streaming.h:24:0, from arduinossc32.ino:1: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:117:14: error: 'boolean' has a previous declaration as 'typedef bool boolean' typedef bool boolean; ^ In file included from C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:19:0, from arduino_ssc32.ino:2: C:\Program Files (x86)\Arduino\libraries\SSC32/WProgram.h:20:83: error: default argument given for parameter 3 of 'long unsigned int pulseIn(uint8_t, uint8_t, long unsigned int)' [-fpermissive] unsigned long pulseIn(uint8_t pin, uint8t state, unsigned long timeout = 1000000L); ^ In file included from C:\Program Files (x86)\Arduino\libraries\Streaming/Streaming.h:24:0, from arduinossc32.ino:1: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:235:15: error: after previous specification in 'long unsigned int pulseIn(uint8_t, uint8_t, long unsigned int)' [-fpermissive] unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); ^ arduinossc32:9: error: no matching function for call to 'SSC32::SSC32()' arduinossc32.ino:9:21: note: candidates are: In file included from arduinossc32.ino:2:0: C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:27:2: note: SSC32::SSC32(bool) SSC32(bool blah); ^ C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:27:2: note: candidate expects 1 argument, 0 provided C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:23:7: note: SSC32::SSC32(const SSC32&) class SSC32 { ^ C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:23:7: note: candidate expects 1 argument, 0 provided arduinossc32.ino: In function 'void setup()': arduinossc32:15: error: 'class SSC32' has no member named 'begin' arduinossc32.ino: In function 'void loop()': arduinossc32:25: error: 'class SSC32' has no member named 'servoMove' arduinossc32:31: error: 'class SSC32' has no member named 'servoMove' arduinossc32:36: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:41: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:47: error: 'class SSC32' has no member named 'beginGroupCommand' arduinossc32:47: error: 'SSC32_CMDGRP_TYPE_SERVO_MOVEMENT' was not declared in this scope arduinossc32:48: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:49: error: 'class SSC32' has no member named 'servoMoveTime' arduino___ssc32:50: error: 'class SSC32' has no member named 'endGroupCommand' no matching function for call to 'SSC32::SSC32()'

— Reply to this email directly or view it on GitHub.

FrankOcean11 commented 9 years ago

you mean like this?

include Streaming.h>

include SSC32.h>

include Arduino.h>

/ Tests the SSC32 library. By Martin Peris (http://www.martinperis.com) This example code is in the public domain. /

SSC32 myssc = SSC32();

void setup() {

//Start comunications with the SSC32 device myssc.begin(9600);

}

void loop() {

//Move motor 0 to position 750 //The first command should not define any speed or time, is used as initialization by SSC32 myssc.servoMove(0, 750);

delay(1000);

//Move motor 1 to position 750 //The first command should not define any speed or time, is used as initialization by SSC32 myssc.servoMove(1, 750);

delay(1000);

//Move motor 0 to position 1500. It will take 5 seconds to finish the movement. myssc.servoMoveTime(0, 1500, 5000);

delay(5500);

//Move motor 1 to position 900. It will take 5 seconds to finish the movement myssc.servoMoveTime(1, 900, 5000);

//Move both servos to position 750 at the same time. //The movement will take 5 seconds to complete //Notice that currently motor 0 is at position 1500 and motor 1 is at position 900, //but they will reach position 750 at the same time myssc.beginGroupCommand(SSC32_CMDGRP_TYPE_SERVO_MOVEMENT); myssc.servoMoveTime(1, 750, 5000); myssc.servoMoveTime(5, 750, 5000); myssc.endGroupCommand();

delay(5500); }

RobotGrrl commented 9 years ago

Just pushed the fix!

FrankOcean11 commented 9 years ago

thanks for your efforts but it seems im getting a whole diff error now?

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

arduinossc32:9: error: no matching function for call to 'SSC32::SSC32()' arduinossc32.ino:9:21: note: candidates are: In file included from arduinossc32.ino:2:0: C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:32:2: note: SSC32::SSC32(bool) SSC32(bool blah); ^ C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:32:2: note: candidate expects 1 argument, 0 provided C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:28:7: note: SSC32::SSC32(const SSC32&) class SSC32 { ^ C:\Program Files (x86)\Arduino\libraries\SSC32/SSC32.h:28:7: note: candidate expects 1 argument, 0 provided arduinossc32.ino: In function 'void setup()': arduinossc32:15: error: 'class SSC32' has no member named 'begin' arduinossc32.ino: In function 'void loop()': arduinossc32:25: error: 'class SSC32' has no member named 'servoMove' arduinossc32:31: error: 'class SSC32' has no member named 'servoMove' arduinossc32:36: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:41: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:47: error: 'class SSC32' has no member named 'beginGroupCommand' arduinossc32:47: error: 'SSC32_CMDGRP_TYPE_SERVO_MOVEMENT' was not declared in this scope arduinossc32:48: error: 'class SSC32' has no member named 'servoMoveTime' arduinossc32:49: error: 'class SSC32' has no member named 'servoMoveTime' arduino___ssc32:50: error: 'class SSC32' has no member named 'endGroupCommand' no matching function for call to 'SSC32::SSC32()'

RobotGrrl commented 9 years ago

Hmmm.... Maybe try making the object like this-

SSC32 ssc(true);

(Check out the example sketch)

(Also the boolean doesn't even do anything. I was a bit of a n00b then.)

FrankOcean11 commented 9 years ago

umm i did as you suggested and this happened

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

sketch_sep04a.ino: In function 'void setup()': sketch_sep04a:47: error: 'Serial1' was not declared in this scope 'Serial1' was not declared in this scope

so i when on and did the obvious,

void setup() {

Serial.begin(9600); // Serial1.begin(9600);

so obviously it fixed the issue, tho im not sure if i was supposed to use that Serial1.begin so you tell me? other then that i guess i can start using serial to send commands to the ssc controller.

RobotGrrl commented 9 years ago

Right- my robot was using an Arduino mega or something with multiple uarts at the time. The library sends out the commands on the main serial port though (Serial), so you should be good to try it now that the Serial1 is commented out.

On Fri, Sep 4, 2015 at 2:15 AM, Frank notifications@github.com wrote:

umm i did as you suggested and this happened

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

sketch_sep04a.ino: In function 'void setup()': sketch_sep04a:47: error: 'Serial1' was not declared in this scope 'Serial1' was not declared in this scope

so i when on and did the obvious,

void setup() {

Serial.begin(9600); // Serial1.begin(9600);

so obviously it fixed the issue, tho im not sure if i was supposed to use that Serial1.begin so you tell me? other then that i guess i can start using serial to send commands to the ssc controller.

— Reply to this email directly or view it on GitHub https://github.com/RobotGrrl/Arduino-SSC32/issues/1#issuecomment-137656784 .

RobotGrrl commented 9 years ago

Sweet! Sounds like a fun project for a year. Your Mantha design for a bot looks neat— it looks like it could be a glider, but also has the drums to roll around terrain on (possibly accelerate for take off?)

Good luck!

-E

On Fri, Sep 4, 2015 at 2:46 AM, Frank notifications@github.com wrote:

thank you ! your welcome to check out some of my robot design http://frankdesignatures.weebly.com/ if your into 3D Printing or CNC milling, im actually going to be running a multi mcu slave network being run by a A.I program in visual studios via serial for my humanoid, i been recreating Atlas as you see in my main pic so hopefully ill be done by the end of this year.

— Reply to this email directly or view it on GitHub https://github.com/RobotGrrl/Arduino-SSC32/issues/1#issuecomment-137660197 .

FrankOcean11 commented 9 years ago

thanks i actually model her after the Sting Ray, and those drums i redefined them not that long ago part fan "slid's" for traction control and to help maneuver under the water it was originally design to clean my large turtles tank, you know stick the walls and kinda clean em up for me? the bottom of Mantha have magnets cover with a cleaning sponge and a second plate that attaches tro the outside of the tank to those magnets so this allows her to ride the wall, after all that work i did not find it to suitable for the size of the tank so now she just decor lol, and as for my humanoid thats a 3year old project in the making and mostly mechanical design and part studying PID controls a.i. development from MIT and electrical engineering Opencv and programming "so yeah i have learned all this in 3years" i been following your work development as well your pretty creative as well !