ROBOTC.net forums
http://robotc.net/forums/

firgelli-linearact-test3.c
http://robotc.net/forums/viewtopic.php?f=1&t=5018
Page 1 of 1

Author:  didiercoll [ Tue Oct 23, 2012 9:07 am ]
Post subject:  firgelli-linearact-test3.c

Bonjour

I try to used the firgelli-linearact-test3.c ;see below ;

It seems that with

FLACextendLA(testMotor, 50, 40);

the actuator has a speed of 50 ( good )

and have to stop at 40 mm ( ???? )

but , it goes always at the end and not stop at 40 mm, it means it goes through to 100 mm ;

it is strange ?

with NXTG blocks , there is no such problem ; it is OK ;

waht do you think about that ;

may I did a mistake somethere ? or no understood how it works ?

thanks

didier


Code:
/*
 * $Id: firgelli-linearact-test3.c 114 2012-10-08 18:11:44Z xander $
 */

/**
 * firgelli-linearact.h provides an API for the Firgelli Linear Actuator.  This program
 * demonstrates how to use that API.
 *
 * Changelog:
 * - 0.1: Initial release
 *
 * TODO:
 * - Add ramping support (being worked on, has a few bugs)
 *
 * Credits:
 * - Big thanks to Firgelli for providing me with a Linear Actuator to play with!
 *
 * License: You may use this code as you wish, provided you give credit where it's due.
 *
 * THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.51 AND HIGHER.
 * Xander Soldaat (xander_at_botbench.com)
 * 15 february 2010
 * version 0.1
 */

#include "drivers/firgelli-linearact.h"

task main () {
  tMotor testMotor = motorA;

  PlaySound(soundBeepBeep);
  nxtDisplayBigTextLine(3, "Retract");
  FLACretractLA(testMotor, 100);
  wait1Msec(5000);

  // This stops the motor, handy in case of emergencies
  FLACstopLA(motorA);
  while(!isDone(testMotor)) wait1Msec(50);
  wait1Msec(200);
  nMotorEncoder[testMotor] = 0;
  wait1Msec(1000);

  PlaySound(soundBeepBeep);
  eraseDisplay();
  nxtDisplayBigTextLine(1, "Extend");
  nxtDisplayTextLine(3, "ticks:  40");
  nxtDisplayTextLine(4, "speed:  50");
  FLACextendLA(testMotor, 50, 40);
  while(!isDone(testMotor)) wait1Msec(50);
  if (isStalled(testMotor))
    nxtDisplayTextLine(7, "STALLED");
  wait1Msec(1000);


  PlaySound(soundBeepBeep);
  eraseDisplay();
  nxtDisplayBigTextLine(1, "Done");
  wait1Msec(2000);
}

/*
 * $Id: firgelli-linearact-test3.c 114 2012-10-08 18:11:44Z xander $
 */

Author:  mightor [ Tue Oct 23, 2012 12:07 pm ]
Post subject:  Re: firgelli-linearact-test3.c

Unfortunately, this program works very well with my pre-production LA and I cannot reproduce it.

- Xander

Author:  didiercoll [ Tue Oct 23, 2012 12:38 pm ]
Post subject:  Re: firgelli-linearact-test3.c

Thanks

do you mean you want to built LA yourself ?

didier

Author:  mightor [ Wed Oct 24, 2012 6:50 am ]
Post subject:  Re: firgelli-linearact-test3.c

No, what I meant was that the LA that I was sent by Firgelli is a pre-production that seems to behave a lot differently from the final production version that is currently being sold.

- Xander

Author:  didiercoll [ Wed Oct 24, 2012 9:00 am ]
Post subject:  Re: firgelli-linearact-test3.c

of course

sorry for my bad english

I used to translate " mot à mot "

very bad ...

didier

Author:  mightor [ Fri Oct 26, 2012 12:58 am ]
Post subject:  Re: firgelli-linearact-test3.c

No worries, I am sure your English is better than my French :)

- Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/