Chat freely about anything...

User avatar
By gerardwr
#5740
martinayotte wrote:The RED Led is connected to Power, while the BLUE Led is connected to TX.
So, you can not control those leds. You still can use some other GPIOs...


You CAN control the blue LED if you do not need the TX function. TX is actually GPIO1 so by setting GPIO1 to HIGH it will light up. Ofcourse sending output to serial will spoil things.

BTW : RX=GPIO3.
User avatar
By igrr
#5741 ... and here is how you could do it in C code:

Code: Select allint pin = 1;  //GPIO1
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, FUNC_GPIO1); //use pin as GPIO1 instead of UART TXD
gpio_output_set(0, 0, 1 << pin, 0); // enable pin as output

...

gpio_output_set(1 << pin, 0, 0, 0); // set pin high

...

gpio_output_set(0, 1 << pin, 0, 0); // set pin low