Skip to content

Commit

Permalink
commit...
Browse files Browse the repository at this point in the history
  • Loading branch information
pauledd committed Jul 29, 2019
1 parent 69c6c4d commit a1122bd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
default:
g++ -Wall -g -std=c++11 -o bin2csv main.cpp
output: main.o
g++ -Wall -g -std=c++11 main.o -o bin2csv
main.o: main.cpp
g++ -Wall -g -std=c++11 -c main.cpp
clean:
rm *.o bin2csv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bin2csv
convert binary files from SdFat AnalogBinLogger to csv files on an pc (x64).

https://github.com/greiman/SdFat/tree/master/examples/AnalogBinLogger
compile with:

cd bin2csv
Expand Down
20 changes: 20 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*///////////////////////////////////////////////////////
bin2csv is to convert binary files produced by SdFats
"AnalogBinLogger"
https://github.com/greiman/SdFat/tree/master/examples/AnalogBinLogger
compile:
# cd bin2csv
# make
To run the conversion just supply
bin2csv with an input binary file and an output csv file.
(tested only on x64 linux).
I am a c++ beginner so errors are likely
////////////////////////////////////////////////////////*/


#include <iostream>
#include <fstream>
#include <sstream>
Expand Down Expand Up @@ -154,6 +173,7 @@ int main ( int argc, char* argv[] )
std::cerr << "Usage: \t" << argv[0] << " input.bin output.csv\n";
break;
case 2:
iFileName = argv[1];
std::cerr << "ERROR, no output file specified!\n";
break;
case 3:
Expand Down

0 comments on commit a1122bd

Please sign in to comment.