Programmer Needed: EXT Port buttons


Nardella

Member
Joined
Mar 4, 2011
Messages
352
So, I got my Pandora and EXT connectors are in the mail. I would like a software/script/driver to allow me to attach buttons to the EXT port. When a button is pressed it would connect gnd to one of the multi purpose pins. Now I just need a way to map these button presses to functions on the Pandora (keyboard presses, gamepad button presses and such).


I am willing to offer a bounty, make an offer if you are unwilling to do this for free.


1. The software must be able to recognise a pin being connected to gnd as a button press.


2. It must be possible to map the buttons as L2 or R2, as well as being mapped to single or combo key presses (ctrl+shift+a for example) as well as media keys.


3. Installing and using this software must be simple:


*Download PND and config file


*Modify a config file with a text editor


*Run the PND and a menu appears that allows the user to select a config file to use.


4. The user should only have to execute the PND once and until they change something the buttons should always work.


Is there anyone who would make something that would fulfil these requirements? Are any of them unreasonable?
 
Last edited by a moderator:
on the circuitry side of things you'll want some pull up/down resistors in there somewhere


and a better way would be have 3 inputs, as 3 binary bits, so 000 to 111 (12 posibilities), then either a few logic gates or even a microcontroller attached to that. if you hooked up a simple multiplexer right it would work too


on the software side of things, it'd be setup pins as gpio inputs, set up the internal pull up/down state, then run as a daemon/whatever and check periodically (once every 100ms or so, even longer), add some basic debounce code and act on whichever number the input is at


