Skip to content

Conversation

fatfingers23
Copy link

@fatfingers23 fatfingers23 commented Jan 24, 2025

I've been enjoying this crate and trying out this little microcontroller with Rust. While testing it out and seeing what it could do with a little demo project, I needed 2 i2c devices and came up with this solution that works, as shown in the video. The demo reads from an SCD40 sensor, then displays it to an OLED SSD1306 and bounces like a DVD logo. I'm unsure if it really counts as a bus, but it works for me.

A couple of things on it

  • I based this example off of embassy's rp example. I used a dummy device as they did, but I can also change it to use an actual crate if preferred
  • I did try to break this out into tasks and did get it to build with StaticCell version 1.3 and blocking i2c. But the minute it passed the i2c bus to another task it would panic and have not been able to get panic messages to print on the ch32v003.
output.mp4

@fatfingers23 fatfingers23 changed the title Feature/v003 i2c examples ch32v003 i2c shared example Jan 24, 2025
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.

1 participant