It is "self-promoted", which is defined as meeting any of the following criteria: a. The poster's account consists mostly of links to the same product/channel/blob/etc b. The poster's account is very new c. The poster's account has very few quality posts d. The poster does not typically engage in the r/raspberrypipico community
Anyhow, yes, the major thing that I had to sort out was that the pico-sdk uses CMake. I ended up with a) compiling all of the Espruino files using Espruino's makefile as usual, and then b) using the port-specific makefile to call CMake, which generates makefiles for us, so that we can then compile the RP2-specific files and generate the targets by calling those makefiles.
So I had the Idea to use RPi 3 B+ and an ADC with SPI connection, connect it through LINX with ssh (With raspberry as Local I/O) and read the sensor's output. I need to sample at 12bits, 20000Hz minimum (60000 minimum if the ADC is not simultaneous because my sensor is triaxial). I think that's doable, but I have size constraints. That's why I asked for RPi Pico. Do you have other suggestions for small microprocessors like ESP8266 or a small Arduino? I saw that RPi zero also does not handle LINX connection.
So is there a method with VISA to retreive the data of the sensor when the impact begins and process it with the code to do my calculations and show the calculations directly? this means I should write a code in raspberry to take a chunk of the curve and send it to LabVIEW? or I am required to "Deploy" the code in order to do that.
Well, that's what a microcontroller is supposed to do. Since it has no operating system, all it can do is run the given program.As long as the pico is connected to thonny, at least the repl runs forever.But in general your code is the only thing the pico can do. That's why there is no exit() function in MicroPython - there is nothing it could exit to.So your reset button can only restart your program.If you want to stop the blinking LED, your code has to handle that. Use your button not as a reset button, but as a light switch. Something like
A very feasible approach for me would be to make core0 to use full mbed and leave core 1 at sleep. The mechanisms to communicate and synchronize the cores at hardware should be implemented and also a function to load code for core1 and start it. Then core1 is useful for whatever you may consider maybe using the pico-SDK to be full bare metal.
I hope I get my first piece for testing soon!
BR
Walter
That said, I wonder if it might be possible to support a lightweight version of Nerves and the Erlang VM on the pico. This might let folks take advantage of the Nerves tool chain and the Actor approach to programming distributed systems. It might even encourage some pico users to look into using Nerves. Comments? (ducks).
Did anyone try to upload a project to a raspberry pi Pico?
I installed the required packages, my RPI pico works fine (i confirmed by uploading a program through Thonny, in order to make sure that it works before trying it with XOD). I made a simple blinking project, it compiles properly but fails to upload with an error message.
3- Open the XOD.IO IDE, make a very simple program just to flash, try to deploy and debug, choose the board (board model: raspberry Pi Pico and the port it is installed on), no need to press the bootsel button.
Thank you Sandroluisk for your reply!
After many attempts of uninstall/install I could finally compile and upload the blink patch to Pico.
The deploy message that I get is similar to yours, but the led doesnt blink. I tried different ports with different time settings in the square wave but still nothing. The pico works fine when I programm it through Arduino IDE or if I program it in python for the same simple exercice.
@bigsheep I just could not get the pico to appear as a com port in Windows 10. I was about to launch it into the trash when I stumbled across your suggestion. I tried it in desperation rather than hope. It worked perfectly. Thank you very much. I now have a new toy to play with.
OMG, thank you, I just wasted 2 hours. This worked in seconds!!!!! E.g., just writing. Note: plugging in my pico, Explore opens showing files, but I just don't see the port. clicking Upload from Arduino_Code anyway was the magic trick.
I just purchased and downloaded PICO-8 for my raspberry pi, and when I try to boot it it will not. When I double click on the file, I am asked to execute it, which I do. After this, it open for a half second before closing immediately.
And it opens in windowed mode (on RPi and my Manjaro laptop both, I find that it starts full screen by default without that flag, but you can also change the flag value in /.lexaloffle/pico-8/config.txt to run windowed by default).
Same issue here... both double clicking and running in console doesn't seem to work. Tried latest beta version of pico8 as well as some of the older versions, but no luck. Running Pi OS 64-bit though, which could be the issue, so will try again with 32-bit OS
A while ago when I was getting my raspberry pies set up I noticed that I had trouble running the program if I grabbed the files and extracted them on a Windows PC and then dropped the USB into the raspberry pi, I resolved it by downloading and extracting everything on the raspberry pi itself
Thanks for this, I was really looking forward to trying it as I have a couple of ESPHome scripts running on ESP8266. All went well: ESPHome version returned 2022.7.0-dev as expected so I wrote out your script and tried to load it. Alas, it reported that it couldn't find Arduino.h, which I see is requested by core.h. I see core.h also needs pico.h which I don't have either. Am I missing an important RPI2040 component?
Looks like this was merged to dev in esphome, however there's a bit of extra hoopjumping sine platformio hasn't merged some pico support. Been poking at picow support which looks decent so far; there's an example in test6.yaml in their test directory
There is an official arduino mbed core for the Arduino IDE, also PlatformIO started supporting the ArduinoCore-mbed. The core supporting the Raspberry Pico also the upcoming Arduino Nano RP2040 Connect board. -mbed
github.com/.../platform-raspberrypi
Did you tried with the test sketch? Did you use the last version of the Earl Philhower core?
After upload, close the app, detach the pico and attach back the USB cable, then start Nomad.
Or try to start Nomad and after starting attach the Pico.
For example, if your program wants to access the analog-digital converter (ADC), you'd tell CMake to link with the hardware_adc library (target_link_libraries( pico_stdlib hardware_adc)), and that would make the corresponding hardware/adc.h header available and include the library in the build.
Hi everyone, I designed motor stage hat for Raspberry based on Raspberry Pico instead of an arduino. I also ported sngaboard firmware so it works on pico.
It uses serial on GPIO header instead of an USB cable which makes everything smaller.
It needs a litle configuration, but works fine.
Amazing work @Pepa! I recently made a new Sangaboard based on the RP2040 microcontroller with integrated illumination control. The new Sangaboard firmware supports the pico and has partial support implemented for LED control (on/off only, the plan is to PWM it at high frequency to avoid flickering), the source is at Files sangaboard-v5 Filip Ayazi / sangaboard-firmware GitLab (the master branch also works on the pico), just adjust boards.h with your wiring.
For comparison, several instructables (e.g. here, here and here) describe how to make a function generator based on the dedicated AD9833 chip. This chip runs at 25Msps and can generate only 3 predefined waveforms: sine, triangle and square. The pico is 5x faster and can generate any possible wave that fits in an array, up to many thousands of points.
Solder the female headers to the prototype board such that the pico fits comfortably. Now solder the resistors according to the provided schematics and pictures. Note that the resistors are mounted vertically only to save space. Feel free to mount them horizontally if space allows. The board layout is done with KiCad. I did not make a PCB, but a PCB layout helps to solder effectively on the 5x7cm prototype board. Note that my build differs slightly from the KiCad design, I made some improvements to the design after soldering it up.
Make sure your pico has the micropython UF2 file uploaded. I used version rp2-pico-20210205-unstable-v1.14-8-g1f800cac3.uf2. Version 1.13, which was originally provided on release day, misses the 'uctypes' module. I used the Thonny IDE to upload the python script, I had never heard of that before but it works well, at least for small scripts like this.
Sorry, I have no idea, I don't have a pico W. In principle waveforms are generated 100% in the background by DMA an PIO, so it should not be incompatible with WiFi. However, there may be other issues, e.g. the names and addresses of the registers
Many thanks for this brilliant project that is extremely well explained! I have plenty programming experience, but am a newbie with electronics and microprocessors so have learned a lot! I built and tested the DAC on a breadboard and worked through and understood much of the code, tweaking it to produce a 10Hz sine wave to power an LED where I can measure the frequency by eye. It works perfectly when I powered up from scratch the first time. Brilliant ;-) !!!
I am slightly bamboozled on one point though. If I stop and restart the programme the LED goes to full on (corresponding to DAC output with all 8 GPIO pins pulled high) and then just freezes, so no sine wave. I suspect an initialisation problem that doesn't happen when the pico is powered up from scratch. Do you have any thoughts on what might be going wrong? Do I need to kill the state-machine or any other processes that may have been left running on the pico from the previous attempt to run the code?
Really beautiful project though, and many thanks!