MicroPython on ESP32 with SPIRAM support

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: MicroPython on ESP32 with SPIRAM support

Post by Roberthh » Thu Jan 04, 2018 3:48 pm

These Pin might be used by the SD card firmware

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Thu Jan 04, 2018 6:07 pm

:!: Update

The repository was cleaned and reinitialized, you won't be able to update using git pull , sorry.
Please, delete or rename your old MicroPython directory and do the fresh clone:

Code: Select all

git clone https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo.git
  • BUILD.sh refactored, more options added, multiple commands are possible in command line, see Wiki
  • OTA module added, single, dual and triple partitions layouts are available, see Wiki
  • mDNS server is added, see Wiki
  • MicroPython task watchdog added
  • Onewire module added as C module, uses ESP32 RMT peripheral for very precise timing. Using devices in parasite power mode is enabled. Full support for all devices from DS18xxx temperature sensor family.
  • ADC module improved, see Wiki
  • Neopixel module updated, support for RGBW added, see Wiki
  • timer module refactored, works much better now, many new functions and timer types added, 8 additional timers can be used. CHRONO timer type works with 1 us resolution.
  • machine module updated, setting ESP32 log level added
  • utime.tick_xx functions now returns 64-bit value
  • SPI module updated
  • curl module updated to use the latest libcurl commits
  • SPIFFS driver refactored, now uses esp-idf spiffs driver, modified to enable directories. Faster and more reliable.
  • minor bugfixes, updates and improvements in many modules and drivers ...
  • esp-idf and Xtensa toolchain updated to the latest versions
  • The documentation is now awailable via repository Wiki. Some documentation is still missing, it will be updated during next couple of days.
  • Prebuilt firmware is available.
There were a large amount of changes during the last two months, please report any bug and issue you find.

You can support this project by donating via PayPal

cartere
Posts: 25
Joined: Sat Feb 04, 2017 9:26 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by cartere » Thu Jan 04, 2018 7:51 pm

loboris thanks so much for the update!! Sent some beer money :D

Could you post a quick example for using adc.vref(), have beat on it for about an hour with no success?

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Thu Jan 04, 2018 8:47 pm

cartere wrote:
Thu Jan 04, 2018 7:51 pm
loboris thanks so much for the update!! Sent some beer money :D

Could you post a quick example for using adc.vref(), have beat on it for about an hour with no success?
Thank you very much for the donation.

There were some errors in ADC documentation, they are corrected now and some simple examples added.
I'm sorry for the inconvenience.
Please look at Wiki page, I hope it will help.

cartere
Posts: 25
Joined: Sat Feb 04, 2017 9:26 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by cartere » Thu Jan 04, 2018 9:34 pm

Thanks worked like a champ after calibration alkaline battery read 1.59v on meter and adc.read() returned 1.588.

slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Re: MicroPython on ESP32 with SPIRAM support

Post by slzatz » Fri Jan 05, 2018 12:30 am

The xtensa tool chain for the new repository appears to be 32 bit and I am running on 64-bit Ubuntu 17.10. The deactivated repository on the same machine had a 64-bit xtensa tool chain. I did try to install 386 architecture packages:

Code: Select all

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
but still running into build errors. Is it possible to have the repository include the 64-bit tool chain or is it possible that something else is going on?

slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Re: MicroPython on ESP32 with SPIRAM support

Post by slzatz » Fri Jan 05, 2018 12:54 am

Note that when I also added libz.so.1 with

Code: Select all

sudo apt-get install zlib1g:i386
compilation completed successfully but still seems better to have 64-bit tool chain v. having to add support for 32-bit to a 64-bit system.

cartere
Posts: 25
Joined: Sat Feb 04, 2017 9:26 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by cartere » Fri Jan 05, 2018 3:40 am

I am having problem with latest repository. Running on ubantu deleted old directory and git cloned the new repository. On first run of ./BUILD.sh everything looked fine indicated tool chain was unpacked and menuconfig came up, did BUILD.sh clean, when I triedl BUILD.sh build failed, tried BUILD.sh -v and it indicated could not find tool chain. PATH problem ?

Everything works fine using one of the firmware images but I need mqtt.

cartere
Posts: 25
Joined: Sat Feb 04, 2017 9:26 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by cartere » Fri Jan 05, 2018 4:09 am

Applied all of @slzatz fixes and was able to build, looks like I also have a 64bit ubantu.

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

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Fri Jan 05, 2018 8:52 am

@Loboris

Thanks for all the hours you have continued to pour in to this project, I really appreciate it.

I tried to use my program that was running on last firmware and it wouldn't run on the new firmware. The SPI threw an error

Code: Select all

>>> from machine import Pin, SPI
>>> spi2=SPI(1, sck=21, miso=22, mosi=23, cs=15, baudrate = 4000000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: invalid state

Post Reply