I am trying to get the RCP to start logging automatically when the engine running by setting up a lab environment. I connected the RCP to my windows laptop and was able to get the application software connected. I installed the Lua script for subject function and then connected the +12V power to a variable DC power supply. When the RCP is running on USB the voltage is hovering around 4.6v as displayed on Battery display on App. I then switched on the power supply at 12v and saw the battery voltage change on the app, and the Green LED for logging to SD card was off. I then increased the voltage to 14v and verified it displayed same value on battery channel for app, but the green LED remained off. Why didn't the RCP start logging when the voltage exceeded the threshold of 13V in the Script.
Question: In the script should it read "If GetAnalog (7)" or GetAnalog (8 )? Should the last analog channel be scaled from 0-15 or leave it at 0-5 as the default.
Automatically Start Logging when engine is running issue
-
- Posts: 23
- Joined: Fri Oct 24, 2014 11:49 am
- Location: Seattle
-
- Posts: 23
- Joined: Fri Oct 24, 2014 11:49 am
- Location: Seattle
here is what I have in script section. The behavior expected is battery voltage > 13 = green light flashing and data writing to SD card. What I get is Light off. I can press the button at both > and < 13 volts and it will start logging with flashing light. btw, I am a hardware (EE/ME) guy so this is all new to me.
function onTick()
if getAnalog(7) > 13 then
startLogging()
else
stopLogging()
end
end
function onTick()
if getAnalog(7) > 13 then
startLogging()
else
stopLogging()
end
end
Rocket 6706
-
- Posts: 23
- Joined: Fri Oct 24, 2014 11:49 am
- Location: Seattle