Now I wish to add another output; Parking-brake on/off info to a led (on/off).
But I can not find a way that works.
I have created separate simple Arduino and protocol file for debugging this problem.
The two possible properties that activate the parking-brake via the debug property window are;
<node>/controls/gear/parkingbrake-lever</node>, <type>bool</type>
<node>/controls/gear/parkingbrake-lever-pos</node>, <type>double</type>
I have tried these two in an output protocol xml file but to no avail.
Simple Arduino sketch for debugging
- Code: Select all
int incomingByte ;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(38400);
}
void loop() {
// see if there's incoming serial data:
while (Serial.available() > 0) {
incomingByte = Serial.read();
if (incomingByte == '1') {
digitalWrite(LED_BUILTIN, 1); // turn the LED on (HIGH is the voltage level)
} else {
digitalWrite(LED_BUILTIN, 0); // turn the LED off (LOW is the voltage level)
}
}
}
The output protocol with either parkingbrake-lever or parkingbrake-lever-pos
- Code: Select all
<?xml version="1.0"?>
<PropertyList>
<generic>
<output>
<binary_mode>false</binary_mode>
<line_separator>newline</line_separator>
<var_separator>,</var_separator>
<chunk>
<name>park</name>
<node>/controls/gear/parkingbrake-lever</node>
<type>int</type>
</chunk>
</output>
</generic>
</PropertyList>
I have certainly a data format problem but my brain is unable to work this one out...and yes I've been googling and reading