Загрузка страницы

How to use TX/RX as data pins on esp8266 / Wemos D1 Mini

How to use TX/RX pins as data pins on esp8266 / Wemos D1 Mini.

Reference table: http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations

Code:

int led_red = 1; // TX
int led_green = 3; // RX
void setup()
{

//********************* CHANGE PIN FUNCTION **********************
pinMode(led_red, FUNCTION_3); //GPIO 1 swap the pin to a GPIO.
pinMode(led_green, FUNCTION_3); //GPIO 3 swap the pin to a GPIO.
//****************************************************************
pinMode(led_red, OUTPUT);
pinMode(led_green, OUTPUT);

}
void loop()
{

digitalWrite(led_red, HIGH); // sets the LED on
digitalWrite(led_green, LOW); // sets the LED off
delay(1000); // waits for a second
digitalWrite(led_red, LOW); // sets the LED off
digitalWrite(led_green, HIGH); // sets the LED on
delay(1000); // waits for a second

}

Видео How to use TX/RX as data pins on esp8266 / Wemos D1 Mini канала Lenka Design Workshop
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
4 сентября 2017 г. 1:17:31
00:03:19
Яндекс.Метрика