Documentation for ESP32 Port

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
mattyt
Posts: 159
Joined: Mon Jan 23, 2017 6:39 am

Re: Documentation for ESP32 Port

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

For the record, as discussed in ESP32 Documentation, an effort has begun to pull together documentation for the ESP32. Any help would be appreciated!

@jickster documentation is a high priority, for me at least! :)

The reason I (personally) haven't yet merged much of Boris' good work back into mainline is because it takes a fair amount of effort. Boris has the benefit that a) he's the only developer so can create as he wishes and b) only needs to support ESP32. This allows him to move quickly and, great for us!, provide features rapidly. However, mainline MicroPython needs peer review and is concerned with developing features that can be compatible with other ports. I've found that few of his features are a simple merge upstream...

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

Re: Documentation for ESP32 Port

Post by wr300000 » Thu Dec 20, 2018 9:44 am

Thank, mattyt...I can move on now..
thank again,

OutoftheBOTS_
Posts: 474
Joined: Mon Nov 20, 2017 10:18 am

Re: Documentation for ESP32 Port

Post by OutoftheBOTS_ » Thu Dec 20, 2018 11:58 am

mattyt wrote:
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.
@mattyt on the note that you have asked before about what's different in different ports, this is something that does differ from port to port. Since your the man that has dive in deep with trying to fix some of the inconstant syntax you can add this 1 to the list. It might be good if MP started to set down some offical syntax for Machine Module so when other ports r developed there is something to follow. I do prefer if both were accepted.

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

Re: Documentation for ESP32 Port

Post by mattyt » Wed Dec 26, 2018 3:09 pm

I agree that it should be consistent @OutoftheBOTS_ and have raised #4379 to cover the issue.

I'll add it to my list... ;)

Post Reply