Hi,
I am making an analog data logger using Arduino. On googling, I found a sdfat library (GitHub - greiman/SdFat: Arduino FAT16/FAT32 exFAT Library), which has AnalogBinLogger sketch to log analog data at high sampling rate. However, by default this sketch is made to work on serial inputs from the Serial Monitor. Please tell me what changes should I make in the code so that I can use external start and stop switches to control the logging.
Regards,
Shantnu Kakkar
Please tell me what changes should I make in the code
The code you didn't post?
It should be simple to read the state(s) of the start/stop switch(es), assuming that it is/they are properly wired. It should be simple to stop reading serial data. It should be simple to change the if statement that starts logging to be based on the switch state instead of the serial data. It should be simple to change the if statement that stops logging to be based on the switch state instead of the serial data.
Thank you for your response.
The code is here: https://github.com/greiman/SdFat/blob/master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.ino
Since the code is fairly long and complicated, I am a little hesitant in changing the code. If someone has already done that and its working for him, it would be really helpful.
Could you help me PaulS in deciding where should I make the changes? I am not too much experienced with ARduino