Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: How to dump contents of file on SD card to serial

Home Forums Mayfly Data Logger How to dump contents of file on SD card to serial Reply To: How to dump contents of file on SD card to serial

#15830
neilh
Participant

Hi I’ve been thinking/working on something slightly similar when @ensign posted above.

BTW I found the github.com/ScottEnsign/SDoutput hasn’t got the actual code, I think it probably needs a “git push” to send the code up.

Seems to me the issue with the @selbig  original post #15641 above, is that the SD card is initialized in Logger, so  ShowData() needs to be an extension to LoggerBase.x : Class Logger {}

From  @selbig post transfer-file-from-sd-card-to-ios-android-via-bluetooth  post I’ve been thinking about adding BT ……

So I believe the Software Use Case  is:

User approaches a Mayfly/BT logger, and with the BT enabled phone, connects to the Mayfly-BT logger, and downloads the readings, also verifies the logger time is accurate.

This could be done with developing an App that possibly uses an embedded remote procedure call (eRpc). However its a lot of skills.

Another version might be ; User approaches a Mayfly/BT logger, and with the BT enabled phone,  connects to the Mayfly-BT logger with a terminal app that uses the BT serial pass through, and then commands the Mayfly to downloads the readings with “LR” (list readings) . Another  separate  command can list the time Mayfly date/time (D?), and also set the Mayfly time with D YYMMDD HHMM.

I have a system that I am thinking of this for,   inexpensive-diy-conductivity-sensor   that currently has  Boot Net (walk up and get data).

Some baby steps in getting there, has been developing a Mayfly SerialCommand interface, and its just about there – see Arduino-SerialCommand  This solves a problem of how to check date in the field.

Initially I developed an interface using a simple String to collect the serial user input data.  However using String led to a terrible bug, as the Mayfly Rx input is floating (Mayfly Issue#28) and so can cause random bursts of characters, which with String meant it periodically fractured the heap and lobotomized the ram. See eight-tips-to-use-the-string-class-efficiently.  The hardware fix for the Mayfly is to add a dongle to J2 “FTDI Programmer” port, with a 1M resistor pull down to the Rx pin3

I’ve just switched to a serial command – and added the context for “LR” and “L?” to  tu_serialCmd.h

The next stages are to get the file listing, and then to try the BT context with the Serial Command being processed from the BT serial interface.

One other issue is that with the UART serial port 115200baud, the serial input is misread about 20% of the time – I’m guessing the baud rate doesn’t quite line up. I wouldn’t think this would happen with BT.