mirror of
https://github.com/sparkfun/OpenLog.git
synced 2024-09-19 16:40:14 +00:00
Updating directory structure, updating fritzing documentation
This commit is contained in:
parent
d4cff21981
commit
7126fc1b0e
Binary file not shown.
Before Width: | Height: | Size: 61 KiB |
Binary file not shown.
Before Width: | Height: | Size: 54 KiB |
Binary file not shown.
Before Width: | Height: | Size: 148 KiB |
BIN
Documentation/OpenLogFTDI.png
Normal file
BIN
Documentation/OpenLogFTDI.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
BIN
Documentation/OpenLogProMini.png
Normal file
BIN
Documentation/OpenLogProMini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
@ -1,107 +1,107 @@
|
||||
/*
|
||||
6-1-2011
|
||||
SparkFun Electronics 2011
|
||||
Nathan Seidle
|
||||
|
||||
Controlling OpenLog command line from an Arduino
|
||||
|
||||
Connect the following OpenLog to Arduino:
|
||||
TXO of OpenLog to RX of the Arduino
|
||||
RXI to TX
|
||||
GRN to 2
|
||||
VCC to 5V
|
||||
GND to GND
|
||||
|
||||
NOTE: When uploading this example code you must temporarily disconnect TX and RX while uploading
|
||||
the new code to the Arduino. Otherwise you will get a "avrdude: stk500_getsync(): not in sync" error.
|
||||
|
||||
This example code assumes the OpenLog is set to operate at 9600bps in NewLog mode, meaning OpenLog
|
||||
should power up and output '12<'. This code then sends the three escape characters and then sends
|
||||
the commands to create a new random file called nate###.txt where ### is a random number from 0 to 999.
|
||||
|
||||
This code assume OpenLog is in the default state of 9600bps with ASCII-26 as the esacape character.
|
||||
|
||||
Be careful when sending commands to OpenLog. println() sends extra newline characters that
|
||||
cause problems with the command parser. The new v2.51 ignores \n commands so it should be easier to
|
||||
talk to on the command prompt level. This example code works with all OpenLog v2 and higher.
|
||||
|
||||
*/
|
||||
|
||||
char buff[50];
|
||||
int fileNumber;
|
||||
|
||||
int statLED = 13;
|
||||
int resetOpenLog = 2;
|
||||
|
||||
void setup() {
|
||||
pinMode(statLED, OUTPUT);
|
||||
pinMode(resetOpenLog, OUTPUT);
|
||||
|
||||
randomSeed(analogRead(0));
|
||||
Serial.begin(9600);
|
||||
|
||||
//Reset OpenLog
|
||||
digitalWrite(resetOpenLog, LOW);
|
||||
delay(100);
|
||||
digitalWrite(resetOpenLog, HIGH);
|
||||
|
||||
//Wait for OpenLog to respond with '<' to indicate it is alive and recording to a file
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '<') break;
|
||||
}
|
||||
|
||||
//Send three control z to enter OpenLog command mode
|
||||
//This is how Arduino v0022 used to do it. Doesn't work with v1.0
|
||||
//Serial.print(byte(26));
|
||||
//Serial.print(byte(26));
|
||||
//Serial.print(byte(26));
|
||||
|
||||
//Works with Arduino v1.0
|
||||
Serial.write(26);
|
||||
Serial.write(26);
|
||||
Serial.write(26);
|
||||
|
||||
//Wait for OpenLog to respond with '>' to indicate we are in command mode
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '>') break;
|
||||
}
|
||||
|
||||
fileNumber = random(999); //Select a random file #, 0 to 999
|
||||
|
||||
//Send new (random from 0 to 999) file name
|
||||
|
||||
//Old way
|
||||
sprintf(buff, "new nate%03d.txt\r", fileNumber);
|
||||
Serial.print(buff); //\r in string + regular print works with older v2.5 Openlogs
|
||||
|
||||
//New way
|
||||
//sprintf(buff, "new nate%03d.txt", fileNumber);
|
||||
//Serial.println(buff); //regular println works with v2.51 and above
|
||||
|
||||
//Wait for OpenLog to return to waiting for a command
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '>') break;
|
||||
}
|
||||
|
||||
sprintf(buff, "append nate%03d.txt\r", fileNumber);
|
||||
Serial.print(buff);
|
||||
|
||||
//Wait for OpenLog to indicate file is open and ready for writing
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '<') break;
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Serial.println("Yay!");
|
||||
digitalWrite(13, HIGH);
|
||||
delay(1000);
|
||||
digitalWrite(13, LOW);
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
6-1-2011
|
||||
SparkFun Electronics 2011
|
||||
Nathan Seidle
|
||||
|
||||
Controlling OpenLog command line from an Arduino
|
||||
|
||||
Connect the following OpenLog to Arduino:
|
||||
TXO of OpenLog to RX of the Arduino
|
||||
RXI to TX
|
||||
GRN to 2
|
||||
VCC to 5V
|
||||
GND to GND
|
||||
|
||||
NOTE: When uploading this example code you must temporarily disconnect TX and RX while uploading
|
||||
the new code to the Arduino. Otherwise you will get a "avrdude: stk500_getsync(): not in sync" error.
|
||||
|
||||
This example code assumes the OpenLog is set to operate at 9600bps in NewLog mode, meaning OpenLog
|
||||
should power up and output '12<'. This code then sends the three escape characters and then sends
|
||||
the commands to create a new random file called nate###.txt where ### is a random number from 0 to 999.
|
||||
|
||||
This code assume OpenLog is in the default state of 9600bps with ASCII-26 as the esacape character.
|
||||
|
||||
Be careful when sending commands to OpenLog. println() sends extra newline characters that
|
||||
cause problems with the command parser. The new v2.51 ignores \n commands so it should be easier to
|
||||
talk to on the command prompt level. This example code works with all OpenLog v2 and higher.
|
||||
|
||||
*/
|
||||
|
||||
char buff[50];
|
||||
int fileNumber;
|
||||
|
||||
int statLED = 13;
|
||||
int resetOpenLog = 2;
|
||||
|
||||
void setup() {
|
||||
pinMode(statLED, OUTPUT);
|
||||
pinMode(resetOpenLog, OUTPUT);
|
||||
|
||||
randomSeed(analogRead(0));
|
||||
Serial.begin(9600);
|
||||
|
||||
//Reset OpenLog
|
||||
digitalWrite(resetOpenLog, LOW);
|
||||
delay(100);
|
||||
digitalWrite(resetOpenLog, HIGH);
|
||||
|
||||
//Wait for OpenLog to respond with '<' to indicate it is alive and recording to a file
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '<') break;
|
||||
}
|
||||
|
||||
//Send three control z to enter OpenLog command mode
|
||||
//This is how Arduino v0022 used to do it. Doesn't work with v1.0
|
||||
//Serial.print(byte(26));
|
||||
//Serial.print(byte(26));
|
||||
//Serial.print(byte(26));
|
||||
|
||||
//Works with Arduino v1.0
|
||||
Serial.write(26);
|
||||
Serial.write(26);
|
||||
Serial.write(26);
|
||||
|
||||
//Wait for OpenLog to respond with '>' to indicate we are in command mode
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '>') break;
|
||||
}
|
||||
|
||||
fileNumber = random(999); //Select a random file #, 0 to 999
|
||||
|
||||
//Send new (random from 0 to 999) file name
|
||||
|
||||
//Old way
|
||||
sprintf(buff, "new nate%03d.txt\r", fileNumber);
|
||||
Serial.print(buff); //\r in string + regular print works with older v2.5 Openlogs
|
||||
|
||||
//New way
|
||||
//sprintf(buff, "new nate%03d.txt", fileNumber);
|
||||
//Serial.println(buff); //regular println works with v2.51 and above
|
||||
|
||||
//Wait for OpenLog to return to waiting for a command
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '>') break;
|
||||
}
|
||||
|
||||
sprintf(buff, "append nate%03d.txt\r", fileNumber);
|
||||
Serial.print(buff);
|
||||
|
||||
//Wait for OpenLog to indicate file is open and ready for writing
|
||||
while(1) {
|
||||
if(Serial.available())
|
||||
if(Serial.read() == '<') break;
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Serial.println("Yay!");
|
||||
digitalWrite(13, HIGH);
|
||||
delay(1000);
|
||||
digitalWrite(13, LOW);
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
|
@ -253,4 +253,4 @@ void gotoCommandMode(void) {
|
||||
if(OpenLog.available())
|
||||
if(OpenLog.read() == '>') break;
|
||||
}
|
||||
}
|
||||
}
|
@ -101,4 +101,4 @@ void loop()
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
This is a simple test sketch for OpenLog. It sends a large batch of characters to the serial port at 9600bps.
|
||||
This is a simple test sketch for OpenLog. It sends a large batch of characters to the serial port at 9600bps.
|
||||
Original test was recomended by ScottH on issue #12 : http://github.com/nseidle/OpenLog/issues#issue/12
|
@ -88,4 +88,4 @@ void loop()
|
||||
delay(200);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
OpenLog Firmware
|
||||
=======
|
||||
|
||||
* OpenLog - Firmware that ships with OpenLog. '?' command will show the version loaded onto a unit.
|
||||
* OpenLog_Light - Used for high-speed logging. By removing the menu and command mode the receive buffer is increased.
|
||||
* OpenLog_Minimal - Highest speed logging. Baud rate must be set in code and uploaded. Hardest, most advanced, and best at high-speed logging.
|
||||
* Examples - Arduino examples for controlling and testing OpenLog
|
||||
* Benchmarking - Used to test OpenLog. Sends large amounts of data at 115200bps over multiple files.
|
||||
* CommandTest - Example of how to create and append a file via command line control.
|
||||
* ReadExample - Example of how to control OpenLog via command line.
|
||||
* ReadExample_LargeFile - Example of how to open a large file stored on OpenLog and report it over a local bluetooth connection.
|
||||
* Test_Sketch - Used to test OpenLog with lots of serial data.
|
||||
* Test_Sketch_Binary - Used to test OpenLog with binary data and escape characters.
|
||||
|
||||
OpenLog Firmware
|
||||
=================
|
||||
|
||||
* OpenLog - Firmware that ships with OpenLog. '?' command will show the version loaded onto a unit.
|
||||
* OpenLog_Light - Used for high-speed logging. By removing the menu and command mode the receive buffer is increased.
|
||||
* OpenLog_Minimal - Highest speed logging. Baud rate must be set in code and uploaded. Hardest, most advanced, and best at high-speed logging.
|
||||
* Examples - Arduino examples for controlling and testing OpenLog
|
||||
* Benchmarking - Used to test OpenLog. Sends large amounts of data at 115200bps over multiple files.
|
||||
* CommandTest - Example of how to create and append a file via command line control.
|
||||
* ReadExample - Example of how to control OpenLog via command line.
|
||||
* ReadExample_LargeFile - Example of how to open a large file stored on OpenLog and report it over a local bluetooth connection.
|
||||
* Test_Sketch - Used to test OpenLog with lots of serial data.
|
||||
* Test_Sketch_Binary - Used to test OpenLog with binary data and escape characters.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user