Raspberry Pi Pico - Getting Started and programming in PyCharm
HTML-код
- Опубликовано: 21 янв 2021
- We will show you how to get started with programming the Raspberry Pi Pico in PyCharm.
Did you know, Seeed Studio are currently doing free shipping during August on the XIAO RP2040???!!!!
The XIAO RP2040 is a microcontroller using the Raspberry RP2040 chip. It runs at up to 133MHz, is built with rich interfaces in a tiny thumb size, and fully supports Ardunio, MicroPython, and CircuitPython. The onboard interfaces are enough for developing multiple applications.
For further information:
www.seeedstudio.com/XIAO-RP20...
Find us on Facebook, Instagram and Twitter @MachineShopUK
Visit our website TheMachineShop.uk - Наука
FYI: for the pico W, it's no longer the pin 25. Use led = Pin("LED", Pin.OUT) instead
Absolutely the easiest tutorial and way to get started. First with how easy it was with Pycharm, banged my head with the Visual Studio set up on windows for a whole weekend and got absolutely nowhere. Second, fantastic and straight-to-the-point instructions.
Getting the "Run ‘Flash main.py’" is invaluable - thank you :)
I know right it took me ages to find that and I didn’t want to start the video until that was definitely the fix. The amount of websites I searched for to try and find that.
Feel free to share it on social media to make sure people know about this trick 😉
best tutorial for beginners, I watched a few this is the only one where was mentioned how to see logs form print statement
One of the better getting-started videos. Thanks!
THANK YOU for this video. I was having a heck of a time finding any links describing how to get PyCharm working with the Pico and you summed it VERY nicely and very concisely! Well Done Sir! :-)
OMG thank you for this! I had my Pico running with Thonny, but honestly I really do not like Thonny, it's just too fugly. Pycharm is a lot nicer to use (although it needs the auto detect feature adding asap)
Thank you very much. Just got into Pi development and wanted to use PyCharm, and your video allowed me to do that. Cheers!
Thanks buddy! Finally got PyCharm working on my Pi Pico!
Thank you, I was struggling to read serial messages from my nodeMCU. Incredibly helpful, serial tutorial begins @ 10:58
And many thanks for the "how to" on seeing Pi Pico's printed text using Cmd D in the MicroPython REPL within PyCharm. Another tricky one!
Thank you for keeping it simple!
Thanks for the clear and understandable instruction. This is the best way to program pico.
This is really helpful. I can't get used to the Thonny Mac version for bugs, and editing interface.
It is working flawlessly.
It was easy to understand.
Thank you very much.
Awesome little tutorial. Thanks!
Superb tutorial. Thanks for sharing!
John, Thank you for the great tutorial. Very helpful, I'm up and running now with my PICO on PyCharm!
excellent introduction, im a newbie and needed such video. Keep up good work!
Thanks, the tutorial worked for my esp32 apart from firmware which I used thonny to install.
Thanks for saving us lots of config hassle!
Thank you; very easy to understand.
great tutorial, thank you for taking the time!
Very helpful video, thanks a lot.
Thank you! Thonny was a doddle but I was struggling on a new PyCharm install but all working now. Stopped me pulling what's left of my hair out!
It works !!!! Thank you so much :)
Great! Thx for timesaving!
Hi there. Well done, thank you for this quality content.
Great video
Excellent, today Pycharm has already been updated and Raspbery Pi Pico already appears in device type.
Nice video!
Thank you dear keep it.
Spot on job!
Literally... amazing... Absolutely perfect, clear and concise.
I know a bit of C# so love having the decently complex IDE.... my god python is a simple and clear language :O
muchas gracias por el video es lo que yo buscaba bendiciones
Merci pour la présentation :pouce:
I'll tell you what...IT WAS JUST GREAT,MANY THANKS!!!! :)
Almost as great as your comment, thank you
@@TheMachineShopUK Sorry for asking you, but I've tried to terminate the your program blinking diode, but it doesn't let me - still running, could you please help? And I'm also getting message: ModuleNotFoundError: No module named 'machine'. The ports are set the same. Thanks
Thanks for this video. I just got my Pico this morning. I followed this tutorial on my Mac with no issues, EXCEPT after uploading the script the Pico does NOT do a soft reboot (although the upload output shows it). I needed to power cycle the Pico.
Did you open the REPL and press CTRL+D?
Thank you very much👍
Your video created quite a bit of excitement on getting started with the Pico. The only problem right now is that the Pico is harder to get than a Covid-19 Vaccine shot. Keep broadcasting!!
Thank you so much
Thank you very much for the tutorial, it helped me a lot, I wanted to know if I wanted to import external libraries to the microcontroller, how would I have to do it? would I have to load the library to the editor and do the same process to upload the 2 at the same time or how would it be?
Hello, I'd really appreciate Linux tutorial on how to set Pico up with Pycharm. Thanks and keep up the great work!
thanks dude
You’re welcome
yes
Would like to see what more can be done with Pi Pico...waiting for the next video to come out
Hay Aman, thanks for the comment, anything in particular?
Haven't thought about anything in particular, would keep u posted as I come across some idea
Thank you. If you select ESP8266 also worked for me.
Can you make a tutorial for using 7-segment display(single button) with pico or using a 16x2 oled display to show data on it?? Or suggest some video where I can find about it....thanks
Hi, i followed same steps but mine still not blinking. When i using Thony IDE it works . I don't understand why it doesn't work with Pycharm IDE.
There's clearly a lot of work gone on behind the scenes for this video! Thanks for doing this - very useful, and you covered all the problems I had as I went along. Nice work. My version of PyCharm doesn't have the Tools menu on the Navigation bar and I haven't quite figured out how to get it up - I ended up getting to it using the Help - Find Action option. How would I get the Tools bar up?
Which operating system are you using?
@@TheMachineShopUK Windows 10. I've got the latest version of PyCharm, but I can't see a way to get that tools menu onto the main menu bar.
Before using the Pico I programmed a Qt GUI, which I can interact with via a touch display on the Raspberry Pi. The GUI python code stores settings for a LED strip, which I started via GPIO pins.
Now I want to use the PICO pins instead of the GPIO pins. It works in principal, but starting the LED strip always means to flash the PICO with the new main.py (including new settings). The PICO needs ca. 1s for that and is quite fast in comparison to other micro controllers, but obviously it is not as fast as the GPIO interface on the Pi.
Is there any way to speed up the flash process?
hey i need pycharm machine module inside of the intreptuer package side not avilable so can you give me a guidence for due to i'm strugling so longer
In my case I had to put Auto-detect device path in the setting to make it work. Otherwise it stuck on 0% flashing process
Awesome video! How to save a file script on the pico via PyCharm?
Any idea how to browse and load files residing on the Pico (from PyCharm)?
Great vid! Please do a Mac and a Linux version as well :)
Ok will do
Mac port for my computer was “/dev/cu.usbmodem0000000000001”
is there a way to run micropython on vscode? Please make a video about it if it is possible. Also I can't install machine module with pip (plenty of errors because of pycrypto).
Hi, ive bought an pico H. One question, when i write the program and run flas etc.. my led wont blink on the pico. although i see soft reboot etc. no errors. any clues?
I know it's too late for answer, but it may help others. I just bought Pi Pico W, followed this tutorial, and the led doesn't blink (everything else went good). The problem was - on pi pico W we should now write led = Pin("LED", Pin.OUT) instead of 25. On pico W, internal led is not on 25 pin anymore. I guess for pico H (does pico H exist?) you may have same problem. Pin 25 is not an internal led anymore, just write "LED" instead of 25.
Not able to install the Files needed for Pyboard support in PyCharm. No blue hyperlink found. Is the Pico board connection to the PC first necessary?
Did you enable micropython support in the options and did you have an active internet connection? You don’t need to have the pico plugged in to see that message
Could you please explain how to see the micropython console in pycharm ? I mean in a program I wanto to use print("Hello") but I don't see the string in any console ....thank you !
Thank you for your comment Walter, I’ll get right on it
Thank you sir. If you discover how to do it will be nice and it allows to make some movies and develop more. You know, I don't want use Thonny. Pycharm has the code completation and more features as IDE. I keep on the Pycharm !
in the menu Tools --> MicroPython -> MicroPython REPL you can run the console but the serial port makes troubles faster and then restart pc, disconnect etc
One dought please help me in file manager the pico is not coming
How to fix this "Raspberry pi pico support requires valid python 3.5+ SDK" ?
Can I have integration of Aanaconda3, Python 3.7, Pico version?
is it possible to send the pico instructions from a PC to carry out a task? I want to try and use my PC as an IR remote control. But the PC will act as a web server which listens for specific calls. I then want the PC to get the pico to carry out specific IR pulses... Anyone have any ideas on how i can achieve this?
I’ll see what I can do for this
is there a any chances that can i use different librarires with raspberry pi pico in pycharm ? for example i want to create guı with tkinter at the same time i want take values from raspberry pi(for ex temp) and i want to write this values into my guı
No the pico cannot handle a GUI, that would be two separate scripts, one for the Pico and one for the desktop GUI that runs on a computer and communicates with the Pico over some sort of communications protocol, e.g UART. Unless you were running this on a non-Pico raspberry pi (like a zero) which can handle the GUI, then you could have one file that handles sensor data and the GUI.
@@TheMachineShopUK thank you so much
Mac port for my computer was “/dev/cu.usbmodem0000000000001”
Hello thanks for the awesome video. My device is COM3. I have followed everything but don't know why getting no module name machine error. Can you please help me with this? It is not working for me. Any help would be great.
Can you tell me exactly what it says please?
Hey thanks a lot for promt reply. It got solved for me. It was a sily path mismatch for me. But thanks a lot for your help.
Another request as a viewer, is it possible for you to make a video on raw sensor data like accelometer data plotting using pico? Because I believe there is not enough support for plotting raw sensor data using pico. So, I would love to see some experiments.
Hello, another thing I didn't notice properly that, it is running and giving no error. However, no print message is displayed in micropython. Any idea how to fix it?
Great video.
But there is a high pitched noise in the background.
Hi Raunak, thank you for the comment, I’ll check out the noise for future videos
I have no knowledge of machine learning but I know it uses Python programming language.
And since this raspberry pi pico also uses Python, can we do machine learning on it?
pyCharm windows could have been bigger or maximized for better visibility
Thank you for the feedback
I copied your steps on the Raspberry Pi instead of Windows, got the Upload of my Files working, started MicroPython REPL and pressed Crtl+d, but it happens nothing. The procedure works with the Thonny on Raspberry Pi though. Same with other scripts, it is somehow related to the Pi/Pycharm.
Edit: I plugged the Pico in the Windows PC and did everything as you mentioned, unfortunatley LED is not blinking. After CRTL+D i get
>>>
MPY: soft reboot
MicroPython v1.17 on 2021-09-02; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>>
as on Rasp Pi.
Interesting, I will try this too
@@TheMachineShopUK
I made it work on both Windows and RaspPi:
1. in my case only python scripts called main.py were detected on the pico and made it run
2. even if pycharm offers to have Pico in MicroPython settings of Pycharm, I had to choose Pyboard
Is python better then C/C++ with Rap PI Pico?
Technically no, since python or micropython in this case, is interpreted where as C is compiled, so the pico has to do more work when interpreting micropython which means each instruction takes longer, slowing down the whole program
But on the flip side, micropython can be easier to understand and you don’t have to compile it
I'm Brazilian, my name is Renan, I have an interest in learning web designer and programming in python, but I have nowhere to practice, I would like to have access to the raspberry pi, more here in Brazil with the current dollar quote, the equipment that was supposed to be easy access, very expensive, between R $ 500 and R $ 1000, with a minimum wage of R $ 1060, I am not able to acquire. would it be possible to help me in any way?
I'm sorry for any typo I'm using google translator. I'm just asking for not having the conditions. Thanks in advance.
Hey, check this site out, they have a special version for Brazil www.filipeflop.com/produto/raspberry-pi-3-model-b/
And its showing SDK invalid
ModuleNotFoundError: No module named 'machine'
how to debug using ST Link and SWD ........ without debug this is not of much use .....
You can debug this like an Arduino, you can use print statements and led indicators. But I will look more into this feature
PyCharm doesn't support this plugin anymore and current versions won't let you install it.
It does work for me now
Круто)
Type exec(open("filename.py").read()) into the REPL if you want to test another file ^^