@daneboomer You could try pinMode(TX,OUTPUT); and then digitalWrite(TX, HIGH); etc. and check the voltage on the pin or fit an LED with a 1K resistor in series to ground? You could similarly connect the pins with a 10K resistor to 3.3V and pinMode(TX, INPUT); and then if (digitalRead(TX) == HIGH) digitalWrite(D7, HIGH); Same for RX. That would at least test that the pins operate as digital I/O - they should then work as Serial1 fine.
Thanks. I've tested my RX/TX pins with both LEDs (with resistor) AND with a test sketch which involved sending data over serial from a host PC and getting a reply back from the device.That all works.
So back to attempting to get the DFPlayer Mini working - I've tried using a Core, and a Photon. I've tried using two different DFPlayer Minis. I've tried two different USB cables. I can no longer get the DFPlayer Mini to play nicely with a Core or a Photon.
The only way I can get my code working is to completely remove the DFPlayer Mini code from my sketch. This is code that's worked on about eight other Particle devices, both Cores and Photons and never given me any trouble once I got it working initially.
I'm clutching at straws here, but has anything changed in firmware v1.0.0? I don't get compiler errors but I do now get freezing devices which I didn't before. I've now spent three evenings trying to debug this and I'm pulling my hair out somewhat.
Thanks!
EDIT: Just tried
this sketch from FiDel and it works. The MP3s on the SD card play in sequence one after the other. So confused. When I use my code now (even when targeting older versions of the firmware), it now no longer works.
Sure some things have changed with v1.0.0, but there should not have been any breaking changes.
But if you code relies on some system bug that was now fixed, then we wouldn’t know without some code to look at
To be clear: the faulty DFPlayer Mini works if triggered manually by touching the pins, and it even works with some libraries but it doesn’t work with the DFRobotDFPlayerMini.h library I currently use. That’s why this was such a tricky thing to pin down.
Different firmware on the DFPlayer Mini controller - changed control codes? Likely the ones on the left are knock-offs. I have bought some of these but not in quantity. It least it wasn’t the photon or your code