Simple QuickStart Propeller Board Question..
Kyle_K
Posts: 1
Hey Guys,<br>
<br>
I am new to the whole microcontroller thing and programming them as well.. I've been searching for a while trying figure out how to program one touch button on the board to turn on the corresponding LED.. Can anyone help?
<br>
I am new to the whole microcontroller thing and programming them as well.. I've been searching for a while trying figure out how to program one touch button on the board to turn on the corresponding LED.. Can anyone help?
Comments
http://www.parallaxsemiconductor.com/quickstart
Regards
Richard
IMO, my altered very of the touchpad object makes it easier for someone new to the Prop to use a touchpad as a button. I explained how to use the object starting in post #15 of this thread.
I have a link to a partial list of QuickStart projects in post #2 of my index.
Attached is the Parallax example code if you have not figured it out yet.
So I wrote a quick LED Chase program, then Cylon! for the LEDs.
Stored that in EEPROM.
It works fine.
But there seems to be a catch with it.
It runs fine attached to a real USB port.
But won't run the EEPROM program on a non-computer USB power source (iPod charger).
Any way to fix that?
I though I'd try Propeller Pong next.
And I'd like it to be portable.
There's some note on the schematic about it, IIRC.
I found it from the link near the top of this thread.
Thanks Duane. I missed that one.
Looking at the schematic it looks like a battery can be connected to the connector pins 39 - 40.
I'll probably go that route.
But it would be handy to power from a charger now and then.
I always add a few things to my QuickStart boards. Labels on the front and back of the 40-pin header, female headers on the Vdd and Vss holes on the right side of the board and a 2-pin male header on pins 39 and 40 so I can connect a battery pack with four AA NiMH batteries.
Two, actually.
One has a 3.5mm plug for my Protoboard and FF Platform,
The spare one will have a berg connector for the QuckStart board.
It works ok, but the pads themselves are problematic.
Too much variation in skin conductivity.
My old dry caloused fingers don't make it very happy.
I found that a bent paper clip really helped.
(actually the cuticle cutter worked best)
I'd give another 8 bucks retail for real switches on this board, guys!
But overall, I like it a lot.
(Edit to put the right copy here!)
Did you try the method I linked to in post #3 above?
I think it works pretty well.
I haven't yet, but will take a look at it .
My focus here is learning the lingo and architecture.
I wanted to give it a try for my own bad self.
As a touch pad demo I think it's pretty decent.
It's just that my fingers don't work so well as jumpers.
I thought I might try to enhance it by scanning each key two or three times.
See it that makes it respond better....
Andy
It does seem to be steadier.
I'm playing around with now it to see how long is too long.
But I still have to lick my finger to get any response.
I'm just a high impedance guy, I guess.
I have now, Duane, and I agree whole completely!
Nice piece of work.
That paid off big time. Prior art usually does.
It took a while to figure out what was going on in there...
But it gave me some pretty solid ideas on how to improve my effort.
In order to get better control of the timing: (and this one is ALL timing!)
at the beginning of the program, preset all touch pad pins as outs and preset them HI.
We won't have to bother with the output levels again,
just toggle the direction to outputs for a moment to charge the output pin to HI.
Then flip the direction back to input, wait a couple of MS for the charge to decay some,
(went out to 4500 US before it got flaky again, but more than 2 MS just slows down the program)
and read the pin. Voila! I'm low impedance!
I'm glad I could help.
I can't claim credit for all the code I linked to. I mainly changed it so it was easier for new user to the Prop to use the touchpads as buttons. Instead of having all touchpad states as bits in a byte I had each touchpad have its own byte. (I know I have a version the fills both a byte array and also writes all states to one byte.)
I see you converted the code to all spin.
I liked not having to deal with the pins at all, just read the bytes from the button array.
BTW, the battery box I posted does have a switch. I think I have at least four of those boxes. They're great to use with QuickStart boards.
I think the way the touchpads respond is dependent on the local weather. I've used code others swear by that doesn't work for me and I've also had people think my code doesn't work well for them.
I used my version in the QuickStart servo tester, I think it works great.
I think the main thing is to get across to new users that you can't treat the touchpads as if they were buttons (without the appropriate code).