Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TouchPad on ESP-WROVER-KIT
#1
Hi,

I don't understand :  

On my board esp-wroom-32 the module TouchPad it's ok


Code:
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 


ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5976
load:0x40078000,len:9040
ho 0 tail 12 room 4
load:0x40080000,len:6120
entry 0x40080334
I (31) boot: ESP-IDF v3.1-rc1-53509c7b 2nd stage bootloader
I (31) boot: compile time 13:13:52
I (31) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed      : 40MHz
I (41) boot: SPI Mode       : DIO
I (45) boot: SPI Flash Size : 4MB
I (49) boot: Partition Table:
I (52) boot: ## Label            Usage          Type ST Offset   Length
I (60) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (67) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (74) boot:  2 MicroPython      factory app      00 00 00010000 00180000
I (82) boot:  3 internalfs       Unknown data     01 82 00190000 00100000
I (89) boot: End of partition table
I (94) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x5c388 (377736) map


I (235) esp_image: segment 1: paddr=0x0006c3b0 vaddr=0x3ffb0000 size=0x03c60 ( 15456) load
I (241) esp_image: segment 2: paddr=0x00070018 vaddr=0x400d0018 size=0x100958 (1050968) map


I (610) esp_image: segment 3: paddr=0x00170978 vaddr=0x3ffb3c60 size=0x01200 (  4608) load
I (612) esp_image: segment 4: paddr=0x00171b80 vaddr=0x3ffb4e60 size=0x00000 (     0) load
I (616) esp_image: segment 5: paddr=0x00171b88 vaddr=0x40080000 size=0x00400 (  1024) load
I (626) esp_image: segment 6: paddr=0x00171f90 vaddr=0x40080400 size=0x14ec4 ( 85700) load
I (670) esp_image: segment 7: paddr=0x00186e5c vaddr=0x400c0000 size=0x00648 (  1608) load
I (671) esp_image: segment 8: paddr=0x001874ac vaddr=0x50000000 size=0x0098c (  2444) load
I (691) boot: Loaded app from partition at offset 0x10000
I (692) boot: Disabling RNG early entropy source...
I (692) cpu_start: Pro cpu up.
I (696) cpu_start: Starting app cpu, entry point is 0x400812f4
I (0) cpu_start: App cpu up.
I (706) heap_init: Initializing. RAM available for dynamic allocation:
D (713) heap_init: New heap initialised at 0x3ffae6e0
I (718) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (724) heap_init: New heap initialised at 0x3ffbcac8
I (729) heap_init: At 3FFBCAC8 len 00023538 (141 KiB): DRAM
I (735) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (742) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (748) heap_init: New heap initialised at 0x400952c4
I (753) heap_init: At 400952C4 len 0000AD3C (43 KiB): IRAM
I (759) cpu_start: Pro cpu start user code
D (771) clk: RTC_SLOW_CLK calibration value: 3319040
I (112) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
D (113) heap_init: New heap initialised at 0x3ffe0440
D (117) heap_init: New heap initialised at 0x3ffe4350
D (122) MicroPython: Entry


D (1125) MicroPython: SPIRAM: Disabled
D (1125) nvs: nvs_flash_init_custom partition=nvs start=9 count=6
D (1127) MicroPython: Configure stack
D (1127) nvs: nvs_open_from_partition MPY_NVM 1
D (1132) nvs: nvs_get MPY_StackSize 4
D (1136) nvs: nvs_get_str_or_blob MpyTimeZone
D (1140) MicroPython: MPy stack: 0x3ffc01ec - 0x3ffc51f4 (20488)
D (1146) MicroPython: Configure heap
D (1150) nvs: nvs_get MPY_HeapSize 4
D (1153) MicroPython: MPy heap: 0x3ffc51f8 - 0x3ffd9238 (81920)
D (1160) MicroPython: Main task exit, stack used: 1392
I (1161) MicroPython: [=== MicroPython FreeRTOS task started (sp=3ffc5140) ===]




Internal FS (SPIFFS): Mounted on partition 'internalfs' [size: 1048576; Flash address: 0x190000]
----------------
Filesystem size: 956416 B
           Used: 1536 B
           Free: 954880 B
----------------
MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32
Type "help()" for more information.




and on my ESP-WROVER-KIT the module TouchPad doesn't work :

Touch pad read error

