Programming a Raspberry Pi Pico with C or C++

preview_player
Показать описание
In my previous video I showed you how to use the Raspberry Pi Pico with MicroPython. In this video I take a took at using C or C++ and cover how to run code on the second Cortex-M0+ core.




#garyexplains
Рекомендации по теме
Комментарии
Автор

Thank you for a great tutorial. Very useful. As an experiment I wrote C++ and MicroPython programs to toggle an IO pin without any delays. Python managed about 60KHz will lots of jitter, C++ ran at 37MHz without jitter - over 500x faster.

ghjq
Автор

Gary, this is fantastic! So much knowledge in 20 minutes! I've tried setting up C++ before and failed (I did not use WSL and got errors on cmake), hopefully will succeed with your help.

HariWiguna
Автор

This is brilliant Gary thank you for doing this. This really shows the power of what is possible here! Taking full advantage of the dual cores is a very much needed gem of a video thank you!

mytechnotalent
Автор

Thanks for the demos and detailed information. Really informative videos and inspiring. Mine's on order now!

The.Doctor.Venkman
Автор

Extremely interesting stuff, I mean one of the limitations of arduino is that it was single core, so if you had to handle an event you had to use an interrupt which needed to be kept short, but with this one ; one core could do the communication and monitor the pins while the other is making computationally intensive tasks .

piiumlkj
Автор

Thanks for useful tutorial. Got up and running on Linux in half an hour. Was getting tired of Arduino and its extremely low RAM. Two cores is pure luxury for a microcontroller, and as your example shows, they are easily utilized. Great!

ruprecht
Автор

Thanks Gary, the Pico project gen' was the thing I missed trying to get the USB serial data. Great work keep it up :)

MattBaker
Автор

Great video, I did this onArchlinux and everything worked just fine.
I used this video to really get in to c developing for pico, thanks you very much.
One question for the people out there, someone has found a way to control an i2c oled in c using Pico? I only found tutorials on how to do it with micropython or circuit python

antoniodelcogliano
Автор

Another excellent video, wonder how long before VC + Platform IO has native Pico support allowing for easier C programming on a PC and other platforms.

_bits
Автор

Going to give the Pico a try when they arrive. Should be a fun mcu, and fun to program in C.

bertblankenstein
Автор

I am suitably chastened by this brilliant video. Any thoughts I might code in C on a Pico are thoroughly debunked, and I shall very reluctantly pick up the Python handbook and learn another total mess of a programming language instead!! 😂

Kudos to Gary. That's what a proper coder can do. I'm going to tell my boss that the Pico must have been lost in the mail, and hopefully he'll forget about the whole thing 😉

chairmakerPete
Автор

Interesting as usual Gary, thank goodness for Thonny and micropython though

letrainavapeur
Автор

Thank you for doing this video. I found some instructions on the web, but they were incomplete. I needed the project generator, and the python-tk (tkinger). That it came together. Easy as Pi. Ok, it is a bit more involved... I don't have the picos yet, but I have the development environment set up and can build a uf2 file.

bertblankenstein
Автор

The final example of push/pop between cores should have synced both LEDs to be on and off at the same time (per the coded example) but it looks like the same video from previous build was shown with LEDs blinking opposite from each other.

JerWare
Автор

Было полезно, смотрел с переводом, плата пико уже заказана и едет, жду не дождусь когда смогу начать экспериментировать с ней

LLlblKAPHO
Автор

It might be helpful to specify which version of WSL you are using. How you might set this up could vary between versions. E.g., I believe that on WSL 2, it’s better to use the ‘internal’ Linux file system as WSL2 is VM based. There are/were also issues around serial ports in WSL2. Probably best to stick to WSL1 for this kind of stuff ATM. Great video. Thank you. 👍🏼

bertieblob
Автор

Very nice. This is something I want to try when I get my own laptop rather than use my works laptop

tetraquark
Автор

What a pain to set up. I'm going to wait for a better Pico IDE.

jumhig
Автор

Good lord Linux is about a cryptic as it comes.

adisharr
Автор

Very interesting Gary! Can you run Julia on it?

kenbrand