Comments (8)
Perhaps there is a way to ping the "db" (how strong the signal is)... and report that feature.
A "ping" or "keep alive" also, but I don't know whether Bluetooth has that feature
from bluepad32.
Yeah... I have a car with xbox controller, works as well, but when disconnect, by code of Bluepad32 have a timeout of 20s, then if I'm pressing to accelerate and lose connection, my car continue forward movement and crash in any obstacle :/
I try to find some way to do that manually but don't have how, no true feedback from bluepad.
from bluepad32.
yes, I should provide a way (assuming it is possible) that the controller might be out-of-range soon... I need to investigate it a bit more
from bluepad32.
I recommend using something like this:
in your main loop, you should receive a "gampad event" almost everyframe.
if you don't receive an event in 250ms, then either:
- no new events were received (buttons/axis are not being pressed)
- or the gamepad was disconnected/outside the range
in any of those cases, just turn off the motors, etc.
from bluepad32.
Hi,
I'm facing a similar issue using 8bitdo Controller.
Can you explain more specific how to implement such a "gamepad event" flag which could be used to react on?
thx
from bluepad32.
@JochenKr See this comment. It explains how to use it: #42 (comment)
from bluepad32.
Thanks. Tried it and it improves the situation a lot. Still I need to add some delay like 2s, because the response from update() seems to be often false. But this should be good enough for my case
from bluepad32.
I didn't understand the delay that you need to add.
Take a look at the updated Sketch to learn how to use correctly:
search for hasData
and update
in that file... those are the two new functions added.
from bluepad32.
Related Issues (20)
- ESP32 Pico D4 support HOT 2
- bluepad32 arduino library should be open source HOT 3
- Dualsense PS5 controller bluetooth range? HOT 3
- Add setFlash option for Dualsense RGB LED HOT 2
- Timeout selection need for disconnected controller HOT 2
- PS4 esp32 HOT 3
- Add improved Rumble API: weak / strong magnitude, delayed start, and duration in ms HOT 1
- Arduino Nano ESP32 / Lolin S3 mini: Serial output not working HOT 3
- [Bug]: 8bitdo controllers go into constant rumble with new play_dual_rumble API HOT 25
- [Bug]: Pico SIGTRAP in Switch IMU parsing
- Filter gamepad connection HOT 2
- [Bug]: erro ao baixar pacote de placas HOT 7
- [Bug]: Failed to disconnect HIDS client for hids_cid=0, status=2 HOT 1
- [Bug]: 4.0.2 reports weird 99.99.99 version after flashing HOT 6
- [Bug]: More than three Xboxone handles will cause problems HOT 15
- [Bug]: Xbox One controller hangs on pairing HOT 8
- [Bug]: Warning message when Gamesir T3s connects HOT 1
- ESP32-C3 does not found Switch / 8Bitdo Controller but XBOX Wireless Controller HOT 3
- SDK Config Parameter for Analog->Digital presses HOT 1
- SDK parameter to control button remapping by position or lettering HOT 1
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 bluepad32.