Page 1 of 1

Sonoff basic - use RX and TX pins as GPIO

Posted: 08 Oct 2018, 12:09
by tuxmartin
Hi, I have Sonoff basic with ESP Easy Mega, GIT version: mega-20180910.

I would like to use all available (3) GPIOs - GPIO14, TX, RX.

I found this Sonoff GPIO mappings:
sonoff-header.jpg
sonoff-header.jpg (41.88 KiB) Viewed 11514 times

Code: Select all

sonoff header
1 - vcc 3v3
2 - rx   (gpio3 = D9)
3 - tx   (gpio1 = D10)
4 - gnd  
5 - gpio 14
esp8266 connections
gpio 0 - button
gpio 12 - relay
gpio 13 - green led - active low
I disabled serial port in Tools->Advanced.

I made simple PCB and connect DS18B20 to VCC, GND and data to GPIO1(TX) + 4k7 resistor between data and vcc.
It works very bad. Sometimes I can scan 1-2 DS18B20 sensors, but in most cases I cannot see any sensor. I have connected 4 sensors.

If I look at Hardware tab there are no GPIO1(TX) and GPIO3(RX):


Why? Is possible to use serial port pins (GPIO1 and GPIO3) as normal GPIO pins? Or are these pins reserved?

Thanks.

Re: Sonoff basic - use RX and TX pins as GPIO

Posted: 08 Oct 2018, 12:30
by grovkillen
Have you measured the pull-up voltage so it's close to 3.3V?

Re: Sonoff basic - use RX and TX pins as GPIO

Posted: 08 Oct 2018, 13:03
by tuxmartin
grovkillen wrote: 08 Oct 2018, 12:30 Have you measured the pull-up voltage so it's close to 3.3V?
I have RJ11 splitter. One of RJ11 connector have 4k7 resistor - about 15 centimeters long wires from Sonoff PCB. DS18B20 have about 1 meter cable.

Re: Sonoff basic - use RX and TX pins as GPIO

Posted: 14 Apr 2021, 21:37
by Fred0815
did it finally work to use TX and RX?
With the current version I2C scan is possible to connect many sensors at one GPIO. Did you try this?
Best
Martin

Re: Sonoff basic - use RX and TX pins as GPIO

Posted: 10 May 2021, 21:03
by kimot
I am using Sonoff Basic "new layout", which has got no IO port on its pin header.
( only RX and TX )
RX pin works for two Dallas DS18B20 without any problem....