These are chat archives for esp8266/Arduino

12th
Jun 2017
Bert Melis
@bertmelis
Jun 12 2017 07:58
I advise you to swap.
brutzler
@brutzler
Jun 12 2017 07:59
reason for swaping?
Bert Melis
@bertmelis
Jun 12 2017 07:59
I've got a connected device (on Serial0) and when not swapped, I must physically disconnect otherwise it won't flash.
brutzler
@brutzler
Jun 12 2017 07:59
ok thx
an-erd
@an-erd
Jun 12 2017 09:30
Hi, is there a way to point the timer callback function to a class function. (I found ways to do it with interrupts and with gotIpEventHandler_ = WiFi.onStationModeGotIP(), but this last piece for os_timer_setfn(). Thanks!
brutzler
@brutzler
Jun 12 2017 11:59

@bertmelis
back to serial swap:
I have connected my IR-R/W-Unit to TXD2/RXD2 (IO15/IO13).

  #define ITFserial Serial
......
   ITFserial.begin(9600);    
   Serial.swap();

thats IMHO all code I need.
BUT. its not working proper. If I disconnect the TX/RX wires, start the ESP and connect the two wires its working. With fully connected IR-unit, the ESP fails to start, and the IR-TX-LED is always ON.
Something, I do not see?

brutzler
@brutzler
Jun 12 2017 13:33
Additional: With connected device on TXD2/RXD2 I am not even able to make serial download :-(
Is GPIO13/15 needed for download or booting?
Bert Melis
@bertmelis
Jun 12 2017 19:02
I'll try to figure out my steps tonight...
Give me an hour and I'll be back
Remark: instead of defining your serial, you could also make it a hardwareserial pointer or reference. That way, you can use your own name and still assign the seriazl interface you like.
hreintke
@hreintke
Jun 12 2017 19:21
@an-erd see esp8266/Arduino#2738
Bert Melis
@bertmelis
Jun 12 2017 20:21
@brutzler It'll be for tomorrow (or even later) as I did made some changes to the firmware I wanted to test with and now it doesn't work anymore :worried: :cry:
brutzler
@brutzler
Jun 12 2017 20:21
Remark: instead of defining your serial, you could also make it a hardwareserial pointer or reference. That way, you can use your own name and still assign the seriazl interface you like.
You have an example for me?
brutzler
@brutzler
Jun 12 2017 20:53
Think I figured out the problem. On the D1 mini (or on a NodeMCU too) GPIO15 is pulled down to GND with a 12k resistor.
My IR-Unit pulls TXD up to Vcc.
Hmmm...just thinking about SoftwareSerial. Never tried on an ESP. Any chance for working? only need 9600Baud.