125
edits
Changes
no edit summary
* '''Send an "r"'''
if you send an "r" to the port you must also send 5 6 further bytes immediately after the "r". These are the Speeduino TS canID, the r type command 0x30(48 in decimal), a 2 byte offset and a 2 byte length. the offset is the position in he realtime list you want the data returned to start from and the 2 byte length is the number of bytes you want returned. the bytes are sent LSB first .
The port will reply with ,
"r" confirming the received instruction (send as 0x72 in hex) ,
The port will now transmit a single byte in hex ,this is the value of the "r" , type command, confirming what was requested (ths should be this is typically 0x30).
The port will then transmit the realtime data requested starting at the byte position sent for the number of bytes length.
chosen afr target
20 - (byte)lowByte(currentStatus.PW1 / 100) ; Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS.
21 - highByte(currentStatus.PW1); Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS. 22 - currentStatus.tpsDOT
TPS DOT
Current spark advance
TPS (0% to 100%)
loops per second LB
loops per second HB
freeRam LB
freeRam HB
Target boost pressure
current pwm boost dutycycle
Spark related bitfield
rpmDOT must be sent as a signed integer
rpmDOT HB
Flex sensor value (or 0 if not used)
Flex fuel correction (% above or below 100)
Ignition correction (Increased degrees of advance) for flex fuel
37 - currentStatus.idleLoad
73 - currentStatus.tpsADC
TPS (Raw 0-255)
74 - getNextError()
Error codes
== Read external analog data from a remote device ==
===IF the remote device is connected directly to Serial3.===
You must first send an "G" ,
Then a '1' to flag the cmd is valid,
Then the Can input channel (this is the channel number that Speeduino issued with the request.
Then send 8 bytes of data. The Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long .