I’m been developing a test code for RealDash using Arduino. basically I just modify the file “RealDash_CAN.ino” and “realdash_can_example.xml” for a different data structure.
RealDash gets the data correctly using CAN Monitor, but, the data does not generate any effect on the meters, basically, RealDash detects the frame, but not the data defined in the XML file.
changing the subject, what parameters in units can be set? in addition to those in the xml sample file?
Arduino code:
void loop(){
uint8_t buff[8];
nivel_comb = map(analogRead(A7), 0, 1023, 0, 100);
cambio = map(analogRead(A0), 0, 1023, 0, 8);
rpm = map(analogRead(A1), 0, 1023, 0, 10000);
v_bat = map(analogRead(A2), 0, 1023, 0, 2000);
t_motor = map(analogRead(A3), 0, 1023, 0, 12000);
memcpy(buff, &nivel_comb, 1);
memcpy(buff + 1, &cambio, 1);
memcpy(buff + 2, &rpm, 2);
memcpy(buff + 4, &v_bat, 2);
memcpy(buff + 6, &t_motor, 2);
SendCANFrameToSerial(1011, buff);
delay(100);
}
XML frame:
<frame id="1011">
<value targetID="170" offset="0" length="1" conversion="V/10"></value> <!--Nivel combustible-->
<value targetID="200" offset="1" length="1" conversion="V - 1"></value> <!--cambio actual-->
<value targetID="37" units="RPM" offset="2" length="2"></value> <!--RPM-->
<value targetID="12" units="V" offset="4" length="2" conversion="V/100"></value> <!--Voltaje de batería-->
<value targetID="14" units="C" offset="6" length="2" conversion="V/100"></value> <!--Temperatura motor-->
</frame>