Newbie to Parallax, using Quickstart board for learning Spin - Question on Touchpad
kvanepps
Posts: 10
I just received the Quickstart board and I am going through the Propeller Education Kit manual. I know it does not use the Quickstart board but I thought I could go through the sample problems to understand how the spin language works. This is fine until I try to read pushbutton switch states as input since the Quickstart board has a touchpad. I could use the header connector with pull-up resistors and ground the pins but I would like to use the touchpads. I tried the touchpad demo (TouchButton LED Demo) but I don't see any information on reading a single touchpad.
Is there any information on what commands can be used with the touchpad object? Sorry for such a simple question.
My intention is to use the Quickstart board to send in a command via the serial interface and then decode the command I receive and bit-bang one of the output pins. I know it will work but I need to understand how to use the spin language.
Thanks
Ken
Is there any information on what commands can be used with the touchpad object? Sorry for such a simple question.
My intention is to use the Quickstart board to send in a command via the serial interface and then decode the command I receive and bit-bang one of the output pins. I know it will work but I need to understand how to use the spin language.
Thanks
Ken
Comments
I just showed Jose how to use the touchpads in a similar way to buttons. Start with post #15 of this thread and follow the directions in post #17. You'll need to use a modified version of the touchpad object that's part of the code in my QuickStart servo tester program (there's a link in post #15 of the thread I just mentioned).
Let me know if you have any trouble.
Heres a PUB method I used with the quickstart board. The original thread can be found here.
This example reads all 8 buttons and sets the global variable "thePin" to a particular value depending on which button pressed. You should be able to easily adapt it to your needs.
Paul
Thanks again
Ken
I think this method would only work for push-buttons, not for the capacitive touch pad that the Quickstart board has.
Thanks
Ken
Paul's method of doing this and mine are very similar.
The buttons' (touchpads') states are held in one byte with Pauls code. I use a byte for each pad in mine. I think mine might be easier for someone who isn't familar with checking the state of individual bits within a byte.
Paul's method uses less memory to store the pad states. Pauls method makes it easier to display the pad states on the LEDs. Both methods have their advantages.