Page 1 of 1

New user with questions about documentation

Posted: Wed Dec 19, 2018 9:17 am
by boreal.chris
I got my hands on a pyboard and used it to compare some common temperature sensors. Write-up here: ... ut-part-1/ and code here: . I'm enjoying the platform very much. (My mid-term project is to build a small RFM69 based sensor network. Python of some kind preferred.)

The documentation of MicroPython-the-language is excellent, but for some questions on how to use it with the pyboard I had to poke through this forum, and thought I'd say thank you. The two points I couldn't have addressed without the forum were:

--> How to use an analog/ADC pin to measure a voltage (ie, the 12 bit output, and that a value of 4095 would correspond to 3.3V). (Indeed, I'm not yet 100% sure the calculation is correct as the temperature values were about 2-3°C too high. The next steps will be to compare the same sensor on different boards, and the same board with multiple sensors of the same type, to check it out.)
--> How to transmit data back to the computer via the USB serial device using a pyb.USB_VCP() object.

I wonder if the community thinks these things should be in the main documentation explicitly. Of course, they are alluded to, but not clearly enough explained that a user of my general skill level could have figured it out. And I do think I'm somewhere in your target audience. :D . If yes, is this something you're looking for help with? Any process for volunteers? Cheers -- Chris

Re: New user with questions about documentation

Posted: Wed Dec 19, 2018 7:22 pm
by liudr

I agree with you that the ADC should be documented. The name analog-to-digital-converter really means nothing to those not knowing what it does. I'd rather call it voltage input. The 0-4095 to 0-3.3V mapping should probably be mentioned in the doc. The 3.3V supply may not be exactly 3.3V. If you have a decent multimeter, you can find out.

Re: New user with questions about documentation

Posted: Thu Dec 20, 2018 11:04 am
by boreal.chris
Good point by liudr, thanks. i will check the voltage, and vary the pin and the sensor a few times over the weekend, when I have time to sit down with the assembly.

Looking at the documentation, I wonder if it would be worthwhile to add a subsection to the "Tutorials" section, dealing with how to read data on an analog pin. (Under "Tutorials requiring additional components".) In a similar vein, it might be a good idea to add a little more content to the point about serial communication,, which only deals with one aspect (bridging the UART over to USB serial or vice versa), with little motivation as you'd llke to have in a tutorial. I don't know who owns documentation and what the process is (file issue, fork, fix pull request?), but if there is interest, I could work on small points of this nature.