Skip to content

M5atom Matrix and S3 migrate MPU6886 from pins/i2c to Ecma-419#1600

Open
stc1988 wants to merge 3 commits intoModdable-OpenSource:publicfrom
stc1988:migrate/sensors
Open

M5atom Matrix and S3 migrate MPU6886 from pins/i2c to Ecma-419#1600
stc1988 wants to merge 3 commits intoModdable-OpenSource:publicfrom
stc1988:migrate/sensors

Conversation

@stc1988
Copy link
Copy Markdown
Contributor

@stc1988 stc1988 commented Apr 21, 2026

Mixing pins/i2c with ECMA-419 I²C on the devices causes a conflict error.

Therefore, as a first step, this PR migrates devices that require minimal changes to ECMA-419 I²C. Please let me know if you have any concerns.

@stc1988 stc1988 marked this pull request as ready for review April 26, 2026 11:57
@phoddie
Copy link
Copy Markdown
Collaborator

phoddie commented Apr 27, 2026

[sample.gyroscope.x, sample.gyroscope.y] = [sample.gyroscope.y * -1, sample.gyroscope.x];

That's a subtle way to get a hidden temporary variable. ;)

@stc1988
Copy link
Copy Markdown
Contributor Author

stc1988 commented Apr 27, 2026

ChatGPT is much more of a JavaScript expert than I am.

@phoddie
Copy link
Copy Markdown
Collaborator

phoddie commented Apr 27, 2026

For those of your following along at home, here's a backgrounder.

@stc1988
Copy link
Copy Markdown
Contributor Author

stc1988 commented Apr 29, 2026

In this PR, the main focus is on resolving the I2C conflict, but if we are to fully migrate to ECMA-419, I think it would be necessary to create common modules for things like buttons as well. What do you think?

@phoddie
Copy link
Copy Markdown
Collaborator

phoddie commented Apr 29, 2026

...if we are to fully migrate to ECMA-419...

We are. Still considering the time line, but I expect it to be this calendar year. (Don't panic... it will not be a surprise!)

...I think it would be necessary to create common modules for things like buttons as well. What do you think?

Absolutely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants