not sure where this should go, or if its been covered before - I searched and searched in the forums but I always seem to get like 500 results
with the new wifi module controlling go-pro, is it possible to install a remote "start logging" button somewhere? For example on the steering wheel.. I don't really want it to start automatically at certain speeds or engine speeds, and I can't reach my RCP when strapped into the car, so thinking a steering wheel button would be perfect.. ideally I can just push a momentary button once to start and again to stop both the RCP and (as a result, via wifi) the gopro
the only way I can think of doing this is to use a channel and either ground it or send it a voltage, but if possible i'd like to try and avoid that as its a channel I then can't use for anything else..
any ideas, tips, tricks, etc appreciated!
logging start/stop switch
-
- Posts: 43
- Joined: Mon Nov 30, 2015 1:08 pm
- Location: Leicester, UK
Yes, you could install a remote start/stop button. You'd need a momentary button and hook it into RCP's analog or digital inputs. You can use LuaScript to watch the voltage level and when it changes, start logging. Then when it changes again, stop logging.
Something like this should work (button plugged in to GPIO #1). I haven't tested the code, so there might be a bug or two:
The code watches a momentary button for changes. If it changes AND it's been 5s or greater since the last time it was pressed, it will start or stop logging.
Hope that helps!
Something like this should work (button plugged in to GPIO #1). I haven't tested the code, so there might be a bug or two:
Code: Select all
setTickRate(30)
logging = false
lastChange = getGpsTime()
timeout = 5
function onTick()
local button = getGpio(0)
time = getGpsTime()
if (time - lastChange) >= timeout then
if button == 1 and logging == false then
logging = true
startLogging()
lastChange = getGpsTime()
elseif button == 1 and logging == true then
logging = false
stopLogging()
lastChange = getGpsTime()
end
end
end
Hope that helps!
Ryan Doherty
Autosports Labs
Autosports Labs
-
- Posts: 43
- Joined: Mon Nov 30, 2015 1:08 pm
- Location: Leicester, UK