Dear friends, please very much for help,
I am using two esp 8266 connected via sofware serial
ESP1 to ESP2 (see picture with pinout in attachement)
pin 14 --> pin 12
pin 12 --> pin 14
GND --> GND
both esp are connected to usb
I have this simple code in both esp:
I am using board setting - please see picture
but I am trying it this simle connection second day and I cant receive data....
Please, where I am doing mistake?
I want use software serial and in the past I know that I had success with this, but now I dont know where I am doing mistake...
Please for help..
Thank you
p4ppc
I am using two esp 8266 connected via sofware serial
ESP1 to ESP2 (see picture with pinout in attachement)
pin 14 --> pin 12
pin 12 --> pin 14
GND --> GND
both esp are connected to usb
I have this simple code in both esp:
B4X:
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 500
#End Region
'
Sub Process_Globals
Public Serial1 As Serial 'Serial connection for Debug..
Public Serial2 As SoftwareSerial
Public astream As AsyncStreams
Public timer As Timer
'
End Sub
'
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")'
'
Serial2.Initialize(9600,12,14) 'pin ESP07
astream.Initialize(Serial2.Stream,"astream_newdata","astream_error")
'
timer.Initialize("timer_Tick",2000)
timer.Enabled=True
End Sub
Sub timer_Tick
Log("tick")
Dim msg() As Byte ="hallo"
astream.Write(msg)
End Sub
Sub astream_newdata (Buffer() As Byte) '
Log("from esp:",Buffer)
End Sub
'
Sub astream_error
Log("Serial - No Connection")
End Sub
I am using board setting - please see picture
but I am trying it this simle connection second day and I cant receive data....
Please, where I am doing mistake?
I want use software serial and in the past I know that I had success with this, but now I dont know where I am doing mistake...
Please for help..
Thank you
p4ppc
Attachments
Last edited: