-->
Page 1 of 1

LED on GPIO16

PostPosted: Fri Feb 13, 2015 7:14 pm
by Dani
Hello, I want to drive a LED with GPIO16 of my ESP-12. Until now I only used GPIO2 on an ESP-01 with this Code
Code: Select all// Header:
#define LED_GPIO 2
#define LED_GPIO_MUX PERIPHS_IO_MUX_GPIO2_U
#define LED_GPIO_FUNC FUNC_GPIO2


// Code:
  PIN_FUNC_SELECT(LED_GPIO_MUX, LED_GPIO_FUNC);
  GPIO_OUTPUT_SET(LED_GPIO, 0);
  ....
  GPIO_OUTPUT_SET(LED_GPIO, 1);

How do I have to change the #define to use GPIO16? Or better, does somebody knows a website where I can find it for every IO?

Thank you :-)

Re: LED on GPIO16

PostPosted: Fri Feb 13, 2015 8:30 pm
by sfranzyshen
Have you checked out the source files in the sdk?

IoT_Demo/include/driver/gpio16.h
IoT_Demo/driver/gpio16.c

void gpio16_output_conf(void);
void gpio16_output_set(uint8 value);
void gpio16_input_conf(void);
uint8 gpio16_input_get(void);

Re: LED on GPIO16

PostPosted: Sun Jun 21, 2015 6:43 pm
by scargill
In SDK 1.1.2 - the header file and C file from the IOT demo to control GPIO16 compile - but when tested, IMMEDIATELY crash the processor every time - anyone have a solution?

Pete.