QST QMC5883L 3-Axis Digital Compass and Arduino MCU – The Details (1)

Robert's Smorgasbord
Robert's Smorgasbord
1.7 هزار بار بازدید - 2 سال پیش - QMC5883L registers, I2C, reading and
QMC5883L registers, I2C, reading and writing control registers …
↓↓↓ Complete description, time index and links below ↓↓↓

In “The Basics” video (link below) we briefly discussed the QMC5883L’s axes, choose a readily available library for it, did the necessary calibration and got some compass headings from it. We also had a squiz at some alternative libraries.

Now it’s time to go into the details and write our own library for the QMC5883L. We start by having a detailed view at its registers. Then we read, respectively, write its control registers via I2c.

00:00 Intro – we’ve covered the “basics”, now it’s time for a library
01:03 Disclaimer – I’m a dwarf standing on the shoulders of giants
01:28 Datasheet – the QMC5883L’s registers are a good place to start
07:37 Architecture – maintaining a copy of the registers in memory
09:39 First version – just handling the configuration and I2C for now
10:26 Header file – class, types, methods and member variables
14:19 CPP file – initializing static variables and implementation
17:56 I2C read – another look into the datasheet and the code
22:59 I2C write – yet another look into the datasheet and more code
25:56 Sketch – just testing reading and writing the configuration
27:47 Result – configuration written and read back from the chip
28:31 Wrap-up – bit anticlimactic, but heavy lifting is done, bye

Tutorials Tutorials
QST QMC5883L 3-Axis Digital Compass and Arduino MCU – The Basics QST QMC5883L 3-Axis Digital Compass a...
Making Sense of NMEA 0183 Sentences – Specs & Arduino/MCU/C++ Code (6) Making Sense of NMEA 0183 Sentences –...
My code https://drive.google.com/drive/folder...

#arduino #compass #magnetometer #i2c #microcontroller #tutorials #tutorial #how-to #robertssmorgasbord
2 سال پیش در تاریخ 1400/12/29 منتشر شده است.
1,798 بـار بازدید شده
... بیشتر