Make your custom device

If the predefine hardware device does not mach your needes you can make a special one by your self and contribute!

First you have to decide device funcionality and add the necesary adapting electronics to your arduino.

IMPORTANT: The user is responsible to map every pin to the real hardware. No check is done.

This INDI drivers allows to use arduino boards (http://www.arduino.cc) as general propouse I/O.

The comunication to the arduino board it is made using firmata protocol (http://www.firmata.org/) and the board has to be load with the standard firmata firmaware. This firmware is distributed with the Arduino-IDE programing tool. To load File->examples->firmata->standardfirmata

The driver read the properties configuration from xml skeleton file. It use also this file to program on runtime arduino pin behaviour (ANALOG,PWM,INPUT, OUTPUT). Skeleton files usually are in /usr/share/indi or /usr/loca/share/indi ([devicename]_sk.xml)

The driver use a special tag <indiduino> to map each arduino pin. The syntax is:

<indiduino pin=”[pinnumber]” type=”[input][output]” mul=”[float number]” add=”[float number]“/>

  • .- If <induino> tag is inside defLight property is mapped always as digital input.
  • .- If <induino> tag is inside defSwitch property is mapped alwaysas digital output.
  • .- If <induino> tag is inside defNumber property is mapped always as analog. Input or  output must be set using “type” atribute(requiered). In this case “mul” and “add”  could be set (optionaly), default values mul=”1″ add=”0″.

Fisical Analogs Outputs have to be in the 0-255 range (arduino PWM). This can be achive using “mul” and “add” attributes. The formula is ARDUINO_PWM_VALUE=INDI_NUMBER_VALUE*mul+add

Fisical Analogs Inputs are always in the 0-1024 range (arduino ADC). INDI properties are set using this formula: INDI_NUMBER_VALUE=ARDUINO_ADC_VALUE*mul+add

See example skeleton files for more details.

Advices:

  • Remember that arduino pins only can driver a litle power. For testing driver leds and buttons are ok. For other device probably you need adicional electronics (relays, MOSFET…)
  • Assuming your board is arduino-uno o arduino-dumilnove, for analog input (pins labeled A0,A1 .. ) you have to use numbers 14,15 and so on.. (i.e <indiduino pin=”14″ type=”input”/> map A0, <indiduino pin=”14″ type=”input”/> map A1, and so on …).

ADVANCE DEVICES

Using custom Firmware is posible to map signal not to real hardware but a logical variables. Using this is posible to achive elaborate behaviours tripping arduino functions. See stepper example code.

Subscribe to INDI

SUBSCRIBE TO THE NEWSLETTER
NEWSLETTER
NAME
EMAIL{emailcloak=off}
 

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!