Comments (5)
Thanks for that - looks great. I will add the enhancements based on your work!
from snesdev-rpi.
@axle-h does your fork work when using the GPIO adapter ? I installed it hoping it would solve the issues i'm having with my SNES controllers, but i don't know what values i should put in the configuration file, since the pins of the SNES controllers are not directly connected to the Pi GPIOs.
from snesdev-rpi.
Never mind, i found my answer for revision 2 of the adapter :
- Gamepad 1 GPIO = 27
- Gamepad 2 GPIO = 22
- Clock GPIO = 23
- Latch GPIO = 24
- Button GPIO = 17
It's working but i see you have removed the option to handle different behaviours on 1, 3 or 5 presses on the button. Is there a way to get this option back ? Sorry to ask this question here, but you didn't open the "issues" tab on your Github fork.
from snesdev-rpi.
Hi, Yeah probably not right place to be talking about a different branch here until/if it gets pulled. Issues can only be created on the original repository unfortunately. Is my email address not visible?
I don't know about the adapter - I built my own. Most of the fun of using the Pi is to find your own way anyway!
I took the button press polling thing out as it was a bit over complicated, was difficult to setup from a config file and I didn't need it. It should be relatively easy to implement though. Check out button.c. It's a simple state machine. You just need to add some more states and decide when to switch to them. Maybe add a counter in the button struct and "do stuff" when it hits a particular threshold - I think that's how Florian implemented it. It might be difficult however to add this to the config. Hence why it's not in my branch. Might look at it. Be an excuse to have another dabble with this. Unless you fancy a go?
from snesdev-rpi.
I'm writing here instead of e-mailing because this may be of some interest to someone using your fork :)
I understand your code but i'm not a C dev, so for now i'll keep it like this. Maybe i will try to patch it some day.
For the configuration of the button, you don't have to make it fully configurable with a variable amount of programmable key presses. Maybe you could just have something like this :
Buttons {
Button 1 {
Enabled = true
# Tap the button to press this keyboard key
SinglePressKey = "R"
#SinglePressCommand =
# Double tap the button to press this keyboard key
DoublePressKey = "ESC"
#DoublePressCommand =
# Hold the button for 3 seconds to execute this command
LongPressCommand = "shutdown -t 3 -h now"
#LongPressKey =
Gpio = 5
}
# Frequency to poll buttons in Hz
PollFrequency = 2
}
What do you think ?
from snesdev-rpi.
Related Issues (20)
- Update documentation
- Check functionality for revision 2 boards HOT 3
- Can't compile on latest raspian HOT 3
- SNES Controllers wrong way round? (GPIO Adapter) HOT 1
- Add configurable input-key mapping HOT 2
- Can't install SNESDev-RPI HOT 1
- link directly with libconfuse or support building against raspbian package HOT 1
- Enhance polling of controllers HOT 1
- Not working with Jessie Beta - Systemd missing HOT 1
- sudo ~/SNESDev-RPi/bin/SNESDev & HOT 1
- Install Scripts in RetroPie not completeing fully HOT 3
- Feature request - Reset GPIO HOT 2
- Compile as kernel module HOT 1
- Rewrite in C++ HOT 1
- Register missing signal types HOT 1
- Add short/long button press recognition HOT 1
- connection issue HOT 5
- Implement three Button recognition HOT 1
- Button polling with interrupts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snesdev-rpi.