Shop OBEX P1 Docs P2 Docs Learn Events
Wearable Keypad Object — Parallax Forums

Wearable Keypad Object

Duane DegnDuane Degn Posts: 10,588
edited 2011-09-11 15:40 in Propeller 1
I recently purchased one of these from SparkFun.
10411-00.jpg


I've been positively impressed by it so far.

I wrote an object so a Propeller can retrieve the button information. The code is very similar to the sample code provided on the product page.

Like the example code, the up and down buttons control the LED brightness.

I use the left and right buttons to make fine adjustments of the brightness.

I haven't (accurately) measured the current to the LED line yet. I'm afraid it is likely over 30mA. It is probably a good idea not to turn the LED brightness up to its maximum level.

I'll check on the LED current and post an update.

I used 10K Ohm pull-up resistors on the four button lines.

The code could be modified to be able to read multiple button presses. Up, down and center don't conflict with each other. The right and left buttons are multiplexed with other buttons so you wont be able to read them at the same time as some of the other buttons.

I plan to use my "Wearable Keypad" with a GPS data logging pedometer I'm making. Soon, I'll know how far my wife and I walk in the evenings.

Duane

Edit(3/11/15): Warning, the code attached is an old version. There are likely better options available.
I plan to upload this program or an improved version to my GitHub account
If there isn't code similar to what is attached here on my on GitHub, send me a message and I'll make and check for any improved versions of the code.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-11 10:18
    There was a bug in the program I posted last night. I just uploaded a fixed version.

    I forgot to notice how many times the original code had been downloaded prior to replacing it. If any of you downloaded the program I originally posted be warned there's a severe problem with the way I assigned the stack.

    Duane
  • jazzedjazzed Posts: 11,803
    edited 2011-09-11 10:59
    Hi Duane.
    This looks pretty neat. How do you plan to wear it?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-11 15:40
    jazzed wrote: »
    Hi Duane.
    This looks pretty neat. How do you plan to wear it?

    I was thinking I'd use it as a neck tie.

    I'm not really sure how I'll wear/use it. I'll likely keep it in a pocket. Another possibility is to attach it to my watch band some way.

    I thought I might be able to increase the accuracy of the GPS pedometer is I push a button each time we turn a corner on our walks. I'll have the program assume we walked in a straight line between corners. Hopefully this will correct for the accumulated errors that are so common with GPS devices. I doubt I'm the only one to observe the distance traveled increase on a logger even though the logger has been stationary during the logging process.

    I'll start a thread on this project when it's a little further along.

    Duane
Sign In or Register to comment.