Open jerabaul29 opened 3 years ago
The strange things are:
without the sonar (commenting it out in main.cpp for example) the logger seems to work very well.
using only the sonar also seems to be fine, see the results in #39
But somehow the sonar and the rest of the logger do not play well together.
I am for example very shocked at how things fail in #36 . I do not understand how it is possible that I do not get any serial information from within the call to measure_and_log
. I may be missing something obvious, but I cannot find what is wrong. This is why I start to believe that there may be some memory corruption happening somehow that really mess up things. That idea got reinforced when seeing that 1) the ping library uses some malloc, which is not great on MCUs, 2) some of the malloc was done wrongly (see https://github.com/bluerobotics/ping-arduino/issues/21 ). Same thing, used og memcpy make me a bit worried.
In particular, how is it possible that this gets executed fine
As it is visible on the dump in #36 , but then we never see
And I really cannot understand why / how without the hypothesis of some memory corruption.
Any help / tips welcome :) .
@patrickelectric this is the repo where we work on a high frequency logger using the Arduino Due.
Basically, the logger itself is this code:
https://github.com/jvoermans/Vibration_Logger/tree/master/material_Jean/Due_SD_high_frequency_logger
We have very strange issues when trying to add the sonar. I and @jvoermans have spent quite a bit of time trying to debug that (see for example #36 ) without success.