Velleman K8055 USB I/O Board Extension plugin
Road Runner Extension Plugin for the Velleman K8055 USB I/O Board.
Current version 184.108.40.206 See version control at the end of this post
This is the Road Runner Extension plugin I wrote for the Velleman K8055 USB I/O Board. The plugin takes advantage of all the functions the K8055 provides.
K8055 is kit version. VM110 is assembled and ready to go version.
Features of the K8055 / VM110 Board
• 5 Digital inputs (0=ground, 1 = open). On board test buttons provided
• 2 16 bit counters on bit 1 and bit 2 of the 5 bit digital input port.
• 2 Analog inputs with attenuation and amplification option. Internal test +5V provided.
• 8 Digital open collector output switches (max 50V/100mA). On board led indication.
• 2 Analog outputs. ( 0 to 5 Volt)
• 2 PWM open collector outputs (combined with analog outputs)
• Power supply through USB (approx. 70 mA)
Basically a Road Runner Extension Plugin is adding new labels, buttons, sliders and indicators to the base Road Runner functionality. The new functionality is provided in a DLL file. Using a X,pluginname in a RoadRunner skin RR will load the dll. After that the new labels, buttons, sliders and indicators are available. Even when switching to another screen the objects will still work. It is advisable to load the DLL on the first skin so all the functionality is available on all other screens. The plugin is also hibernation aware. This means that the state of all the outputs (analog, digital and counters) will be restored after the CARPC has resumed from hibernation.
The plugin itself consist of a single DLL (RRK8055.DLL) that needs to be placed in the <RRPATH> (i.e. “C:\Program Files\Road Runner”). Register the DDL using regsvr32 RRK8055.dll. The DLL will use a configuration file (RRK8055.ini) in that same directory to save the current state when RR is shutdown or goes into hibernation. The same configuration file is used to assign the RR commands to the digital input port or the analog input port per skin (see k8055_menu indicator).
For for the new labels, sliders and buttons, see documentation in zip file or this pdf
I have provided a K8055 test skin which is including all the functionality and for skinning reference. Place the relays.skin and relay*.jpg in the directory of the skin you are using. Place a button on the screen you are calling the test skin from and use the following button code: "LOAD;relays.skin".
• Hardware buttons for menu now checked every 0.1 sec which makes the menus more responsive
• Added input mask for the menu for the 5 digital inputs in case less inputs are used for the menu
• Changed the way analog in/out works. The labels now return a calculated value and the units. See RRK8055.ini and the picture of the example skin below
• Implemented analog menu/ RR command control. To used with 2 wire steering wheel controls where every button will apply a different resistor value on the two wires. To resistor value can be detected on analog port 2 and will be translated to a RR command
• Board address is now configurable in RRK8055.ini. Values can be 0, 1, 2 or 3
• Implementation of the two hardware counters. Added labels and counter reset buttons.
• Re-written menu functionality; added SWITCH, LONG type menu buttons
• Added button Demo Mode (k8055_testmode)
• Added button k8055_do_set_all : sets all digital output bits
• Added button k8055_do_switch_all : changes state of all digital output bits
• Added button k8055_do_reset_all : resets all digital output bits
• Fixed? the plugin not working on all installs (read ini problem)
• Fixed the plugin not working with different buttons per different menu
• Analog Menu now accepts 20 buttons
• Now hidden RR screens (DVD, VIDEO) also processes menu buttons
• If board is not connected the plugin will now wait a number of seconds before a re-initialization is done. The InitRetrySeconds item in the [SaveData] section defines the number of seconds. If no value is defined or the value is 0 a default of 60 seconds is used. This fixes the problem of the CPU using up to 100% when using the plugin and the board is not connected.
• k8055_connected indicator added. This indicator displays the connection state of the board. A click on the indicator will reinitialize the board if it was not connected.
• When a steering wheel control has resistor value even when all buttons are in a released state, the analog in will see a voltage > 0. The ini setting [MENU_ANALOG]
will only detect a button press when the analog in value is more the xx.
• Added ini setting
Where xx are milliseconds between button press checks for digital and analog menu. Default is 100 milliseconds.
• Added ini setting
where xx is the number of button press checks before a button press is considered to be a long button press. Default value is 20. The time is for a long button press to be detected is Menu_Timer_Interval * Menu_Button_Long_Intervals (By default 100 msec * 20 is 2 seconds)
• Sending commands to Road Runner now uses the SDK interface which is more reliable than the ComSend method.
• Hibernation bugs have been fixed.
• Plugin will now get the ini path for the plugin from Road Runner. RRK8055.ini must now exist in $RRPATH$
• Several other improvements and fixes based on working experience in the car.