Basic library structure and sending/receiving NOP (no operation) commands …
↓↓↓ Complete description, time index and links below ↓↓↓
Three weeks ago we had a fist look at the Melaxis MLX90363 Triaxis® magnetometer (link below). While the chip supports a wide range of applications, the existing Arduino code for it does not. So it’s time to start writing our own library for it.
We’ll first go through the datasheet and the getting started guide (links below), figuring out how to establish SPI communication in an elegant and efficient way. Then we’ll code our library framework implementing the NOP command.
00:00 Intro – just implementing NOP, this will be boring
01:18 Message structure – all eight bytes with few similarities
03:12 CRC – fancy polynomial CRC-8 using a table
08:58 Markers – identifying regular and other messages
10:48 OpCodes – determining the type of operation
13:06 NOP messages – but for echoing a key doing nothing
14:56 C++ unions – elegant & efficient way to model messages
24:22 Code – walkthrough through the rest of the code
34:53 Test – works, but of course kinda boring
36:02 Wrap-up – handling more OpCodes is next, bye
Tutorials • Tutorials
Melexis MLX90363 Triaxis® Magnetometer & Arduino MCU – The Basics • Melexis MLX90363 Triaxis® Magnetomete...
My code https://drive.google.com/drive/folder...
Melexis MLX90636 Datasheet https://media.melexis.com/-/media/fil...
Getting Started Guide for MLX90363 | Melexis https://media.melexis.com/-/media/fil...
Sunshine’s Homepage – Understanding CRC http://www.sunshine2k.de/articles/cod...
#arduino #magnetometer #microcontroller #spi #tutorials #tutorial #how-to #robertssmorgasbord
Watch video Melexis MLX90363 Triaxis® Magnetometer & Arduino MCU – The Details (1) online without registration, duration hours minute second in high quality. This video was added by user Robert's Smorgasbord 28 July 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 21 once and liked it 1 people.