Raspberry Pi Pico & MPU9250 with MicroPython

  Рет қаралды 14,745

Kevin McAleer

Kevin McAleer

Күн бұрын

Пікірлер: 64
@chirots
@chirots 2 жыл бұрын
I am new to microcontroller(both Arduino and pico) with zero knowledge in programming language. After watching many of your videos, I have ordered pico and many modules.... Thank you for informative videos.
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
Awesome! That’s fantastic, let me know how it goes
@chirots
@chirots 2 жыл бұрын
@@kevinmcaleer28 suggestion. In the calculation, it would be nice if you can write the actual formula in advance, so many people can follow the code better. I am from Thailand and I hardly use english in my daily life. When it comes into mathematical vocabularies, I need to take a bit of times to write out the formula. Otherwise your videos are magnificent for a newbies like myself.
@rubayetkhan2661
@rubayetkhan2661 3 жыл бұрын
Nice work,informative
@chefseg
@chefseg 2 жыл бұрын
First of all, excellent video! I appreciate the detailed explanations. Question, how do you input the Magnetometer Declination information into the code?
@bgworkshop1705
@bgworkshop1705 3 жыл бұрын
Very well prepared, thank you for your effort 👍
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Most welcome 😊 ! thank you got the comment, I appreciate it.
@ilanaizelman3993
@ilanaizelman3993 2 жыл бұрын
Thanks for the filter!
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
No problem!
@fashiarif4687
@fashiarif4687 2 жыл бұрын
Hi Kevin you are a great teacher. Please can you make a video on interfacing mpu 6050 with pi pico
@fashiarif4687
@fashiarif4687 2 жыл бұрын
Is it yes? If yes then When can I expect your video 😊 please reply
@pspeth
@pspeth 3 жыл бұрын
I have visited your site but unfortunately it is quite difficult to follow the order of this series, or to know what the latest state of the project is. Please consider creating a topical as well as recommended order index. Also a look forward to future index of topics would be great. It doesn't need to be set in stone and could be a way for us to discuss our interests. I would also appreciate a link to the OpenCat 3D files you are using. Thank you for all of the information you are sharing.
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Thanks for this feedback. I've taken this onboard and am thinking about how best to action this. I do have a schedule of all past shows - I'll update this. I'll also share my ideas for future shows too. I'm always open to ideas - if there is something you'd like me do a video or series on please let me know. I'll also share the PicoCat files I'm working on shortly
@samarendumal8583
@samarendumal8583 3 жыл бұрын
Thank you very much sir
@valentinlaffont2230
@valentinlaffont2230 2 жыл бұрын
thanks for your vidéo , I buy a 9250 but for me the magnetor is not visible in "I2C detect" I find many comment talk about a i2C passthrough to resolve the problem but I don't find this parameter. how do you make to get visible your magnetor visible for your raspberry ? thanks I hope to find a solution..
@tav9755
@tav9755 3 жыл бұрын
Hi Kevin, info on the MPUs for the Pico are hard to find. Some in C++ but I haven't found working stuff for the MPU6050. I understand that is another chip than the MPU6050? If so a howto on the 6050 would be wellcome. Thanks for sharing.
@anaclaudiapelomundo5545
@anaclaudiapelomundo5545 Жыл бұрын
Thanks for the videos. Could you recommend a 3D printer, please?
@kevinmcaleer28
@kevinmcaleer28 Жыл бұрын
I love the Creality Ender 3 pro and Ender 3 v2. They’re accurate, great value for money and easy to maintain and upgrade
@anaclaudiapelomundo5545
@anaclaudiapelomundo5545 Жыл бұрын
@@kevinmcaleer28 Thank you so much!
@dave-j-k
@dave-j-k 3 жыл бұрын
Another great video, would i be right that this device and code would be a good start for a self balancing robot build?
@lalitbelwal7231
@lalitbelwal7231 2 жыл бұрын
raspberry pi pico with HMC5883L magnetometer DO you have anything on it.Really appreciate
@PontusThePilot
@PontusThePilot 3 жыл бұрын
Is there any chance you will do a video on the MPU6050 as well or will that be "too similar"?🤔
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Yes it would be exactly the same but without the magnetometer
@PontusThePilot
@PontusThePilot 3 жыл бұрын
@@kevinmcaleer28 Yeah. Do you think the MPU6500.py code would work with the mpu6050 or is some other code for that specific unit required?
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
@@PontusThePilot Just reading the difference - I understand that the 6050 isn't recommended for new designs - I think there are newer chips that do a lot of the hard stuff on chip. Will have to look into these more
@PontusThePilot
@PontusThePilot 3 жыл бұрын
@@kevinmcaleer28 Might just need to get this one then👍🏼
@zyroxiot9417
@zyroxiot9417 Жыл бұрын
thanks,
@mmshilleh
@mmshilleh Жыл бұрын
Hey Kevin you mentioned the heading is off by about 20 degrees which is on par with what I am getting with my 9250 as well, sadly. I tried calibrating multiple times, even in figure 8 as suggested, but still slightly inaccurate results. I even added my declination angle which is about 3.19 degrees in Austin, Texas. Any idea how to correct this bias or what could be causing it? Is it possible the hard-iron/soft-iron biases are not being dealt with properly? That is my only guess. Would be great to get accuracy on par with the iPhone.
@jacobelsmore3460
@jacobelsmore3460 Жыл бұрын
Is there any reason this would be incompatible with using a pyboard with an stm32 microcontroller?
@kevinmcaleer28
@kevinmcaleer28 Жыл бұрын
Should work fine as far as I know
@johnlamport7374
@johnlamport7374 Жыл бұрын
Good video, and the code worked great, just loaded it on to my Pico and a way it went. I would like to add the magnetic declination though. I found a commented out line for declination but the variable isn't used anywhere. How, or where, would I add the declination? Thanks
@randman80
@randman80 Жыл бұрын
Did you use Thonny or visual basic?
@johnlamport7374
@johnlamport7374 Жыл бұрын
@@randman80 I use Thony
@robertmurton7373
@robertmurton7373 3 жыл бұрын
This a good video, but how do you import the mpu9250 library into the pico. I have tried without success.
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Just upload it to the Pico and MicroPython will find it when it runs
@robertmurton7373
@robertmurton7373 3 жыл бұрын
I am using the thonny IDE , I have put mpu9250 in the Pico but i get a invalid syntax. Should I press the white button in the pico when uploading.
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
@@robertmurton7373 don't press the white button - that will put it into firmware flash mode. To upload files in thonny, open or create the file in Thonny, then save it to the Pico using the File-> Save As command. A dialog box will pop up asking 'Where to save to?' -Select Raspberry Pi Pico.
@kevinalejandrocruzmedrano
@kevinalejandrocruzmedrano 2 жыл бұрын
37:15 - MPU6050 Calibration
@robertmurton7373
@robertmurton7373 3 жыл бұрын
Uploading the mpu9250 does not put it in the lib on the pico, and therefore micropython can't find it. What is the is way to put in the lib. I have tried upip with not success.
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Hi Robert - for micropython it just needs to be in the same folder for it to find it (not in a library folder). I'm about to create a video on this soon so I'll answer this question more fully.
@robertmurton7373
@robertmurton7373 3 жыл бұрын
@@kevinmcaleer28 Thank you Kevin. I look forward to it. There are a number of modules that need the same treatment. I am sure that this is thirsty work Kevin, you deserve a coffee. I built a robot two years ago . using the Arduino uno, but it was slow in responding. I would like to rebuilt it using the pico in the hope that it would be faster.
@iremkaraagac4423
@iremkaraagac4423 Жыл бұрын
I did the same things as you but i get OS:Error [Errno 5] EIO Why it's happening? How can I solve it?
@kevinmcaleer28
@kevinmcaleer28 Жыл бұрын
That error means the file cannot be found on the Pico. Have you copied everything over?
@iremkaraagac4423
@iremkaraagac4423 Жыл бұрын
@@kevinmcaleer28 We have copied everything but the error still persists.
@jorgealbertogarciahernande5323
@jorgealbertogarciahernande5323 Жыл бұрын
@@iremkaraagac4423 I think that the error is related with the other ID (Magneto). But I dont know how the i2c find the 0x12 address ?
@traceparadox
@traceparadox Жыл бұрын
Q so basically the code for mpu6500 isnt working it just shows [ in the shell and thats it its just stuck there nothing else
@danielwilczak7833
@danielwilczak7833 2 жыл бұрын
I feel like you skipped over a critical error and how you solved it. I got the same I2C error where its saying 104 but i can't get any data to come out.
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
Most common I2c errors are incorrect wiring (clock and data wrong way round) or using the wrong sequence of pins with a bus number - specific pairs of pins are linked to either the 0 or 1 bus.
@danielwilczak7833
@danielwilczak7833 2 жыл бұрын
@@kevinmcaleer28 The issue you solved was actually how to upload the files. In thonney there is a way to store your files in a directory on your pc then highlight the files and right click "Upload to /" and this will upload all the files highlighted directly to the pico.
@danielwilczak7833
@danielwilczak7833 2 жыл бұрын
I did an I2C scan so i know i was on the right bus and correct pins because 104 is decimal for 0x68 the address to the mpu9250.
@danielwilczak7833
@danielwilczak7833 2 жыл бұрын
Also thank you for your video.
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
@@danielwilczak7833 yes - I either uploaded the files as you say in Thonny by right clicking or I uploaded them one at a time in VSCode using the PicoGo extension.
@rootnegativeone
@rootnegativeone 2 жыл бұрын
I like the video but does anyone know why it is throwing OSError: [Errno 5] EIO?
@howlingggg
@howlingggg 2 жыл бұрын
I got the same error, u can solve it?
@rootnegativeone
@rootnegativeone 2 жыл бұрын
@@howlingggg dud tbh I just reinstalled thonny and it started working
@howlingggg
@howlingggg 2 жыл бұрын
@@rootnegativeone it doesnt work for me... :(
@nkamidi
@nkamidi Жыл бұрын
@@howlingggg Were you able to resolve the OSError issue?
@ezdikey
@ezdikey 2 жыл бұрын
Q Hey great video! Can i use this library with raspberry pi 4 and normal python and I am planning to use an extra arduino onboard for servo connections etc is it better to add mpu sensor to raspi or arduino is extra brain power in raspi helps with other filters than low pass
@safakfahrac1524
@safakfahrac1524 2 жыл бұрын
import adafruit_mpu6050 import board import time i2c = board.I2C() mpu = adafruit_mpu6050.MPU6050(i2c) while True: print("Acceleration: X:%.2f, Y:%.2f, X:%.2f m/s^2" % (mpu.acceleration)) time.sleep(1) I write code like this and I get "AttributeError: 'module' object has no attribute 'MPU6050" line. What do you think I should do?
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
Adafruit have their own version of Micropython called Circuit Python that isnt compatible with standard micropython. So it’s probably best to download the code from the repository associated with this video if you want to follow along.
@mr.lahgcomics5712
@mr.lahgcomics5712 3 жыл бұрын
Potato
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
?
@pisoiorfan
@pisoiorfan 2 жыл бұрын
An hour of talking without displaying an actual schematics of connecting pins between pico and imu boards. And no, 17:17 talking is NOT a schematics.
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
Sorry to disappoint; I did include chapter markers so you can navigate the videos to get the information you want.
Raspberry Pi Pico & Bluetooth
48:10
Kevin McAleer
Рет қаралды 14 М.
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 51 МЛН
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 820 М.
Programming a NodeMCU with MicroPython: I2C Bus Part 1 (MPU6050 IMU)
22:19
Metalmancy (Micronote)
Рет қаралды 12 М.
Beginners Guide to I2C on the Raspberry Pi Pico (BNO055 IMU Example)
16:57
Learn Embedded Systems
Рет қаралды 74 М.
PicoMite: Running BASIC on a Raspberry Pi Pico
19:29
ExplainingComputers
Рет қаралды 146 М.
Importing Libraries | Raspberry Pi Pico Workshop: Chapter 2.8
10:06
Core Electronics
Рет қаралды 4,4 М.
Raspberry Pi Pico - Control the (I/O) World
1:03:16
DroneBot Workshop
Рет қаралды 609 М.
Magnetometer Errors and Calibration
18:40
MicWro Engr
Рет қаралды 19 М.
The Petabyte Pi Project
22:27
Jeff Geerling
Рет қаралды 2,2 МЛН
Every Developer Needs a Raspberry Pi
27:27
Sam Meech-Ward
Рет қаралды 575 М.
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 51 МЛН