×

INDI Library v1.9.0 Released (23 Apr 2021)

Major INDI Library release v1.9.0 bring significant internal changes championed by @pawel-soja to modernize core INDI Library drivers and clients. New drivers for DeepSkyDad Flat Panel & Pegasus devices plus further improvements to PCM8 drivers.

Writing your own indiduino driver and using options ?

  • Posts: 3
  • Thank you received: 0
Hi!

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 month 2 days ago #71363

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

Time to create page: 0.285 seconds