MicroPython on ESP32 with SPIRAM support
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
Has anyone else used the analog lamb Wrover breakout board?
It's schematic shows IO12 being pulled up to 3.3v see https://github.com/AnalogLamb/esp32/blo ... eakout.pdf
Yet the Wrover datasheet doesn't show to do this in the peripherals schematic see https://www.espressif.com/sites/default ... eet_en.pdf
Is it maybe a fault in the analog design?? has someone make the analog Lamb wrover breakout work??
It's schematic shows IO12 being pulled up to 3.3v see https://github.com/AnalogLamb/esp32/blo ... eakout.pdf
Yet the Wrover datasheet doesn't show to do this in the peripherals schematic see https://www.espressif.com/sites/default ... eet_en.pdf
Is it maybe a fault in the analog design?? has someone make the analog Lamb wrover breakout work??
Re: MicroPython on ESP32 with SPIRAM support
I have got the board to work (sorta), pull enable and io0 high, boot switch to pull io0 low on power up. Serial connection through an Adafruit monitor cable, basically just using the breakout as a convenient place to solder the wrover module.OutoftheBOTS_ wrote: ↑Wed Jan 31, 2018 11:39 amHas anyone else used the analog lamb Wrover breakout board?
It's schematic shows IO12 being pulled up to 3.3v see https://github.com/AnalogLamb/esp32/blo ... eakout.pdf
Yet the Wrover datasheet doesn't show to do this in the peripherals schematic see https://www.espressif.com/sites/default ... eet_en.pdf
Is it maybe a fault in the analog design?? has someone make the analog Lamb wrover breakout work??
Re: MicroPython on ESP32 with SPIRAM support
For the record, the second of my LOLIN32 Pro boards appears to be operating fine. No heat - and greeted by the friendly MicroPython 1.9.2 WebREPL when making a serial connection to the board...
Re: MicroPython on ESP32 with SPIRAM support
I am working on a anemometer that has a magnet that closes a reed switch each revolution.
I have two issues, how to keep windSpeed in scope and time.sleep() seems to shut down the pin callback. Having to def getSpeed() would seem to be a hack. Do I need to look at threads for the pin callback?
Code: Select all
from time import *
import machine
import network
pin22 = machine.Pin(22,machine.Pin.IN)
twind =ticks_ms()
windSpeed=0
def callback22(p):
global twind
global windSpeed
a = ticks_ms()
deltat= ticks_diff(a , twind)
if deltat>25:
twind=ticks_ms()
windSpeed=(( 10000/(deltat)*306)/1000)
#print(windSpeed)
def getSpeed():
global windSpeed
return windSpeed
pin22.irq(trigger=machine.Pin.IRQ_RISING, handler=callback22)
Re: MicroPython on ESP32 with SPIRAM support
The pulse module will be available soon (probably early next week) which will use ESP32 hardware peripherals to count pulses, measure pulse duration and/or frequency etc.
It will make that kind of tasks much easier and precise.
Re: MicroPython on ESP32 with SPIRAM support
thanks loboris!
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
Ok at this point I feel like an idiot.
It seems it was the way I connected the usb to serial converter to the ESP32. Seems the TX on the converter needs to connect the RX on the ESP32. This is opposite of the labaling stem32 dev board that I have known as the blue pill.
On the up side I now make it go
It seems it was the way I connected the usb to serial converter to the ESP32. Seems the TX on the converter needs to connect the RX on the ESP32. This is opposite of the labaling stem32 dev board that I have known as the blue pill.
On the up side I now make it go
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
I have had my robot up and driving around today and now need to start to hook all the peripherals up. I need to workout what pins I will ise for what( I am likely to use them all).
I want to make sure that I am not connecting something to a pin that shouldn't be used.
Can someone confirm that these pins are ok to use.
I assume that I can use pin 0 as a digital IO providing it isn't pulled low during boot???
I assume that I need to leave pin 2, 4, 12, 13, 14, 15 for the SD card in 4 pin mode and not connect anything else to them unless using SD card in SPI mode then fine to use???
Pin 5 is listed as VSPI in ESP32 datsheet but on Wrover scehmatic it isn't shown in blue as 1.8v, I am unsure if it is ok to use???
18, 19, 21, 22, 23, 25, 26, 27 are fine as digital IO pins
32, 33, 34, 35 can be used as analog input pins or digital IO pins.
I am unsure about 36, 39????
I very much assume that I shouldn'y ever connect anything to : SD0, SD1, SD2, SD3, CMD, CLK, 16, 17 as these are all listed in blue as 1.8v for the SPI RAM
Thanks for anyone that can help
I want to make sure that I am not connecting something to a pin that shouldn't be used.
Can someone confirm that these pins are ok to use.
I assume that I can use pin 0 as a digital IO providing it isn't pulled low during boot???
I assume that I need to leave pin 2, 4, 12, 13, 14, 15 for the SD card in 4 pin mode and not connect anything else to them unless using SD card in SPI mode then fine to use???
Pin 5 is listed as VSPI in ESP32 datsheet but on Wrover scehmatic it isn't shown in blue as 1.8v, I am unsure if it is ok to use???
18, 19, 21, 22, 23, 25, 26, 27 are fine as digital IO pins
32, 33, 34, 35 can be used as analog input pins or digital IO pins.
I am unsure about 36, 39????
I very much assume that I shouldn'y ever connect anything to : SD0, SD1, SD2, SD3, CMD, CLK, 16, 17 as these are all listed in blue as 1.8v for the SPI RAM
Thanks for anyone that can help
Re: MicroPython on ESP32 with SPIRAM support
You are right about the pins usage.OutoftheBOTS_ wrote: ↑Thu Feb 01, 2018 9:27 am... Can someone confirm that these pins are ok to use ...
Be carefull about using GPIO0. I think the high level is sampled only on boot from power up.
I wouldn't recommend usin the SDCard in SPI mode, there are known problems with using the SPI display and SDCard in SPI mode!
But, you can use it in 1-line SD mode, you will have 3 more pins left (only GPIOs 14,15 & 2 are needed).
If using GPIO 12 (MTDI) be very carefull not to pull it down during boot. If pulled low it will select 3.3V for Flash & SPIRAM power wich can (and probably will) damage both chips.
You can use pin 5 as you want.
You can use 36 & 39, they are input only pins.
Never use or connect anything to the pins marked with blue on schematics (external Flash can be connected to those pins, but special procedure and fuse programming must be used).
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: MicroPython on ESP32 with SPIRAM support
@laboris
Thanks for your help. This will allow me to make the most of the available pins, I think that I will nee all of them and will run the SD card in 1 line mode as will need the extra pins.
Hoping to run : SPI TFT, SPI touch, SD card, 2 x SPI encoder counters, H-bridge needing 4 output pins, ADC for battery monitor and still have space to hook up I2C sensors.
Can I use 36 or 39 as SPI MISO ??
Can I use 36 or 39 as ADC input for the battery monitor??
Thanks for your help. This will allow me to make the most of the available pins, I think that I will nee all of them and will run the SD card in 1 line mode as will need the extra pins.
Hoping to run : SPI TFT, SPI touch, SD card, 2 x SPI encoder counters, H-bridge needing 4 output pins, ADC for battery monitor and still have space to hook up I2C sensors.
Can I use 36 or 39 as SPI MISO ??
Can I use 36 or 39 as ADC input for the battery monitor??