4 ms·
Somehow I missed the release of the pico. Has anyone played with one? What's it like to tinker with compared to a pi zero or a full sized pi?
by dabluecaboose 3y ago
Somehow I missed the release of the pico. Has anyone played with one? What's it like to tinker with compared to a pi zero or a full sized pi?
- HeyLaughingBoy 3y agoCompletely different device for a different set of use cases.
- Daneel_ 3y agoPrecisely. It’s best to think of it as a dedicated and customisable IoT device. I put one in my coffee machine, for example, so that I can turn it on/off remotely or on a schedule, as well as read the grinder value much more precisely (5V potentiometer) than the number the machine provides (1-45).
- dabluecaboose 3y agoWow, that's a super cool use case! I'm super interested in "smart-ifying" things by being able to measure them/read state remotely as opposed to controlling them. This sounds like it might be really useful for that!
- Daneel_ 3y agoAbsolutely. It has 4x 10-bit ADCs built in, so precise measurement is quite easy. I used a voltage divider to change the range from 5V to 3.3V. As mentioned in other comments, the Pico has two cores, so I’m actually running the small web server (for phone GUI) in a thread directly on the second core, meaning there’s never a time where I’m running code that could block web service. The grinder value gets updated 10x per second on the webpage via ajax, so it feels really responsive on your phone but doesn’t have to reload the page. I want to add a little oled to the coffee machine to show the output directly too. It’s a great little device. I’ll be open sourcing the code in the future on GitHub once I’ve worked a few more issues out (my handle is CodeByMiles).
- ptx 3y agoThe MicroPython threading support is apparently "highly experimental" according to the docs [1]. Did you use another language, or does the threading in MicroPython work well despite being experimental? [1] https://docs.micropython.org/en/latest/library/_thread.html https://docs.micropython.org/en/latest/library/_thread.html
- cdcarter 3y agoI am not OP, but, I have successfully used the Micropython multithreading support. I believe it is marked as such in the docs since they are reserving the right to change the API, not because it doesn't work. That said, I've generally found the C SDK easier to work in. Copying large micropython libraries over USB to the Pico on OSX has been a massive headache.
- matt_trentini 3y agoWhat are you using to transfer the files? I'd be very keen to know if there are issues with the (officially supported) mpremote...
- Daneel_ 3y agoCorrect, I just used the micropython implementation. So long as I could get it to work in my individual use case it was ok by me, and indeed I had no real trouble getting it to work.
- dabluecaboose 3y agoThanks! So is this more like an arduino then?
- moefh 3y agoIt's more like an Arduino in the sense that the code you write is more like firmware. It's way more powerful than a common Arduino, though. It has two 32-bit (ARM Cortex-M0+) cores, 264kB of RAM, and 2MB of flash. The Pico W also has a wireless chip that can do WiFi and Bluetooth (the standard Pico is exactly the same without the wireless chip).
- dabluecaboose 3y agoI see, so it's kinda halfway between a standard Pi and an arduino then? You can code on it, but it can't run an OS or anything? That still seems suuuuper useful. I'm going to have to give that a look, thanks for the info!
- dfox 3y agoIt is big enough that it makes sense to run some kind of small RTOS on it, especially given the dual core nature of the thing.
- squarefoot 3y ago> You can code on it, but it can't run an OS or anything? You can run small embedded RTOSes such as FreeRTOS and NuttX and others I'm not aware of on it. Nothing like the desktop Linux that runs on the bigger raspberries, still very useful for development. https://www.freertos.org/ https://www.freertos.org/ https://github.com/smittytone/RP2040-FreeRTOS https://github.com/smittytone/RP2040-FreeRTOS https://nuttx.apache.org/ https://nuttx.apache.org/ https://nuttx.apache.org/docs/latest/platforms/arm/rp2040/index.html https://nuttx.apache.org/docs/latest/platforms/arm/rp2040/in...
- gwoplock 3y agoTo pile on the list of supported RTOSes, my favorite has supported the Pi pico for a while. https://docs.zephyrproject.org/latest/boards/arm/rpi_pico/doc/index.html https://docs.zephyrproject.org/latest/boards/arm/rpi_pico/do...