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
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
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Musoleum Praha by David CernyTRUE Review - Geberit Sigma 70 & DuoFix, Sigma70DDS833 Electrical Energy Power Meter - DDS833, DDS238-1, DDS518, DDS518C, DDS518LHow to make Arduino Game from Lego bricksDEMO of Weather Forecast ClockWi-Fi Robot Control via UDP - ESP8266DEMO of Arduino Arcade Lego Games BoxSmallest joystick in the world? Notebook pointing stick and ESP8266 to control robot carNuclear War (like game for Trump) [turn on captions]Nuclear BUTTON game for president Trump [subtitles] made from Lego bricksHow to connect PS/2 mouse to Arduino and also detect buttonsHow to find pinout for Touchpad/Pointing Stick & connect to Arduino - SynapticsKristof Kintera: Nervous Trees - Rudolfinum Gallery PrahaHow to make Weather station - Arduino, Nokia 5110 LCD and an old clockConverting Vintage electric heater into LampElectrolysis - how to clean rust from an old badgeHow to build a free airbrush spray booth for painting modelsChiavari stool - claimed as antique by our daughterМультиметр B7-20 - краткий тестSd.Kfz. 7/1 Revell diorama by 9 year old kid for charity