 It's me JP. It's time for another episode of JP's product pick of the week Thank you all so much for stopping by today First of all that string. Where did that string come from? That's just gonna bug me because the Fan is blowing it all around. All right. That string is gone First of all, thank you for stopping by If you're wondering where the chat is happening at jump on over to our discord server That's at Adafruit.it Slash discord jump on over into the live broadcast chat channel people are hanging out there Hello, and thanks for stopping by see Grover and Skur and Jim Hendrickson Franklin and the bow dog in the house of Blitz City DIY Evil Dave of Canada Thank you so much for stopping by Also in our YouTube chat, we've got Dave Odessa and Quinn man 16 Hello Thanks. Thanks for jumping in Quinn man. What do you mean by you had to JP sign? I don't know what that means What does that mean? Let me know. Let me know in the chat. I'll keep an eye out Let's see also If you want to watch this show from inside the product page and get a jump start on checking it out and making Your own mind up if this is for you if you'd like to get this week's product pick That's it right there product ID 4479. It is half off We've got it on a deep deep discount right here for you today Normally 995 and today it's four dollars and ninety-eight cents just during this show But what is it? What what is he talking about? Well head on over there or hit that QR code there if you Want to use your camera your phone to jump over there instead of typing like a Savage just point your your robot pocket robot phone at it and it'll take you there So this show happens right inside of the product page there or any of the other Multitude of places that you can watch it a fruit live streams But before I go any further I'm gonna have lady Ada. Tell us a little bit about this product This is a quick one, but here's here's a little bit about it from the new new new video And then I'll get into some more details for you. So take it away lady Ada We've got the list three MDL magnetometer such as triple-axis magnetometer It's a nice little sensor has I squared C has SPI has I think like four six eight 12 gals range so nice big range you can use this for Magnetics, but it honestly it's best for doing earth magnetic field detection This is just the STM 32f 405 feather And it's got a Qt connector on it, and then I've got here the magnetometer and the accelerometer Jira scuba gonna really zoom in to see and it can display, you know the nine-dolls senses That's right. I said it was brief, right? But look there it is and I'm gonna talk more about it There is this beautiful little stem of Qt module the list 3d ml Let's talk about this This is my product pick of the week this week it is the three-axis magnetometer at list 3d MDL It is a stem of Qt board so you can plug and play over I squared C and Use it like a compass this one is tuned particularly well for magnetic north for detecting the earth's magnetic field Some of these magnetometers are more suited for strong magnets They're tuned for maybe using as as detection for Joysticks 3d joysticks and things like that this one really is a magnet module. So Let's take a look at it. Let's talk about it here I'll I'll go to the overhead view here here. You can see this has two stem of Qt ports on it It has jumpers for two different addresses So you could depending on what you needed in your project have two of these Or if you have a conflicting address you can you can grab a different one And you can pipe your stem of Qt through to pair this up with other other sensors like Lady Aida didn't her demo We also have pins so you can if you're not using the stem of Qt Cable you can also use pins to connect this into a breadboard a permaproto a circuit board of your choosing but this detects on three axes which you can then Use code both to calibrate it to to get rid of noise of other of their local magnets and hone in on the earth's Magnetic north and then give you a heading which is often what you want out of these type of modules Which is just where's where's north which I keep pointing it that way because that's basically north from where I stand so Let's let me let me plug this in and give you a little demo. So I'm gonna back this camera out here and refocus And I'll show you how easy it is to set this up. So first of all, I'll plug a stem of Qt cable in right there And then I'm gonna use this Try to get these oriented happily I'm gonna use this board, which is a feather ESP 32 s3 reverse TFT So there's all the all the guts there and there's our stem of Qt port. There's a nice TFT display And for now, what I'll do is I'll just plug in a battery and What this is gonna do is print out the compass heading so when I get to about zero or three sixty three Fifty-nine one that that range of things zero that is north and you can see we can Point this around pivot this around get about 180. There's south West Find east over here, so I just have it spitting out the degrees On on the display there and you can also check out with a little finer grain detail I just didn't want to print out the decimal places on there to keep the display neat But if you take a look at this view here, you can see I am printing out to the serial Repel there degrees with a couple of points of precision decimal precision there And you can take a look at how this code works. So in this case what I'm doing I'm importing a couple of important math libraries a tan two and degrees. I'm importing the list three MDL Library which is specific to this chip here and then I'm doing some display stuff I'll get to this later, but you can see I have some offset values that I'm using I calibrated this and I'm and that's important We'll come back to that, but if you just want to ask it Maybe before you've calibrated it just with whatever magnets happen to be around What is my heading what we're gonna do is set up I square C set up the sensor as a sensor on I squared C And then we're using this You can use the default I think this may be the default, but I'm setting it to the the 16-goss range. You can change that And then we have a couple of functions here. We're using The vector two degrees and asking it to return a vector based on two inputs the X and Y values And we're also getting this heading from the sensor by saying, okay, give me the magnet value of X and Y which are two of the three Values you get when you just simply ask this sensor for its magnetic Value to give you X Y and Z. We're just gonna ask for X and Y and then in the main Loop of the code what we do is first heading get heading sensor So that uses that function to say, okay, what are X and Y on this on this chip here And then I'm printing that out and then I'm also saying Print that to my screen Using label text, but what that does you can see when I say get heading it jumps up And it says get the X and Y and then go and return for me the vector Which is what's returning this zero to 360 here now you can see here I mentioned I've got an offset And I'm using that offset here in this get heading I'm saying the calibrated X and the calibrated Y are based on the magnetic readings on X and Y minus these two offsets So there are a couple ways you can get these and I'll show you the the library and Or rather, I'll show you the learn guide for this in a second at first I used the Sensor lab code in Arduino that Adafruit has out there to help you Calibrate this and then later I was able to actually get some code from C Grover He's attributed Melissa up here, but C Grover did some modifications to this Calibration library and he's working on some updated code for this that hopefully will publish and put into the guide but this goes through and takes a bunch of samples and throws away the Sort of distracting magnets, so you do some revolutions on each axis And it can figure out what the the necessary offset to Subtract is so then I took those values and put them into my final code Oh, we might even work that up into a nice slick thing where you can hit a button to put it into calibration mode And then automatically subtract those when you're using it So if you want to take a look here, this is Product page for this here lists 3 MDL it's $4.98 right now. Hopefully we still have some in stock I think we had about a hundred at the start of the show looks like we still do that's great You don't need a coupon code if you want to buy this just throw it in your cart You can get up to ten of them check out before the end of the show or just a few minute grace period after and it is yours at That great price Some info about it some links and then if you follow the learn guide links here You'll see we've got the primary guide for this as well as that sensor lab one I mentioned and I can I can show you those so here is the main guide it will take you through Info about it the pinout how to put it together and use it in your project as well as the Download section which will give you some data sheet you can download as well as other fab information And then there are examples for using this in both Arduino and in circuit Python So this will show you how to set it up use the list 3mdl library in Arduino or Same sort of thing right here in Python or circuit Python Code is available. Yeah, Jeff Hunt. Hi Jeff in the YouTube chat asks if the code is available code. I'm using right now You can use the magnetometer calibration Code in Arduino here, but soon you'll also be able to do it in circuit Python and the the actual Example code I'm using if you just look here at the bottom of the learn guide circuit Python page This is going to give you some basic magnet sensing if you go to the Library on github so there's a link right there and check out the examples section List 3mdl compass. That's the code that I'm using And then on top of that. I'm also subtracting the the calibration data. So pretty soon the guide will show you how to do all of that and if you want to Take a look back probably in a week or so we should have both the calibration code and that compass example there in the Main learn guide page Let's see so what else What am I forgetting There's a lovely product photo of it right there You can see it shows the Silkscreen has the axes listed there. So this Has x normally you'll keep this flat x pointed this way y to the side z up and it uses It's able to use any of those or combinations of those axes depending on the orientation of your project, whatever makes sense But laying it flat like this is is the best way for Example code that we have there Let's see. What else? Oh DJ Devin 3 says picked up a couple of them for wind detection. Oh, that's that's pretty cool for wind direction Yeah, so what do you do? Do you mount that on a weather? Sail kind of thing a little weather Cups, I don't know how you do that. I don't know much about weather wind measurement Wind vane. Yeah, it's pretty cool. That's a neat idea You can also use this for things like robotics for any type of projects that want to Guide guide an object based on map information, it's useful for that and pretty similar module to what you find in the Six-dolph and nine-dolph sensors that'll that'll combine things like the magnetometer Accelerometer and the gyro and this is just the magnetometer So so you have a project that doesn't need the big $20 9-dolph thing. You just you just really want a compass. This is the module for you So like I said head on over to that URL right there if you want to go pick them up that will that will take you to the product page Discount applies just during the show. You don't need a coupon code And one other thing by the way I wanted to show here is that I have Little battery power going on there so you can see if I Need to take this off the computer. No problem. Feather has a little charger in there So that'll that'll work well and I'm able to find north Where I'm going All right, I think that's gonna do it. Let me know if you have any other questions in the chat Looks like we're all good. Yeah, so go grab some Let's see Gory G says I'd mount the magnetometer on the mast and a magnet on the weather vane. Oh Interesting, okay, so so use the magnetometer in a fixed position, but just move a magnet Bolted to the to the vane neat. It's very cool. All right. I think that is gonna do it then for today So that right there That's it. That's my product pick of the week this week. It is the list Let me say that again. That's my product pick of the week this week It is the list 3mdl 3-axis magnetometer breakout with stem aqt Greater print industries. I'm John Park. This has been JP's product pick of the week and I will see you next time Bye-bye