Scratch Connection Status Display

With a new adapter adapter.gpio.GpioStateOutput, it is possible to bring the scratch connection state to GPIO.

When scratchClient is started, the associated GPIO pin is going high. When connection to scratch is established, the pin is blinking slowly. And when scratchClient is terminated, the GPIO is going low.
Just add the configuration für this adapter to your configuration.

    <adapter class='adapter.gpio.GpioStateOutput'  name='state'>
        <description>State display on IKG.IO.9</description>

        <gpio port='IKG.IO.9' alias='state'>
            <default dir='OUT'  default='low' />
            <active  dir='OUT'  default='low' />
        </gpio>
    </adapter>

Please note the naming of the port: these names are configurable. You could use GPIO04 instead, or P1-07 if you prefer board numbering.
For my school workshop, there is an extra LED available, connected all the time, but not used for other IO. This LED sits on the adapter board in a corner and is ideally suited for a state display.