Documentation for ESP32 Port

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
MisterWho
Posts: 1
Joined: Fri Oct 05, 2018 10:10 am

Documentation for ESP32 Port

Post by MisterWho » Fri Oct 05, 2018 10:53 am

Hi everyone!

I am rather new to micropython and having difficulties using micropython. I found the official documentation http://docs.micropython.org/en/latest/
Some weeks ago it was possible to change between the boards (PyBoard, WiPy,...). Now it is impossible to change between the boards, because the option disappeared. Reading through forums and discussions on GitHub I am missing a lot of documentation or the ducumentation from the above link is incorrect. For example:
- calss UART: You can find it unter "Libraries specific to the pyboard". But it also works under ESP32.
- class ADC: Neither a reference about the ESP32 nor that the written doc is only for the wipy. I noticed it, because the link there points to a wipy pinout table. No hint about the ESP32 spefic adc configuration with ADC.ATTN_6DB

I can find detailed information abou the ESP32 and his adc here: https://github.com/loboris/MicroPython_ ... o/wiki/adc

But if I try to initialise the adc as suggested there it gives me errors as the micropython version is somehow different.

Don't get me wrong! I like micropython but I am having difficulties in using it.

Or do I miss a documentation somewhere else?

Best regards
Joachim

jickster
Posts: 574
Joined: Thu Sep 07, 2017 8:57 pm

Re: Documentation for ESP32 Port

Post by jickster » Fri Oct 05, 2018 3:03 pm

Documentation is not a high priority.


Sent from my iPhone using Tapatalk Pro

jickster
Posts: 574
Joined: Thu Sep 07, 2017 8:57 pm

Re: Documentation for ESP32 Port

Post by jickster » Fri Oct 05, 2018 3:07 pm

If you can read C code, look at it.


Sent from my iPhone using Tapatalk Pro

kevinkk525
Posts: 270
Joined: Sat Feb 03, 2018 7:02 pm

Re: Documentation for ESP32 Port

Post by kevinkk525 » Fri Oct 05, 2018 6:29 pm

Well in that case I guess you should just use the loboris fork of micropython for esp32 as that port at least has some good documentation for most of the important differences in the esp32

fdufnews
Posts: 27
Joined: Mon Jul 25, 2016 11:31 am

Re: Documentation for ESP32 Port

Post by fdufnews » Sat Oct 06, 2018 2:43 pm

There is no documentation for ESP32. Usually the ESP8266 one do the trick.
You only have access to documentation for the pyboard because you are in the "latest" release.
Select "1.9.4", you will then be able to choose between different boards.

jedie
Posts: 26
Joined: Fri Jan 29, 2016 12:32 pm

Re: Documentation for ESP32 Port

Post by jedie » Sat Oct 06, 2018 6:20 pm

It seems that LoBo fork is the best choice for ESP32 boards, ins't it?

What's the reason it's not being pull back to mainline microPython?

jickster
Posts: 574
Joined: Thu Sep 07, 2017 8:57 pm

Re: Documentation for ESP32 Port

Post by jickster » Sat Oct 06, 2018 6:23 pm

jedie wrote:It seems that LoBo fork is the best choice for ESP32 boards, ins't it?

What's the reason it's not being pull back to mainline microPython?
Not enough developers. There’s very necessary open issues from 2 years ago that are still in discussion stage.


Sent from my iPhone using Tapatalk Pro

User avatar
Roberthh
Posts: 1167
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Documentation for ESP32 Port

Post by Roberthh » Sat Oct 06, 2018 6:27 pm

I do not think that it's the best port. In my view, it is just another port. It contains things like ftp and telnet, which could as well be in the base version, like you find in in the CC3200 implementation or in the PyCom branch. Other stuff is overfeatured beyond a minimal base.
But is is an impressive amount of work being done, and the documentation is very good.

wr300000
Posts: 14
Joined: Sun Jan 14, 2018 3:54 pm

Re: Documentation for ESP32 Port

Post by wr300000 » Thu Dec 20, 2018 7:54 am

Is there any kind ETA for using ADC function on ESP32? I'm using both with PSRAM and w/o PSRAM boards. Still can not be initialized ADC pin 35. (using pin 35 to avoid conflict of Wifi connection and hall sensor and also Lolin D32 pro V2 had wired pin 35 on battery voltage measure internally)

MicroPython v1.9.4-757-g39eef2708 on 2018-12-17; ESP32 module with ESP32 (WROVER chip)
Type "help()" for more information.
>>> now()
Thr 20 DEC 2018 - 14 : 44 Bangkok Thailand
>>> import machine
>>> a=machine.ADC(35)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: expecting a pin

MicroPython v1.9.4-674-g27ca9ab8b on 2018-10-27; ESP32 module with ESP32 (WROOM-32 chip)
Type "help()" for more information.
>>> now()
Thr 20 DEC 2018 - 14 : 47 Bangkok Thailand
>>> import machine
>>> a=machine.ADC(35)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: expecting a pin

User avatar
mattyt
Posts: 160
Joined: Mon Jan 23, 2017 6:39 am

Re: Documentation for ESP32 Port

Post by mattyt » Thu Dec 20, 2018 8:28 am

wr300000 wrote:
Thu Dec 20, 2018 7:54 am
>>> import machine
>>> a=machine.ADC(35)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: expecting a pin
I know that sometimes the error messages aren't fantastic but, in this case it's spot-on:

Code: Select all

MicroPython v1.9.4-725-gd690c2e14 on 2018-12-09; ESP32 module with ESP32
Type "help()" for more information.
>>>
>>> import machine
>>> a = machine.ADC(35)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: expecting a pin
>>> a = machine.ADC(machine.Pin(35))
>>> a.read()
14
Now, whether ADC should also accept an int to infer a Pin is open for debate - but at least that should get you going.

Post Reply