(don't have time to help past that, but should get you going :p )
 
RE:Resistors


It is my understanding that there is no need for these in the Pandora as they are included somehow. Can an expert confirm this?


RE:Digital/advanced circuitry


This would increase cost, part count and complexity. I want something that can be built by anyone with a solder iron and access to the most basic electronics parts (along witha connector and maybe a TinyBoB.


RE:Debounce


It is my understanding that this may not be necessary, we shall find out.


-Posted from my Pandora
 
Hmm slightly related question, how would i configure uart2 or uart3 serial as extra tty device?


And to Nardella: What you are asking takes quite a lot of work, software wise. With Gui and all. The offer you are making does not really seem compelling to me, especially if you plan to sell them.


Edit:

This would increase cost, part count and complexity. I want something that can be built by anyone with a solder iron and access to the most basic electronics parts (along witha connector and maybe a TinyBoB.

hmm, might have thought a bit negative about your intentions :unsure:
 
Last edited by a moderator:
RE: UI


I didn't ask for a UI beyond being able to select a config file. It should be acceptable to have no UI besides running the program whenever you change the config file.


RE: Lots of work


What would you change to reduce the workload to a reasonable level.


RE: Fairness


First, I want the software code and hardware schematics to be open.


Second, I intend to give the developer a sample excluding shipping, I will consider more enticing offers if required.
 
ok, clear :)


Well i am working with the ext ports as well, and been reading up on the subject a lot. But honestly, there are probably lots of forum members more capable/experienced with this kind of thing.


If nobody else turns up, i will give it a shot though.


Cheers!
 
RE:Resistors


It is my understanding that there is no need for these in the Pandora as they are included somehow. Can an expert confirm this?


RE:Digital/advanced circuitry


This would increase cost, part count and complexity. I want something that can be built by anyone with a solder iron and access to the most basic electronics parts (along witha connector and maybe a TinyBoB.


RE:Debounce


It is my understanding that this may not be necessary, we shall find out.


-Posted from my Pandora

resistors: you'd only know if you tried, it's good practice though and adds maybe 30 pence to the cost


digital circuitry: 2 quad nand gate chips would probably be enough, another 30 pence tops


debounce: probably needed in some form


doing it with a single switch connecting 2 inputs would require some more circuitry than that anyway, unless the intention is to physically press 2 buttons at once you'd need at least some transistors to fake a push to make double pole switch (unless you really want to buy one of those)


and depending on the polling speeds/etc it would be hard to detect both presses at the same time, especially without any debouncing. you'd need to monitor over a certain period and see what is pressed, not the best way


but hey do whatever you feel like, your pandora your design, no need to take advice from anyone that knows how to do it :)
 
RE: Resistors


Well I can add them no problem. It was my understanding they were not needed. Where on the circuit do they go, what types do I need?


RE: Debounce


This will be figured out once programming/testing starts.


RE: Digital Circuitry


I cant find these things at my store. I could order a bunch if required, but again, I reiterate I wan't the required parts to be obtainable locally so one only needs to order the connector and TinyBob online. (save on shipping, decrease difficulty and time)


Also, can through hole versions be obtained? I would only want to do this if my way wouldn't work well enough. Altho I may be more inclined to use nand gates if I could reduce the pin count too two.


RE: Fancy buttons required for my design.


6mm tactile switches can do this.
 
and a better way would be have 3 inputs, as 3 binary bits, so 000 to 111 (12 posibilities)

Shouldn't that be 8 possibilities (2^3)? His example is only one short of that, since he's got 6 buttons + the off state.
 
Last edited by a moderator:
and a better way would be have 3 inputs, as 3 binary bits, so 000 to 111 (12 posibilities)

Shouldn't that be 8 possibilities (2^3)? His example is only one short of that, since he's got 6 buttons + the off state.
yep, that would be XD


you can probably tell i haven't done any serious electronics in a while, bring on final year project :D
 
We can have something like:


1/ 2 GPIOs instead of UART3 = 4 states -> 3 buttons (1, 2, both 1 + 2)


2/ 4 GPIOs instead of UART2 = 16 states -> 15 buttons


3/ 6 GPIOs instead of both UART2 and UART3 = 64 states -> 63 buttons


But it probably demand some gates that short proper lines for every button.


I think that this is little overkill and just 6 buttons will be enough. This provide simply solution and allow use combination of buttons if more commands needed.
 
so i'm just wondering now, how do you intend to trigger 2 inputs with a regular single pole switch?
I think that press 2 buttons simultaneously should be enough - Yes, SW must tolerate some time delay. I can imagine even more complex solution with recognition short, long and very long pressing and even one button pressed and second clicked... But Yes if there is (for example) button A, B and A+B driven by gates, than there is no timing issue and SW could be more simple.
 
Typical tact switches have four pins, none of which are connected until the button is pressed, then all four are connected.
 
yeah, so how are you going to trigger 2 inputs with a single switch, think about the circuit there for a second :p
I did, I even made a circuit diagram in the first post. Am I missing something, because I think YOU are missing something. The two inputs are not connected until the switch is pressed.
 
yeah, so how are you going to trigger 2 inputs with a single switch, think about the circuit there for a second :p
I did, I even made a circuit diagram in the first post. Am I missing something, because I think YOU are missing something. The two inputs are not connected until the switch is pressed.

actually yeah that might work, as long as you've set the gpios to pull up and active low, just a bit of an unorthodox method i guess (and a bad diagram :p where are your Vdd and Vcc rails, honestly)
 
actually yeah that might work, as long as you've set the gpios to pull up and active low, just a bit of an unorthodox method i guess (and a bad diagram :p where are your Vdd and Vcc rails, honestly)

Might work, why wouldn't it? Also, aren't Vdd and Vcc the same thing? Finally what is Vdd and Vcc? (serious question, I'm no expert in this field, I just have a good idea and know how to solder).
 
actually yeah that might work, as long as you've set the gpios to pull up and active low, just a bit of an unorthodox method i guess (and a bad diagram :p where are your Vdd and Vcc rails, honestly)

Might work, why wouldn't it? Also, aren't Vdd and Vcc the same thing? Finally what is Vdd and Vcc? (serious question, I'm no expert in this field, I just have a good idea and know how to solder).


yes Vdd and Vcc are practically the same..


Vcc and Vdd are the Positive voltages


Vcc - Positive supply voltage of a Bipolar Junction Transistor


Vdd - Positive supply voltage of a Field Effect Transistor (FET)


I think someone mentioned earlier in another thread this method would work.. when grounded it will pull up.
 
Last edited by a moderator:
Might work, why wouldn't it? Also, aren't Vdd and Vcc the same thing? Finally what is Vdd and Vcc? (serious question, I'm no expert in this field, I just have a good idea and know how to solder).
I think that guys trying to say that switches attached to GPIOs should be connected to 1.8 V pin, instead of ground. But I'm not sure too, just guessing :)
 
Back
Top