- Input and int test.fcfx
- (18.77 KiB) Downloaded 263 times
IO14 on ESP32 TTGO display not available to read voltage
-
- Posts: 200
- http://meble-kuchenne.info.pl
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 32 times
- Been thanked: 24 times
-
- Valued Contributor
- Posts: 411
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 226 times
Re: IO14 on ESP32 TTGO display not available to read voltage
Do you have any attached circuitry?
GPIO35 has an on-board pull-up resistor, GPIO0 does not.
Also, please try with debounce set to 0
GPIO35 has an on-board pull-up resistor, GPIO0 does not.
Also, please try with debounce set to 0
-
- Posts: 200
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 32 times
- Been thanked: 24 times
Re: IO14 on ESP32 TTGO display not available to read voltage
hi Ben,
yes there is 100K resistor, this is the reason why input is always to 1 when button is not pushed but didn't explain why input still at 1 when button pushed. (set to active low polarity even with debouce set to 0) Do you explanation why both are working well with interrupt ?
yes there is 100K resistor, this is the reason why input is always to 1 when button is not pushed but didn't explain why input still at 1 when button pushed. (set to active low polarity even with debouce set to 0) Do you explanation why both are working well with interrupt ?
Seb
-
- Valued Contributor
- Posts: 411
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 226 times
Re: IO14 on ESP32 TTGO display not available to read voltage
Could you try reading the switch input with an Input icon, rather than the Switch component?
Just to eliminate that as a possible issue.
Sorry, I don't have a TTGO to test.
Just to eliminate that as a possible issue.
Sorry, I don't have a TTGO to test.
-
- Posts: 200
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 32 times
- Been thanked: 24 times
Re: IO14 on ESP32 TTGO display not available to read voltage
same problem
Video with original firmware
Video
I have also upload the original firmware to check if button is working well.Video with original firmware
Seb
-
- Posts: 200
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 32 times
- Been thanked: 24 times
Re: IO14 on ESP32 TTGO display not available to read voltage
For your information
I have just added these lines to ESP32.FCDX to be able to use the INT0 too, if you want to release the new version.
Tested : Working well
I have just added these lines to ESP32.FCDX to be able to use the INT0 too, if you want to release the new version.
Tested : Working well
Code: Select all
<interrupt ident='GPIO0' type='pin' name='GPIO0'
global='\nvoid MX_ISR_GPIO0(void*);\n'
handler='\n#ifndef MX_ISR_GPIO0_DEF\n#define MX_ISR_GPIO0_DEF\nvoid MX_ISR_GPIO0(void* arg){FCM_%n();}\n#else\n#warning "This interrupt has previously been enabled, so the macro <%n> may never get called."\n#endif\n'
enable='\ngpio_pad_select_gpio(GPIO_NUM_0);\ngpio_set_direction(GPIO_NUM_0, GPIO_MODE_INPUT);\ngpio_install_isr_service(ESP_INTR_FLAG_LOWMED);\ngpio_isr_handler_add(GPIO_NUM_0, MX_ISR_GPIO0, (void*) GPIO_NUM_0);\ngpio_intr_enable(GPIO_NUM_0);\n'
disable='\ngpio_intr_disable(GPIO_NUM_0);\n' >
<options >
<edge name='Interrupt Edge Select' >
<entry name='Rising edge' value='\ngpio_set_intr_type(GPIO_NUM_0, GPIO_INTR_POSEDGE);' />
<entry name='Falling edge' value='\ngpio_set_intr_type(GPIO_NUM_0, GPIO_INTR_NEGEDGE);' />
<entry name='Rising and Falling edge' value='\ngpio_set_intr_type(GPIO_NUM_0, GPIO_INTR_ANYEDGE);' />
</edge>
</options>
</interrupt>
- Attachments
-
- ESP32.fcdx
- (41.12 KiB) Downloaded 229 times
Seb
-
- Valued Contributor
- Posts: 411
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 226 times
Re: IO14 on ESP32 TTGO display not available to read voltage
Hi Seb,
Add this code in a C icon at the start of your program ...
Add this code in a C icon at the start of your program ...
Code: Select all
gpio_set_direction(GPIO_NUM_35, GPIO_MODE_INPUT);
-
- Posts: 200
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 32 times
- Been thanked: 24 times
Re: IO14 on ESP32 TTGO display not available to read voltage
hi LeighM,
I added this at the start of the program on working well.
Why need to add this ?
why can not be set on the the Fcdx ?
thx
I added this at the start of the program on working well.
Why need to add this ?
why can not be set on the the Fcdx ?
thx
Seb
-
- Matrix Staff
- Posts: 1895
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 491 times
- Been thanked: 664 times
Re: IO14 on ESP32 TTGO display not available to read voltage
Hello,
Sorry this has taken a while but I have now added the missing GPIO0 and GPIO1 interrupts to all ESP devices and also hopefully solved the IO problem you were having without needing the C icon.
Sorry this has taken a while but I have now added the missing GPIO0 and GPIO1 interrupts to all ESP devices and also hopefully solved the IO problem you were having without needing the C icon.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel