Remote sensing of GoPro from its blinking LED?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: Remote sensing of GoPro from its blinking LED?

    In post 1, the GOTO MAINLOOP is in the wrong place. Move it to before the "recording" label.

    It may still not do what you're looking for, but fix that for sure.

  2. #2
    Join Date
    Mar 2023
    Location
    Cape Town, South Africa
    Posts
    26


    Did you find this post helpful? Yes | No

    Default Re: Remote sensing of GoPro from its blinking LED?

    Quote Originally Posted by tumbleweed View Post
    In post 1, the GOTO MAINLOOP is in the wrong place. Move it to before the "recording" label.

    It may still not do what you're looking for, but fix that for sure.
    I don't understand your logic. Would you mind giving me more information?

  3. #3
    Join Date
    Aug 2011
    Posts
    453


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Remote sensing of GoPro from its blinking LED?

    Here's what you have now (I removed some of the code for clarity)
    Code:
    Mainloop:
    if CYCLE = 0 then goto Mainloop ' just loop
    if cycle = 1 then gosub recording ' call the subroutine and then return to the next statement
    
    ' after executing the above for cycle= 1 you'll return here
    ' the next statement is the beginning of the "recording" subroutine
    ' it'll execute that, hit the 'return' and cause a problem since there was no matching call 
    
    Recording:
    ' do stuff
    return
    
    ' you'll never get here
    goto mainloop

    Without changing any of the code to test 'cycle', here's what it should look like
    Code:
    Mainloop:
    if CYCLE = 0 then goto Mainloop ' just loop
    if cycle = 1 then gosub recording ' call the subroutine and then return to the next statement
    
    goto mainloop     ' infinite loop back to main 
    
    Recording:
    ' do stuff
    return

Similar Threads

  1. Blinking LED will not Blink
    By andybarrett1 in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 24th September 2014, 21:20
  2. Timing out DT's Blinking Led
    By tazntex in forum General
    Replies: 3
    Last Post: - 28th May 2010, 17:41
  3. PIC16F819 LED not blinking
    By ronbowalker in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 1st December 2009, 02:04
  4. blinking LED
    By kindows in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 31st July 2009, 16:08
  5. Why is my LED not blinking?
    By Gary Goddard in forum General
    Replies: 14
    Last Post: - 1st January 2007, 20:23

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts