I've just read the other button thread and thought "hu, that looks useful and not too hard" but I've just tried it and I'm lost.
I would have kept going in the other tread but I think it is a more advanced discussion of the button command, I just want to know some basics (I hope).
Eventually I want to have three buttons. Up, down and select. I want it do loop through a 7x7 grid of LED's using the whole press and hold thing to scroll through them. But for now I'm going to start basic. Just try and get a variable to scroll up and down. I also want to incorporate a select button so that in the real thing, the currently lit LED is selected. But for the basic one now, just to select the byte variable's current number, and display "PICAXE" on a screen or something silly, just so I know it's worked. In the final thing I also want to use porta as the pin but I don't think this is possible. Is it?
I know the the button command can be used like a keyboard key; press and hold for a certain length of time and it will repeat for you. But after trying it I'm not at all sure. For a start I havn't got a clue what it means by:
Can someone please help me and explain what each bit of the syntax means, in english.
For ease here is the manual link and its page 29: http://www.picaxeforum.co.uk/docs/datasheets/picaxe_manual2.pdf
Attached is my current rubbish code.
Thanks in advance and well done for reading this lengthy post.
I would have kept going in the other tread but I think it is a more advanced discussion of the button command, I just want to know some basics (I hope).
Eventually I want to have three buttons. Up, down and select. I want it do loop through a 7x7 grid of LED's using the whole press and hold thing to scroll through them. But for now I'm going to start basic. Just try and get a variable to scroll up and down. I also want to incorporate a select button so that in the real thing, the currently lit LED is selected. But for the basic one now, just to select the byte variable's current number, and display "PICAXE" on a screen or something silly, just so I know it's worked. In the final thing I also want to use porta as the pin but I don't think this is possible. Is it?
I know the the button command can be used like a keyboard key; press and hold for a certain length of time and it will repeat for you. But after trying it I'm not at all sure. For a start I havn't got a clue what it means by:
Nor as to what this bit is for.Targetstate is a variable/constant (0 or 1) which specifies what state (0=not
pressed, 1=pressed) the button should be in for a branch to occur.
- Address is a label which specifies where to go if the button is in the target
state.
Can someone please help me and explain what each bit of the syntax means, in english.
For ease here is the manual link and its page 29: http://www.picaxeforum.co.uk/docs/datasheets/picaxe_manual2.pdf
Attached is my current rubbish code.
Thanks in advance and well done for reading this lengthy post.
Attachments
-
259 bytes Views: 3