Pullup and Pulldown Resistor GPIO ESP32

For general Flowcode discussion that does not belong in the other sections.
Post Reply
flowjmaria
Posts: 10
http://meble-kuchenne.info.pl
Joined: Sat Dec 05, 2020 6:34 pm

Pullup and Pulldown Resistor GPIO ESP32

Post by flowjmaria »

Hello everyone, I'd to know how to use pull_up and pull_down internal resistor GPIO (ESP32) with "Code C" in flowcode v9. Can anyone help me?

Thanks.

BenR
Matrix Staff
Posts: 1786
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 455 times
Been thanked: 621 times

Re: Pullup and Pulldown Resistor GPIO ESP32

Post by BenR »

Hello,

You can try this, replacing 0 with the GPIO number you want to add the pull up or pull down to.

Pull Up

Code: Select all

gpio_set_pull_mode(0, GPIO_PULLUP_ONLY);
Pull Down

Code: Select all

gpio_set_pull_mode(0, GPIO_PULLDOWN_ONLY);
Pull Up and Down

Code: Select all

gpio_set_pull_mode(0, GPIO_PULLUP_PULLDOWN);
Turn off again

Code: Select all

gpio_set_pull_mode(0, GPIO_FLOATING);

flowjmaria
Posts: 10
Joined: Sat Dec 05, 2020 6:34 pm

Re: Pullup and Pulldown Resistor GPIO ESP32

Post by flowjmaria »

Hello BenR, it works properly.

Thanks a lot

Post Reply