AIM CAN: Difference between revisions
Line 6: | Line 6: | ||
function onTick() | function onTick() | ||
rpm = | local rpm = getTimerRpm(0) | ||
speedmph = | local speedmph = getGpsSpeed() | ||
gear = getChannel(gearId) | -- Assume the gear is calculated and stored in a virtual channel. | ||
msg = {rpm % 256, rpm / 256, (speedmph % 16) % 256, (speedmph / 16) / 256, 0, 0, gear, 0} | -- 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) | txCAN(0, 1025, 0, msg) | ||
end | end |
Revision as of 03:27, 9 January 2015
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)
TODO
Packet 404h: Control for fields displayed on bottom left of display
TODO
Packet 405h: Shift LEDs, Alarm LEDs
TODO
Packet 406h: RPM range for the digital RPM readout
TODO
Packet 408h: Timing
TODO