Page 1 of 1

logging start/stop switch

Posted: Thu May 26, 2016 8:19 am
by smallspeed
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!

Posted: Thu May 26, 2016 2:42 pm
by rdoherty
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:

Code: Select all

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
      lastChange = getGpsTime()
    elseif button == 1 and logging == true then
      logging = false
      lastChange = getGpsTime()
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!

Posted: Thu May 26, 2016 7:24 pm
by smallspeed
Awesome, thanks! I will give this a try..
Going to rig this up with a battery eliminator and your new WiFi module so I can just click on the way out of the pits and again on the way back in :)