Shift X shift light
Posted: Tue May 29, 2018 7:53 pm
Hello,
I am scripting first timer so please bare with me. We are trying to hook up the shift x light which uses three GPIO pins but we have had no success using the script provided in the example:
------
setTickRate(15)
function onTick()
local r = getTimerRpm(0)
if r > 5000 then setGpio(2,1) else setGpio(2,0) end
if r > 6000 then setGpio(1,1) else setGpio(1,0) end
if r > 7000 then setGpio(0,1) else setGpio(0,0) end
end
-------
We are using CAN bus off the megasquirt for all values, including RPM. Would this change the script?
FYI: the lights flash x1 when the ignition is turned on so we can confirm there is power going to the lights.
Thank you for the help.
PK
I am scripting first timer so please bare with me. We are trying to hook up the shift x light which uses three GPIO pins but we have had no success using the script provided in the example:
------
setTickRate(15)
function onTick()
local r = getTimerRpm(0)
if r > 5000 then setGpio(2,1) else setGpio(2,0) end
if r > 6000 then setGpio(1,1) else setGpio(1,0) end
if r > 7000 then setGpio(0,1) else setGpio(0,0) end
end
-------
We are using CAN bus off the megasquirt for all values, including RPM. Would this change the script?
FYI: the lights flash x1 when the ignition is turned on so we can confirm there is power going to the lights.
Thank you for the help.
PK