M5stack new joystick example
-
Is there an example how to connect the new joystick (I assumd i2c only) to esp32? How to access the joystick status? Also, is it delivered with firmware installed?
-
@YigalB I2C is correct.
Here is the example:
https://github.com/m5stack/M5Unit-Joystick2/blob/main/examples/get_value/get_value.ino
The internal firmware is already installed and like most M5Stack Units it is 'permanent' and does not require your attention but could theoretically be updated in the future. -
@teastain Thank you! Exactly what I needed to know.
Another thing that bothers me: When looking at the I2C protocol in the documentation, it states the "I2C address" is RW (read write).
- I assume the Write part is in order to change the address - probably in order to include 2 joysticks at same time. Is this command stored on a non volatile memory? Or is it needed to be executed every power up?
- if 2 joysticks are connected in parallel, how is it possible to direct the command from the master to a specific one?
Of course, if the answer to 1 is yes, this can be easily done with step by step.
(or if there are jumpers on board the joystick). -
@YigalB Two Joysticks would require a PaHub accessory from M5Stack:
https://shop.m5stack.com/products/i2c-hub-1-to-6-expansion-unit-pca9548apw
These work very well, seamlessly.
I don't know how to change the I2C address of the Joystick in this register, sorry. -
@teastain Yes, using I2C splitter is a practical solution for using I2C devices with same address. I use it often.
Yet the "Write" ability caught my attention, since it is saving the need for the splitter.I will try approaching the customer service.
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login