-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on ESP8266 chip #21
Comments
I dug a bit deeper and it could be that SoftwareSerial triggers a crash on ESP8266 chips. On opensensinglab/tfmini#6 they recommend using the ESPSoftwareSerial for the TFMini. Not sure how I could implement that info for testing. Help? 🤓 |
I managed to make it work, by using the main Serial class for communicating with the TFMini Plus. Basically:
I want to output tfDist to an OLED shield, so, for my purpose, I can still see the measured results even without the serial connection to the computer. But if someone wants to tackle this, it would be nice to have it fixed. If you need the altered code, just let me know. |
I was not aware of the Wemos D1 Mini board. Now I am. Thank you. I like I also agree that SoftwareSerial brings it's own set of problems and that's why I do not understand why you want to communicate with the TFMini-Plus in the UART mode. Why not use I2C mode? I would love to see your code. Thanks, Bud Ryerson |
I tried to run the code on a Wemos D1 Mini board.
First, the compiler threw an error, which I fixed like this:
Line 30 in print.h:
fdevopen( &serial_putc, 0 );
Needs to be changed to:
Serial.setDebugOutput(true);
This seems to be the proper way to redirect stdout on ESP8266 chips - a conditional based on the chip type might be useful in the code in the future.
But even after uploading the revised code to the board, I can't get it to communicate with the TFMini Plus (which works well on an Arduino Uno).
Did somebody have any luck with this?
The text was updated successfully, but these errors were encountered: