Add initial AnalogInput support. Trigger modes are missing.
Rename array.
Use di[i].pin instead of di[i].port to check if the DigitalPin is unused (same as with AnalogPins).
Fix: send DigitalInput status after the AveragingInterval is reached in any case.