Comments (7)
yes, sure. Some controllers are reporting the battery status, so it shouldn't be that difficult to add it.
In particular, what controller are you using? Just to double check that it reports the battery status
from bluepad32.
Forgot to add im using the Arduino nano 33 IOT platform. Just incase this functionality exists on another platform.
from bluepad32.
brilliant thanks.
I primarily use a PS4 pad but also been testing an Xbox One S and Wii controller.
Understandable not all controllers may report a battery status.
from bluepad32.
This feature is going to be included as part of get_controller_data
(instead of get_gamepad_data
)... and controller
will include a union of gampead, mouse, balance_board... and the battery will be part of that.
from bluepad32.
@ricardoquesada Sorry forgot to reply to this after the XMas holidays.
Yup that plan sounds good. Noticed your recent commits on this work, if i was to pull the BP32 firmware from a latest develop build it would have this functionality in right?
Is the Arduino side of the fence implemented to query that data from the Nina chip?
If so i will pull down and have a play, thanks.
from bluepad32.
the NINA part is missing... Planning to work on that this week / weekend.
I split the data in a controller union
- gamepad data
- mouse data
- balance data
- (...open for other type of controllers in the future)
And the controller properties includes the battery.
The old API will still work... you should be able to do get_gamepad_data
.
But the new one is more flexible...
Pending: Add the new Controller API on NINA and also on Arduino (non-NINA)... test it... and release it.
from bluepad32.
Fixed.
Please test it with:
- bluepad32-arduino v1.2.0
- bluepad32 FW v3.6.0-rc0
There is a new method called battery():
0 = Unk
1 = Empty
255 = full
There is a new API to handle Controllers... which is Controller.h
...
And Gamepad
is just an alias to Controller
... so you don't have to change anything... but you might want to do some renames in the future to keep it cleaner.
from bluepad32.
Related Issues (20)
- [Bug]: Pairing/Connection issues at startup HOT 5
- The ESP32 WROOM32 development board is getting hot. HOT 1
- [Bug]: Not reporting Y-axis data on ESP32 C3 from Xbox One Controller HOT 2
- [Bug]: Stadia Controller error: 'NINA_GPIO0' was not declared in this scope HOT 3
- Uno R4 HOT 2
- [Bug] Bluepad crashing when connecting `Switch Pro controller` devices HOT 7
- [Bug]: `uni_hid_device_get_idx_for_instance()` reports index 0 for all devices HOT 6
- quick connection to one gamepad HOT 1
- Add Bluepad32 to Board Manager HOT 2
- Arduino Nano ESP32 / Lolin S3 mini: Serial output not working HOT 10
- BLE Controller for the ESP32S3 HOT 15
- [Bug]: uni_bt_allowlist.h not found HOT 1
- Support for "TikTok Ring Remote Controller" HOT 10
- [Bug]: Xbox controllers using FW 5.x don't support rumble HOT 9
- Unable to connect to esp32 in AP mode HOT 29
- esp-idf using Rust (esp-rs) | Generate FFI Bindings HOT 2
- BluePad32 and RP2040 only working when connected to PC and arduino IDE open HOT 11
- Adaptive trigger support for dualsense HOT 5
- Issue #70 is not resolved by implementing the code change. HOT 1
- [Bug]: 2nd Controller causes the first PS5 Virtual Device to get knocked off HOT 6
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.