Hi I want to serialise a Plantower 5003 dust sensor to an ESP8266 12E and I'm having a problem because it works a bit weird and incomprehensible to me.
1) The 12E has one and a half serials (I thought it had two) Serial = RXTX on Pins GPIO3 and 1; and Serial1 = samTX on GPIO2
RX should be on GPIO0 but there is a FLASH input there
2) on 12E there are also additional Serial - RXTX outputs on GPIO13 and 15 pins to which standard outputs can be transferred with Serial.swap() command
And now what happens:
(a) I connect the sensor to the standard Serial outputs GPIO3 and 1 - the sensor works and the debug on Serial also works (admittedly, it seems to me that I should see communication with the dust sensor in this terminal from Serial - and I don't see it - but it doesn't matter)
Unfortunately, such connection blocks me from uploading a new program - simply Arduino doesn't detect the connected board in flashing mode
b) OK, let's do Serial.swap() and connect to GPIO13 and 15 outputs. OK works - but it also switches debug and debug information is not shown on the computer terminal.
(c) In playing with these, I noticed one inexplicable thing.
Normal configuration without Serial.swap()
- I connect the sensor to GPIO13 and 15 - doesn't work - OK understandable because communication is on standard GPIO3 and 1
- switch "on the fly" the sensor to GPIO3 and 1 - works - OK
- switch "on the fly" the sensor to GPIO13 and 15 - WORKS although it should not!
- board reset
- sensor does not work (OK)
What such a strange thing happens when switching on the fly from GPIO3 and 1 to GPIO13 and 15 - looks like both outputs work!!! I don't understand.
How do I get around this problem of using serial to communicate with devices and debugging at the same time - the device blocks me from changing the program - why? I can at least add some software serial, but I would like to understand what is happening.
And a quick question from 12E - on the pine Vin shouldn't +5v from USB be derived? Is it derived somewhere because I don't see it (I wanted to power the sensor from USB)
1) The 12E has one and a half serials (I thought it had two) Serial = RXTX on Pins GPIO3 and 1; and Serial1 = samTX on GPIO2
RX should be on GPIO0 but there is a FLASH input there
2) on 12E there are also additional Serial - RXTX outputs on GPIO13 and 15 pins to which standard outputs can be transferred with Serial.swap() command
And now what happens:
(a) I connect the sensor to the standard Serial outputs GPIO3 and 1 - the sensor works and the debug on Serial also works (admittedly, it seems to me that I should see communication with the dust sensor in this terminal from Serial - and I don't see it - but it doesn't matter)
Unfortunately, such connection blocks me from uploading a new program - simply Arduino doesn't detect the connected board in flashing mode
b) OK, let's do Serial.swap() and connect to GPIO13 and 15 outputs. OK works - but it also switches debug and debug information is not shown on the computer terminal.
(c) In playing with these, I noticed one inexplicable thing.
Normal configuration without Serial.swap()
- I connect the sensor to GPIO13 and 15 - doesn't work - OK understandable because communication is on standard GPIO3 and 1
- switch "on the fly" the sensor to GPIO3 and 1 - works - OK
- switch "on the fly" the sensor to GPIO13 and 15 - WORKS although it should not!
- board reset
- sensor does not work (OK)
What such a strange thing happens when switching on the fly from GPIO3 and 1 to GPIO13 and 15 - looks like both outputs work!!! I don't understand.
How do I get around this problem of using serial to communicate with devices and debugging at the same time - the device blocks me from changing the program - why? I can at least add some software serial, but I would like to understand what is happening.
And a quick question from 12E - on the pine Vin shouldn't +5v from USB be derived? Is it derived somewhere because I don't see it (I wanted to power the sensor from USB)