Search results

  1. A

    Need help saving serial data to SD card

    I was initially planning to connect a FONA 3G module to transfer data, and from my testing with FONA I was able to only transfer about 14 MB of data into the memory and then upload it via FTP. I didn't want to introduce a new variable to keep track as I was able to use the "tick" variable...
  2. A

    Need help saving serial data to SD card

    Thank you so much for testing this. I increased the serial buffer to 16 * 1024 and tested for about an hour. Just like you had mentioned, I haven't noticed any issues so far. I will also be looking to add more sensors in the future and so my data string will also grow longer. Hoping the serial...
  3. A

    Need help saving serial data to SD card

    It only happens when the SD card portion of the code is included. Commenting out the following lines in the loop, prints out the serial data perfectly. if (write_flag == true) record_data(); Also tried it on a separate sketch printing out the serial data just to make sure, and I...
  4. A

    Need help saving serial data to SD card

    Both T1 and T2 are running at 115200. One ground pin on T1 is connected to a ground pin on T2 and only the T1-TX pin is connected to T2-RX, as I am doing a one-way data transfer. And I am not using any interrupts in my code. With the above mentioned changes to the variable sizes and types...
  5. A

    Need help saving serial data to SD card

    Thanks for explaining for explaining this. Based on the above replies in #10 and #11, I have declared a global serial buffer of type char - char serial_buffer[1024] and then chip1.addMemoryForRead(serial_buffer, sizeof(serial_buffer)) before chip1.begin(). Still seeing the scrambling of...
  6. A

    Need help saving serial data to SD card

    implemented this change and now the line_count variable is displaying the right values. Also noted the file indexing on the SD card seems to work with this change. Just curious why it would miss the \r character when reading when Serial.read() acquires one character every iteration of the loop...
  7. A

    Need help saving serial data to SD card

    I am confident that /r being sent in the Serial to my T2. Else, I wouldn't be able to see the rx_arr printed on my Serial monitor. Did some further digging into the code by commenting out all the SD related lines and keeping only the Serial read related lines. I printed out the states of the...
  8. A

    Need help saving serial data to SD card

    The character string sent from my T1 will have a maximum of 80 characters (including the string termination character). I have tested the rx_arr without the SD card code and there is no problems in that. What you are seeing in the image of the serial monitor is the garbled one where portions of...
  9. A

    Need help saving serial data to SD card

    Thanks for pointing that out Pete. I did change the size to test out the code with a constant file name and forgot to change it back. I have now changed it to 16 and tested it again just to make sure. All the problems with writing to SD card is still present.
  10. A

    Need help saving serial data to SD card

    I am having two Teensy 4.1 (lets call them T1 and T2) setup in such a way that T1 reads data from the sensors and sends them at 100 Hz to T2 via Serial 5. Because I have control over the string sent by T1, I also send out a '\r' in the serial to let T2 know that a full string has been received...
  11. A

    Analog pins not being read on Teensy 4.1

    pin 13 is my bad... Found soldering problems on my breakout board and i'll have to get that rectified. Thanks!
  12. A

    Analog pins not being read on Teensy 4.1

    Hi! I have written a simple code to read the raw accelerometer values from the ADXL 335 breakout board and I'm using Teensy 4.1. The ccelerometer ADXL 335 breakout board is powered with 3.3 V and the axis pins connected to analog pins 13,14,15 on Teensy 4.1. I am getting spurios values like...
Back
Top