Code:
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3e (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371


ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x3e (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5976
load:0x40078000,len:9152
ho 0 tail 12 room 4
load:0x40080000,len:6120
entry 0x40080334
I (31) boot: ESP-IDF v3.1-rc1-53509c7b 2nd stage bootloader
I (31) boot: compile time 13:16:56
I (33) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed      : 40MHz
I (40) boot: SPI Mode       : DIO
I (44) boot: SPI Flash Size : 4MB
I (48) boot: Partition Table:
I (52) boot: ## Label            Usage          Type ST Offset   Length
I (59) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (67) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (74) boot:  2 MicroPython      factory app      00 00 00010000 00220000
I (82) boot:  3 internalfs       Unknown data     01 82 00230000 00100000
I (89) boot: End of partition table
I (93) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x77898 (489624) map


I (274) esp_image: segment 1: paddr=0x000878c0 vaddr=0x3ffb0000 size=0x0574c ( 22348) load
I (283) esp_image: segment 2: paddr=0x0008d014 vaddr=0x3ffb574c size=0x00000 (     0) load
I (283) esp_image: segment 3: paddr=0x0008d01c vaddr=0x40080000 size=0x00400 (  1024) load
I (292) esp_image: segment 4: paddr=0x0008d424 vaddr=0x40080400 size=0x02bec ( 11244) load
I (305) esp_image: segment 5: paddr=0x00090018 vaddr=0x400d0018 size=0x175798 (1529752) map


I (845) esp_image: segment 6: paddr=0x002057b8 vaddr=0x40082fec size=0x1a350 (107344) load
I (890) esp_image: segment 7: paddr=0x0021fb10 vaddr=0x400c0000 size=0x00714 (  1812) load
I (891) esp_image: segment 8: paddr=0x0022022c vaddr=0x50000000 size=0x0098c (  2444) load
I (916) boot: Loaded app from partition at offset 0x10000
I (916) boot: Disabling RNG early entropy source...
I (918) spiram: SPI RAM mode: flash 40m sram 40m
I (922) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (929) cpu_start: Pro cpu up.
I (933) cpu_start: Starting app cpu, entry point is 0x400816dc
I (0) cpu_start: App cpu up.


I (1832) spiram: SPI SRAM memory test OK
I (1832) heap_init: Initializing. RAM available for dynamic allocation:
D (1833) heap_init: New heap initialised at 0x3ffae6e0
I (1838) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (1844) heap_init: New heap initialised at 0x3ffbdb28
I (1849) heap_init: At 3FFBDB28 len 000224D8 (137 KiB): DRAM
I (1855) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (1862) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (1868) heap_init: New heap initialised at 0x4009d33c
I (1874) heap_init: At 4009D33C len 00002CC4 (11 KiB): IRAM
I (1880) cpu_start: Pro cpu start user code
I (1885) spiram: Adding pool of 4096K of external SPI memory to heap allocator
D (1900) clk: RTC_SLOW_CLK calibration value: 3139853
I (122) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
D (123) heap_init: New heap initialised at 0x3ffe0440
D (127) heap_init: New heap initialised at 0x3ffe4350
D (132) MicroPython: Entry


D (1135) MicroPython: SPIRAM: Enabled
D (1145) nvs: nvs_flash_init_custom partition=nvs start=9 count=6
D (1190) MicroPython: Configure stack
D (1190) nvs: nvs_open_from_partition MPY_NVM 1
D (1190) nvs: nvs_get MPY_StackSize 4
D (1191) nvs: nvs_get_str_or_blob MpyTimeZone
D (1195) MicroPython: MPy stack: 0x3ffc126c - 0x3ffc6274 (20488)
D (1201) MicroPython: Configure heap
D (1205) nvs: nvs_get MPY_HeapSize 4
D (1209) MicroPython: MPy heap: 0x3f80001c - 0x3fb0005c (3145728)
D (1215) MicroPython: Main task exit, stack used: 1392
I (1224) MicroPython: [=== MicroPython FreeRTOS task started (sp=3ffc61c0) ===]


Internal FS (SPIFFS): Mounted on partition 'internalfs' [size: 1048576; Flash address: 0x230000]
----------------
Filesystem size: 956416 B
          Used: 17664 B
          Free: 938752 B
----------------


MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32
Type "help()" for more information.

Here's my code

Code:
from machine import Pin, TouchPad



touch5 = TouchPad(Pin(12))
touch7 = TouchPad(Pin(27))
threshold5 = []
threshold7 = []

# Scan each TouchPad 12 times for calibration
for x in range(12):
   threshold5.append(touch5.read())
   threshold7.append(touch7.read())
   sleep(.1)

# Store average threshold values
threshold5 = sum(threshold5) // len(threshold5)
threshold7 = sum(threshold7) // len(threshold7)
print('Threshold5: {0}'.format(threshold5))
print('Threshold7: {0}'.format(threshold7))

while True:
 capacitance5 = touch5.read()
 capacitance7 = touch7.read()
 print(capacitance5)
 print(' ')
 print(capacitance7)
 sleep(1)

Can you help me please ?
Thanks
Reply
#2
ESP32-WROVER has a pullup resistor on GPIO12 and this pin cannot be used as touch sensor pin.

Any touch pin must not have any pullup or pulldown resistor connected.
Reply
#3
Hi,
Ok
Thank you very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)