4 ms·
Precisely. 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 remot
by Daneel_ 3y ago
Precisely. 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.