Brian Lough | Use TX and RX as GPIO on your ESP8266 @BrianLough | Uploaded May 2019 | Updated October 2024, 6 days ago.
Ever wanted more GPIO on your ESP8266? This is one simple way to use your serial pins as GPIO. They can even be used for PWM and i2c!
Also check out Bornach's channel: youtube.com/channel/UC9yIAXcDmR2jjjAYopqwlmA
---------------------------------
Code:
---------------------------------
//GPIO 1 (TX) swap the pin to a GPIO.
pinMode(1, FUNCTION_3);
//GPIO 3 (RX) swap the pin to a GPIO.
pinMode(3, FUNCTION_3);
---------------------------------
Parts:
---------------------------------
Wemos D1 Mini Clone*: http://s.click.aliexpress.com/e/uzFUnIe
1.3" OLED Display*: http://s.click.aliexpress.com/e/cDNvohJE
My D1 Mini Matrix Shield: tindie.com/products/brianlough/d1-mini-matrix-shield
---------------------------------
My Tindie Store:
---------------------------------
I've started to sell stuff on Tindie, check it out!
tindie.com/stores/brianlough
---------------------------------
Other Platforms:
---------------------------------
Twitter: @witnessmenow - twitter.com/witnessmenow
Instagram - instagram.com/brian_lough
Instructables: witnessmenow - instructables.com/member/witnessmenow
---------------------------------
Support the Channel:
---------------------------------
Buying anything through the following links will help support the channel and not cost you anything extra.
My Amazon Shop is now open: amazon.co.uk/shop/brianlough
Amazon.co.uk: amzn.to/2g7mJIO
Amazon.com : amzn.to/2ykDQ42
Aliexpress: http://s.click.aliexpress.com/e/wdhojba
LCSC (where I buy most of my parts for Tindie stuff): lcsc.com/?promote=ODM5ZTB5NlkwNUN3bkNCZUtGb0ZlSWFKTGJIaTl3WThNWldwU0R6QndkZ3prNWdPemlTcG5XSi94U1Zpc0g5Y3MwYjFOUTNIZjJLbGhwWllsZ3N5QnR2WkZRdXMvdGVFcVhJWlJOdnNBV1U0RDZuY1M4TFlqZWNQYUo4RkN6VVJ2c0J4MTcvU3NEdw==
---------------------------------
My Tools & Kit*:
---------------------------------
Ts-100 Soldering Iron
- UK : amzn.to/2nlOF23
- US : amzn.to/2jDcyxl
Logitech C920 HD 1080p Pro webcam
- UK: amzn.to/2pnxk9Z
- US: amzn.to/2BsLMiF
Blue Snowball USB Microphone
- UK: amzn.to/2C0x4TH
- US: amzn.to/2DEA85J
Self Adjusting Wire Strippers
- UK: amzn.to/2C0urkR
- US: amzn.to/2BXQAh1
*= Affiliate Links
Ever wanted more GPIO on your ESP8266? This is one simple way to use your serial pins as GPIO. They can even be used for PWM and i2c!
Also check out Bornach's channel: youtube.com/channel/UC9yIAXcDmR2jjjAYopqwlmA
---------------------------------
Code:
---------------------------------
//GPIO 1 (TX) swap the pin to a GPIO.
pinMode(1, FUNCTION_3);
//GPIO 3 (RX) swap the pin to a GPIO.
pinMode(3, FUNCTION_3);
---------------------------------
Parts:
---------------------------------
Wemos D1 Mini Clone*: http://s.click.aliexpress.com/e/uzFUnIe
1.3" OLED Display*: http://s.click.aliexpress.com/e/cDNvohJE
My D1 Mini Matrix Shield: tindie.com/products/brianlough/d1-mini-matrix-shield
---------------------------------
My Tindie Store:
---------------------------------
I've started to sell stuff on Tindie, check it out!
tindie.com/stores/brianlough
---------------------------------
Other Platforms:
---------------------------------
Twitter: @witnessmenow - twitter.com/witnessmenow
Instagram - instagram.com/brian_lough
Instructables: witnessmenow - instructables.com/member/witnessmenow
---------------------------------
Support the Channel:
---------------------------------
Buying anything through the following links will help support the channel and not cost you anything extra.
My Amazon Shop is now open: amazon.co.uk/shop/brianlough
Amazon.co.uk: amzn.to/2g7mJIO
Amazon.com : amzn.to/2ykDQ42
Aliexpress: http://s.click.aliexpress.com/e/wdhojba
LCSC (where I buy most of my parts for Tindie stuff): lcsc.com/?promote=ODM5ZTB5NlkwNUN3bkNCZUtGb0ZlSWFKTGJIaTl3WThNWldwU0R6QndkZ3prNWdPemlTcG5XSi94U1Zpc0g5Y3MwYjFOUTNIZjJLbGhwWllsZ3N5QnR2WkZRdXMvdGVFcVhJWlJOdnNBV1U0RDZuY1M4TFlqZWNQYUo4RkN6VVJ2c0J4MTcvU3NEdw==
---------------------------------
My Tools & Kit*:
---------------------------------
Ts-100 Soldering Iron
- UK : amzn.to/2nlOF23
- US : amzn.to/2jDcyxl
Logitech C920 HD 1080p Pro webcam
- UK: amzn.to/2pnxk9Z
- US: amzn.to/2BsLMiF
Blue Snowball USB Microphone
- UK: amzn.to/2C0x4TH
- US: amzn.to/2DEA85J
Self Adjusting Wire Strippers
- UK: amzn.to/2C0urkR
- US: amzn.to/2BXQAh1
*= Affiliate Links