-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating directory structure, updating fritzing documentation
- Loading branch information
Toni Klopfenstein
committed
Apr 7, 2016
1 parent
d4cff21
commit 7126fc1
Showing
20 changed files
with
125 additions
and
125 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
214 changes: 107 additions & 107 deletions
214
...enLog_CommandTest/OpenLog_CommandTest.ino → ...enLog_CommandTest/OpenLog_CommandTest.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,4 +253,4 @@ void gotoCommandMode(void) { | |
if(OpenLog.available()) | ||
if(OpenLog.read() == '>') break; | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,4 +101,4 @@ void loop() | |
delay(1000); | ||
} | ||
|
||
|
||
|
2 changes: 1 addition & 1 deletion
2
firmware/examples/OpenLog_Test_Sketch/README → ...duino_Sketches/OpenLog_Test_Sketch/README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,4 @@ void loop() | |
delay(200); | ||
} | ||
|
||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|