Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Knob Servo Test Program fails, Pinguino 11-beta 4
05-06-2016, 01:15 PM,
#1
Simple Knob Servo Test Program fails, Pinguino 11-beta 4
Howdy all,

I download the latest and greatest stable and ran a simple test on the Servo control program Knob.pde

Code follows ----

// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin

void setup()
{
servo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop()
{
val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
servo.write(9, val); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there
}

Here's the error message...

[DEBUG] Ending 'replace_word'
[DEBUG] Time spent for 'preprocess': 0.14 s
[DEBUG] Ending 'preprocess'
[DEBUG] Starting 'compile' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'compile': 0.43 s
[DEBUG] Ending 'compile'
[DEBUG] Time spent for 'verify': 0.63 s
[DEBUG] Ending 'verify'
[OUT] ERROR: 187: no type specifier for 'timingindex'
[OUT]

All the servo example programs fail the same way.

Any insight or suggestions?

R.
Reply
05-06-2016, 05:17 PM,
#2
RE: Simple Knob Servo Test Program fails, Pinguino 11-beta 4
Hello,
What do you mean with  the latest and greatest stable ? V11 ?
I just try V11 and V12, 8 bits and 32 bits for both version and knob.pde is compiled without troubles.
Did you only meet troubles with servo sketches ?
André 
Reply
05-06-2016, 08:09 PM,
#3
RE: Simple Knob Servo Test Program fails, Pinguino 11-beta 4
i actually had it work under v12 4550
Reply
09-06-2016, 03:56 PM,
#4
RE: Simple Knob Servo Test Program fails, Pinguino 11-beta 4
I have the same problem with the V11 IDE (Stable Version), only the V12 (Testing) works for me.

Board: Generic 18f2550
bootloader: v4

Operating System: Ubuntu 16.04 (64 bits)
Reply
09-06-2016, 11:25 PM,
#5
RE: Simple Knob Servo Test Program fails, Pinguino 11-beta 4
(09-06-2016, 03:56 PM)jesores Wrote: I have the same problem with the V11 IDE (Stable Version), only the V12 (Testing) works for me.

Board: Generic 18f2550
bootloader: v4

Operating System: Ubuntu 16.04 (64 bits)

well V12 is the only one i am using.
fred
Reply
28-06-2016, 05:24 PM,
#6
RE: Simple Knob Servo Test Program fails, Pinguino 11-beta 4
Hi all,

I had the same problem with the servo library in IDE V11 beta 4 and a 18F4550 based pinguino board.
I managed to get it work by modifying the servos.c library.
In the library function called "ServosPulseDown" (in line 187) I remove the word "volatile". This seems to be the problem with the compilation process. The variable is already defined as a global variable at the beginning of the file.
So, the result is

timingindex = 0;

I don't know if the best way to do it, but it works for me. I hope it helps to solve the problem.

Regards,

Leonardo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)