AIM CAN

This section documents how to control an AIM Mychron3 Dash display, using an RCP unit via LUA scripting. The following information is a sum up of reverse engineering findings documented here: [1]. Examples of LUA implementation of the the different packets documented on the Mychron 3 Hack page are provided below.


Packet 401h: RPM, Speed, Gear blink control, Gear

 function onTick()
   local rpm = getTimerRpm(0)
   local speedmph = getGpsSpeed()
   -- Assume the gear is calculated and stored in a virtual channel.
   -- Refer to LUA scripting example to calculate the gear based on speed and RPM
   local gear = getChannel(gearId)
   local msg = {rpm % 256, rpm / 256, (speedmph % 16) % 256, (speedmph / 16) / 256, 0, 0, gear, 0}
   txCAN(0, 1025, 0, msg)
 end

Packet 402h: Temperature/Pressure fields (bottom left of display)

 function onTick()
   -- Assume different temperature values are stored in virtual channels
   local temp1 = getChannel(temp1Id)
   local temp2 = getChannel(temp2Id)
   local temp3 = getChannel(temp3Id)
   local temp4 = getChannel(temp4Id)
   local msg = {temp1 % 256, temp1 / 256, temp2 % 256, temp2 / 256, temp3 % 256, temp3 / 256, temp4 % 4, temp4 / 256}
   txCAN(0, 1026, 0, msg)
end

Packet 405h: Shift LEDs, Alarm LEDs

Packet 406h: RPM range for the digital RPM readout

TODO


Packet 408h: Timing

TODO