flâneur

CH32V003F4P6 - I2C communication — Curious Scientist

curiousscientist.tech · 2,213 words · saved by 1 readers

In this article, I continue the lecture series with a new topic. I will cover some basics of i2c communication and I will demonstrate some code where I communicate with a sensor by sending instructions to it and reading values from it. The CH32 code examples don’t have any transmit and receive funct

In this article, I continue the lecture series with a new topic. I will cover some basics of i2c communication and I will demonstrate some code where I communicate with a sensor by sending instructions to it and reading values from it. The CH32 code examples don’t have any transmit and receive functions implemented that we can find in the Arduino IDE as Wire.read() and Wire.write(), so one of the first things to do will be to implement these. Then the rest is easy because we just need to use these two functions to send and receive data from an i2c device. The i2c communication consists of…

saved by

related reading