Create a Compass with Raspberry Pi Pico and Magnetometer - Heading Angle Calculation

  Рет қаралды 3,245

Shilleh

Shilleh

Күн бұрын

Пікірлер: 16
@moinbart
@moinbart Жыл бұрын
Thanks a lot for sharing this information! I just have a question related to declination angle you used. On your location it is 3 degrees 19 minutes, correct? So shouldn't it be ~3.32 degrees in decimal instead of the 3.19 you used? Kind regards to Austin and thanks again for sharing your knowledge!
@mmshilleh
@mmshilleh Жыл бұрын
Hey, thanks for your comment. A quick Google search shows that it's closer to 3.19 but honestly, I could be wrong as I was using an open-source website to calculate it. Is there a reason you are convinced it is so different?
@moinbart
@moinbart Жыл бұрын
@@mmshilleh I'm just talking about the values in your video. When you hover over the marker on the map one can see it is 3 degrees 19 minutes. Just wanted to mention that it has to be converted to decimal and that 3 degrees 19 minutes IS NOT the same as 3,19 decimal degrees.
@mmshilleh
@mmshilleh Жыл бұрын
@@moinbart ah that is a very very valid point you are correct! Wow thanks for catching my mistake :) hope others learn from this false interpretation as well. I wasnt too familiar with longitudinal and latitudinal data. Thanks again!
@jeremyray3371
@jeremyray3371 5 ай бұрын
Hi, I am doing a mobility device for an engineering class using this chip on an adafruit ICM-20948. This code / math is invaluable and I thank you much! Definitely earned an attribution
@mmshilleh
@mmshilleh 5 ай бұрын
Thanks, Jeremy I consider myself accomplished when I save people's time. Hope I earned a sub from you. Best of luck in your class buddy.
@charlotteswift
@charlotteswift 10 ай бұрын
@mmshilleh I've just ordered a magnetometer which is probably why KZbin suggested this video to me. I watched it because I had an awful feeling that I should have ordered the MPU that you're using rather than continuing with my MPU6050 and adding a magnetometer. I really hate having swathes of if... elif...else statements in my programs especially as I wanted to show 16 points of the compass. Maybe you'll be interested in my cunning solution (or maybe you won't). wind_dir = ['North', 'North North East', 'North East', 'East North East', 'East', 'East South East', 'South East', 'South South East', 'South', 'South South West', 'South West', 'West South West', 'West', 'West North West', 'North West', 'North North West', 'North'] direction = wind_dir[round((angle % 360) / 22.5)] PS my angles would never be negative.
@mmshilleh
@mmshilleh 10 ай бұрын
Yeah looks good to me, what magnetometer are you using? Is it a good performing one?
@charlotteswift
@charlotteswift 10 ай бұрын
@@mmshilleh I ordered a BMM150 3-Axis Magnetometer. No idea how good it will be but I'm only playing around learning how to do things on my Pico W. I've also ordered a M5Stack M5StickC PLUS but I don't know whether that has a magnetometer built in. My existing magnetometer only works with an Arduino so I would have to connect my Pico to my Arduino to get the readings and who can be bothered with that? I used to work as a programmer but now it's all for fun👍
@mmshilleh
@mmshilleh 10 ай бұрын
Well, I hope it works out for you, never used or heard of any of those components, to be frank haha. Happy to hear you still do it for fun! Hope you stick around on the channel. Thanks :) @@charlotteswift
@ChantOfSpirit
@ChantOfSpirit 15 күн бұрын
Dear author, guide is good, but for some compass/chips models we have CCW value (heading) result. For example, you turning to right (CW) and geting 1,2,3,4,5..., then from 0 (north), you are turning to left (CCW) and getting 359,358,357,356... I'm getting the same, but reversed: Your: 359 | 0 | 1 My: 1 | 0 | 359 Do you have idea about how to fix it?
@mmshilleh
@mmshilleh 12 күн бұрын
Hmmm I am not sure, what chip is it? Where did you buy the board
@ChantOfSpirit
@ChantOfSpirit 12 күн бұрын
@@mmshilleh I found solution (rotation - turn over)
@keontae7270
@keontae7270 Жыл бұрын
Thank you for the video! I do have a couple of questions though as I am new to the pi pico w, are you able to code directly onto the device or does a separate raspberry pi need to be used? I ask this because I had tried to code on the pico and it does not seem to save and when changing the pico interpreter in thonny to micropython the pico was not detected, is there a reason for this?
@mmshilleh
@mmshilleh Жыл бұрын
What happens is that you code in Thonny and it should be directly on the device. If you want to get started with the Pico you should hold the bootsel button before plugging it in and that will allow you to install micropython in Thonny. Have you done this step?
@keontae7270
@keontae7270 Жыл бұрын
@@mmshilleh yes I hold the bootsel button then plug it in, but nothing seems to save on it.
Measure Altitude with BME280 and Raspberry Pi Pico
6:36
Shilleh
Рет қаралды 2,7 М.
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,1 МЛН
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 36 МЛН
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,7 МЛН
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 13 МЛН
Touching Act of Kindness Brings Hope to the Homeless #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 20 МЛН
Upload code to Raspberry pi Pico using Visual Studio Code Platform IO
3:56
FBELLSAN - Informatica
Рет қаралды 871
Pi Pico W with the Arduino IDE | Using WiFi
49:26
DroneBot Workshop
Рет қаралды 153 М.
#370 Raspberry Pi Pico vs ESP32 (-S2) and STM32 Blackpill
15:53
Andreas Spiess
Рет қаралды 388 М.
Beginners Guide to I2C on the Raspberry Pi Pico (BNO055 IMU Example)
16:57
Learn Embedded Systems
Рет қаралды 74 М.
I run untested, viewer-submitted code on my 500-LED christmas tree.
45:17
PiicoDev Magnetometer QMC6310 | Guide for Raspberry Pi
13:07
Core Electronics
Рет қаралды 4,3 М.
Raspberry Pi Pico W: Wireless Weather Station
17:13
ExplainingComputers
Рет қаралды 289 М.
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 36 МЛН