bornach, Can you provide more information about this, I do not think this does anything, pinmode output should work fine, also if you have init serial you will want to Serial.end() to deinit it then pinmode to output
@@tablatronix Here's what I found on tx rx remapping as GPIO arduino.stackexchange.com/questions/29938/how-to-i-make-the-tx-and-rx-pins-on-an-esp-8266-01-into-gpio-pins
You got to love those pointer deferences: To change the address it points to: struct_inst->pointer = &var; To change the value at the address to which it points: *(struct_inst->pointer) = var;
Hi Brian, I showed in one of my videos how I used them for I2C to drive an OLED on the ESP-01, which is even more pin limited. In my current project I'm using the PCA9685 and the PCF8575 to add 16 I/O pins and 16 PWM pins in addition to a TM1637 (for driving LEDs and reading buttons).
Brian, I did the same with my ESP32-cam. There is an extra problem as I wanted to use the camera, the SD card, a display and a button, far too little IO’s, so I also needed to use GPIO0 for input. I will put this on UA-cam as soon as the code is cleaned up.
Hey! thank you for explanation. i have a question: RX TX from ESP01, working as GPIO (FUNCTION_3) may be working as external interrupts via attachInterrupt? i try some times and no success. sorry for my bad english, is not my native language.
Thanks for sharing the video to use tx Rx pins as gpios. I m using 16x2 LCD without i2c with 6 Io pins, sim800l GSM module with 2 io pins tx Rx & 2 input pins used as trigger . LCD display & trigger functions are ok without connecting the sim800l GSM module tx Rx pins connectivity, when these are connected the LCD gets blank. All together I m using 8 gpios & tx & Rx pins total 10 pins. I have also checked the serial data communication on Arduino serial terminal by removing tx Rx connections from sim800l. Which is working ok without any problem & LCD is also ok. Can you please guide as to why the esp8266 starts malfunctioning while connecting tx Rx pins to sim800l mode. Awaiting your earliest response. Thanks
A more alert awake version of me used that technique before when using WifiManager with some of the API libraries so this morning's Brian can't take much credit for it 😂
Fiddling with the Rx/Tx lines I found out that some of my USB2UART converters pull both up, others only one. I2C needs pullups on both lines, so no harm done. Maybe the way you wired the LEDs is pulling the Rx/Tx lines down, thus interfering with the serial programming.
Maybe it would program ok if the pins were used to sink the current from the LEDs rather than source it? (Albeit the HIGH/LOW logic is then reversed) If the pins are pulled up then the programmer may run more reliably?
I have a NodeMcu 1.0, i think am out of digital input pins for my sensors. I have RFID (5 Digital pins), SIM800L (2 Digital pins), 2 buttons (2 pins), LCD Display (2 pins), 4 LED (4 pins). How can I work with all these with just one nodemcu.
The LEDs and buttons are probably the easiest to remove. There are i2c pin expanders (pcf8574 for example) that would probably do the job, and assuming your display also uses i2c it means it would use no additional pins and give you back the 6 from the buttons and LED
I dont see why not. Maybe for to protect the pin it might be better to use a transistor inbetween, I found I needed to do that with relays a few times on the ESP8266 on regular pins
@@BrianLough according to the ESP8266 wiki at www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations Function 0 up to Function 4, and even a 'SPECIAL' too.
The actual Programming of the esp is a level below the Arduino sketch, so you don't need to do anything to be able program it again. If you don't do the steps described into the video on the new sketch it will be back to normal too I'm pretty sure someone mentions in the comments here how to configure it back to uart pins on the fly, but it's not necessary to do unless you need to use those pins for uart in your sketch
// this will swap the pin to a GPIO
pinMode(1, FUNCTION3);
// this will restore the pin to Tx
pinMode(1, FUNCTION0);
can i program esp without tx pin ?
@@onuralptop18 no i dont think so.
Which one of RX and TX is better to be used as Input?
TX & RX pins: **exists**
Brian Lough: it's free real estate!
This is one of my favourite comments ever 😂
Ooh. Thanks for the mention!
I found out about remapping tx/rx while researching the ESP8266 I2C stuff also.
I want my .... serial monitor!
Some people just want the world 😂
bornach, Can you provide more information about this, I do not think this does anything, pinmode output should work fine, also if you have init serial you will want to Serial.end() to deinit it then pinmode to output
@@tablatronix Here's what I found on tx rx remapping as GPIO
arduino.stackexchange.com/questions/29938/how-to-i-make-the-tx-and-rx-pins-on-an-esp-8266-01-into-gpio-pins
You got to love those pointer deferences:
To change the address it points to:
struct_inst->pointer = &var;
To change the value at the address to which it points:
*(struct_inst->pointer) = var;
Your putting us to shame doing a video at 6am!! Great video as always.
Cheers Colin!
I actually started before 6 but I had a few takes I had to throw away, probably because it was 6 in the morning 😂
Hi Brian, I showed in one of my videos how I used them for I2C to drive an OLED on the ESP-01, which is even more pin limited. In my current project I'm using the PCA9685 and the PCF8575 to add 16 I/O pins and 16 PWM pins in addition to a TM1637 (for driving LEDs and reading buttons).
Cool! I was trying with the resistors first, but pinMode is the way to go. I got it working with DS3231 and the led matrix ;)
Brian, I did the same with my ESP32-cam. There is an extra problem as I wanted to use the camera, the SD card, a display and a button, far too little IO’s, so I also needed to use GPIO0 for input. I will put this on UA-cam as soon as the code is cleaned up.
Sounds great Hans! Please share when you do
Hey! thank you for explanation. i have a question: RX TX from ESP01, working as GPIO (FUNCTION_3) may be working as external interrupts via attachInterrupt? i try some times and no success. sorry for my bad english, is not my native language.
Thanks for sharing the video to use tx Rx pins as gpios.
I m using 16x2 LCD without i2c with 6 Io pins, sim800l GSM module with 2 io pins tx Rx &
2 input pins used as trigger .
LCD display & trigger functions are ok without connecting the sim800l GSM module tx Rx pins connectivity, when these are connected the LCD gets blank. All together I m using 8 gpios & tx & Rx pins total 10 pins.
I have also checked the serial data communication on Arduino serial terminal by removing tx Rx connections from sim800l.
Which is working ok without any problem & LCD is also ok.
Can you please guide as to why the esp8266 starts malfunctioning while connecting tx Rx pins to sim800l mode.
Awaiting your earliest response.
Thanks
Cool! I've used this technique but not with the pointer - great idea - especially for 6 in the morning - lol
A more alert awake version of me used that technique before when using WifiManager with some of the API libraries so this morning's Brian can't take much credit for it 😂
Very useful tip.
Thanks!
Hi, can you show me a code example of how you made the animation on the display when connected to wifi?
Excellent. Thank you
Fiddling with the Rx/Tx lines I found out that some of my USB2UART converters pull both up, others only one. I2C needs pullups on both lines, so no harm done.
Maybe the way you wired the LEDs is pulling the Rx/Tx lines down, thus interfering with the serial programming.
Maybe it would program ok if the pins were used to sink the current from the LEDs rather than source it? (Albeit the HIGH/LOW logic is then reversed) If the pins are pulled up then the programmer may run more reliably?
That's awesome, thank you.
I have a NodeMcu 1.0, i think am out of digital input pins for my sensors. I have RFID (5 Digital pins), SIM800L (2 Digital pins), 2 buttons (2 pins), LCD Display (2 pins), 4 LED (4 pins). How can I work with all these with just one nodemcu.
The LEDs and buttons are probably the easiest to remove. There are i2c pin expanders (pcf8574 for example) that would probably do the job, and assuming your display also uses i2c it means it would use no additional pins and give you back the 6 from the buttons and LED
The other suggestion would be to move to something with more pins like an esp32
Yes just for drive leds, could it drive relays too?
I dont see why not. Maybe for to protect the pin it might be better to use a transistor inbetween, I found I needed to do that with relays a few times on the ESP8266 on regular pins
how to use GPIO3 as input
/ponders How many other "FUNCTION_?" modes are they and what do they do? ;-)
Good question! I know there is one to set it back to serial, but I'm still not 100% sure how any of them work..
@@BrianLough according to the ESP8266 wiki at www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations
Function 0 up to Function 4, and even a 'SPECIAL' too.
Great!!!
How can i return tx/rx pins ?
Because i want to do this in my esp 01.
The actual Programming of the esp is a level below the Arduino sketch, so you don't need to do anything to be able program it again. If you don't do the steps described into the video on the new sketch it will be back to normal too
I'm pretty sure someone mentions in the comments here how to configure it back to uart pins on the fly, but it's not necessary to do unless you need to use those pins for uart in your sketch
Jws esp udah pake 😁