SDFat and Serial1 and Serial2 conflict?

Status
Not open for further replies.

gdiemme

Member
Hi to everyone,
I am developing my first Teensy 3.1 project, it is a data logger that should record the frequency of a signal and GPS on a SD card with fixed sampling period.
I am using FreqMeasure, TinyGPS++ and SdFat to log on the SD and everything seems to work fine.
Now I am trying to use a bluetooth serial interface (HC-05) to control the data logger, but there is a problem, i think with serial ports conflict.
This is the hardware configuration:
The FreqMeasure uses pin3 and input.
The GPS uses Serial3 (pins 7, 8).
The Sd card uses defauld SPI interface (pins 10, 11, 12, 13).

I have tried to use both Serial1 (pins 0, 1) or Serial2 (pins 9, 10 using pin6 as CS for the SD), but in both cases i have SD errors during writing... :confused:
Thank you!
 
Does the problem happen if you use the SD library, instead of SdFat?

Can you narrow this down to just a couple things conflicting, or does the problem only happen when all are in use?

Ultimately, for this to get resolved, you're going to have to post a (hopefully short) complete program which reproduces the problem. (see the "forum rule")
 
Thank you Paul for quick answer.
I am desolated, but now it seems to work perfectly!
What i have done? I was only working to make order in the code and add some comments to post it here... and it magically works!
Sorry for disturbance...
P.S. as soon i will have time I will try to understand what was the error I made to let you know...
Thank you
 
Glad you got it working. All of those libraries are supposed to be able to work together without conflict.

But there could be some unknown problem. If you manage to reproduce the problem, please save that code and post it here.
 
Status
Not open for further replies.
Back
Top