Sonoff basic - use RX and TX pins as GPIO

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tuxmartin
Normal user
Posts: 34
Joined: 10 Sep 2017, 13:07

Sonoff basic - use RX and TX pins as GPIO

#1 Post by tuxmartin » 08 Oct 2018, 12:09

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 5631 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.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

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

#2 Post by grovkillen » 08 Oct 2018, 12:30

Have you measured the pull-up voltage so it's close to 3.3V?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

tuxmartin
Normal user
Posts: 34
Joined: 10 Sep 2017, 13:07

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

#3 Post by tuxmartin » 08 Oct 2018, 13:03

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.
Attachments
IMG_20181008_123058.jpg
IMG_20181008_123058.jpg (22.3 KiB) Viewed 5613 times
IMG_20181007_205254.jpg
IMG_20181007_205254.jpg (111.78 KiB) Viewed 5615 times

Fred0815
Normal user
Posts: 2
Joined: 14 Apr 2021, 21:33

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

#4 Post by Fred0815 » 14 Apr 2021, 21:37

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

kimot
Normal user
Posts: 182
Joined: 12 Oct 2017, 20:46

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

#5 Post by kimot » 10 May 2021, 21:03

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....

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 18 guests