Using the button command on a bs2
dash8brj
Posts: 2
I am presently working on a automated time lapse photography controller that sets off the shutter on a DSLR at regular intervals.
However the button command has me perplexed, and there is no example in the manual.
My button commands keep getting "expected a label" error in pbasic. Here is my command for the up button:
BUTTON 0,0,255,100,switch,1,up
UP is my flag to notify the button scan routine that the up button is pressed. It sets push high (so the loop exits), and moves the cursor, or increments a variable e.g. bulb mode up by one second.
The button command here is Button pin0,downstate logic 0,delay debounce and no repeat, rate is 100 cycles of the loop, workspace is variable "switch", Target state is pressed, address is up
There are similar button commands for the down, left, right, shutter and help buttons.
Now what am I doing wrong (yes I have branches with these names)
While I wait for an answer to this confusing thing, I'll go and work on the bulb and delay routines.
Thanks in advance
Ben
However the button command has me perplexed, and there is no example in the manual.
My button commands keep getting "expected a label" error in pbasic. Here is my command for the up button:
BUTTON 0,0,255,100,switch,1,up
UP is my flag to notify the button scan routine that the up button is pressed. It sets push high (so the loop exits), and moves the cursor, or increments a variable e.g. bulb mode up by one second.
The button command here is Button pin0,downstate logic 0,delay debounce and no repeat, rate is 100 cycles of the loop, workspace is variable "switch", Target state is pressed, address is up
There are similar button commands for the down, left, right, shutter and help buttons.
Now what am I doing wrong (yes I have branches with these names)
While I wait for an answer to this confusing thing, I'll go and work on the bulb and delay routines.
Thanks in advance
Ben
Comments
If SWITCH is defined as a single-use, unique variable, and UP is defined as a paragraph name, then the error isn't apparent. If that's the case, we'll need to see the entire program.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I have started from scratch beginning with the button routine. Now thats working, all i need to do is merge it with the display and shutter control routine.