INDI Library v1.9.6 Released (21 May 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Writing your own indiduino driver and using options ?

  • Posts: 3
  • Thank you received: 0

I've written part of a driver (well, XML config) for an indiduino device, and it works well so far, starting with the Arduino Servo example.
One thing I can't find any documentation about is how to use the group="Options" ...

I can define a Servo, but it takes a Number as an input, typically the 0-255 PWM output.
Now, if I wish to impose some limits (i.e. minimum 40 and maximum 168) such that my servo doesn't go outside the 57-237 degree window), can I do that in the options page?
I can define a servo with hardcoded limits, but can we use softcoded (referenced) limits (from the options group) instead?
If so, how would that work, anyone has some example code for that ?
Could I then define an OPEN/CLOSE switch that would send the servo back and forth between these to option limits?
Can this be done in the mydevice_sk.xml config for indiduino, or do I need to do this inside the standardfirmata.ino running on the Arduino ?

Cheers, Otte

1 year 1 month ago #71363

Please Log in or Create an account to join the conversation.

Time to create page: 0.323 seconds