Replies: 2 comments 10 replies
-
Hi Phil, first of all - for the sake of clarity - let me remind you two important considerations:
I understand that you're using Thonny IDE. The main basic thing to understand is that you have to distinguish between the filesystem of your PC and the filesystem of the Pico board. You have to prepare your folder structure on the PC as described here (there was an error inside the README that I just fixed), and then you have to upload all of that on the Pico board. Once that those files are properly pasted into the Pico, whenever you reboot it, it will at first execute Ctrl-D issues a soft reboot on your board. Most of the times this is enough to properly run the files. FYI, Pico board can be reset by connecting the "RUN" pin with the ground (example). Please feel free to write any doubt, bye! |
Beta Was this translation helpful? Give feedback.
-
Thank you for the clarifications regarding actual medical use, and the actual driver functions. I was aware of those. I am not new to microcontrollers, but Python is the new part! Sadly, I am getting 'Sensor Not Found.' I really appreciate your help. |
Beta Was this translation helpful? Give feedback.
-
Once I finally figured out all the ways I was not following the instructions, I became sure something was wrong! I am just starting out with micropython, so please bear with me.)
I am trying to follow this -
"To run the example in ./example folder, copy max30102/circular_buffer.py and max30102/init.py into the ./example/lib directory. Then, upload the ./example directory content into your microcontroller. After the upload, press the reset button of your board are you're good to go."
I set up the lib directory with the two files mentioned in the docs, and the two files in the root directory. (Boot/Main.) You talk about a reset button, there isn't one. In thonny, I had to hit CTRL-D. Is that worth having in the docs?
Anyway, it kept telling me "ImportError: no module named 'max30102'".
I opened the readme.txt from the example folder, and it told me the file name should be max30102! Not 'init.py'!
I changed the name of that file, and am left with a new error - ;
Traceback (most recent call last):
ImportError: no module named 'network'
File "main.py", line 6, in
ImportError: can't import name MAX30102"
So my device is a pico without the network, I imagine that explains that error, but it should still run, I would think? I have a network one here, I can switch I guess...
OH! I also got another error at the start..... from boot.py. It was unable to import 'sleep' from machine. I cut the word out to see if it would go past it, and it did. Mind you, that was while I was starting the program with the play button in thonny instead of the CTRL-D, so that may have been it.
My wife has a serious type of sleep apnea, and I really want to log her Pulse-Ox. (She is using a CPAP also.) Thank you for the work done, can you help this newbie?
Phil
Beta Was this translation helpful? Give feedback.
All reactions