Updating directory structure, updating fritzing documentation

This commit is contained in:
Toni Klopfenstein 2016-04-07 17:21:04 -06:00
parent d4cff21981
commit 7126fc1b0e
20 changed files with 125 additions and 125 deletions

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -1,107 +1,107 @@
/* /*
6-1-2011 6-1-2011
SparkFun Electronics 2011 SparkFun Electronics 2011
Nathan Seidle Nathan Seidle
Controlling OpenLog command line from an Arduino Controlling OpenLog command line from an Arduino
Connect the following OpenLog to Arduino: Connect the following OpenLog to Arduino:
TXO of OpenLog to RX of the Arduino TXO of OpenLog to RX of the Arduino
RXI to TX RXI to TX
GRN to 2 GRN to 2
VCC to 5V VCC to 5V
GND to GND GND to GND
NOTE: When uploading this example code you must temporarily disconnect TX and RX while uploading 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. 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 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 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. 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. 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 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 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. talk to on the command prompt level. This example code works with all OpenLog v2 and higher.
*/ */
char buff[50]; char buff[50];
int fileNumber; int fileNumber;
int statLED = 13; int statLED = 13;
int resetOpenLog = 2; int resetOpenLog = 2;
void setup() { void setup() {
pinMode(statLED, OUTPUT); pinMode(statLED, OUTPUT);
pinMode(resetOpenLog, OUTPUT); pinMode(resetOpenLog, OUTPUT);
randomSeed(analogRead(0)); randomSeed(analogRead(0));
Serial.begin(9600); Serial.begin(9600);
//Reset OpenLog //Reset OpenLog
digitalWrite(resetOpenLog, LOW); digitalWrite(resetOpenLog, LOW);
delay(100); delay(100);
digitalWrite(resetOpenLog, HIGH); digitalWrite(resetOpenLog, HIGH);
//Wait for OpenLog to respond with '<' to indicate it is alive and recording to a file //Wait for OpenLog to respond with '<' to indicate it is alive and recording to a file
while(1) { while(1) {
if(Serial.available()) if(Serial.available())
if(Serial.read() == '<') break; if(Serial.read() == '<') break;
} }
//Send three control z to enter OpenLog command mode //Send three control z to enter OpenLog command mode
//This is how Arduino v0022 used to do it. Doesn't work with v1.0 //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)); //Serial.print(byte(26));
//Serial.print(byte(26)); //Serial.print(byte(26));
//Works with Arduino v1.0 //Works with Arduino v1.0
Serial.write(26); Serial.write(26);
Serial.write(26); Serial.write(26);
Serial.write(26); Serial.write(26);
//Wait for OpenLog to respond with '>' to indicate we are in command mode //Wait for OpenLog to respond with '>' to indicate we are in command mode
while(1) { while(1) {
if(Serial.available()) if(Serial.available())
if(Serial.read() == '>') break; if(Serial.read() == '>') break;
} }
fileNumber = random(999); //Select a random file #, 0 to 999 fileNumber = random(999); //Select a random file #, 0 to 999
//Send new (random from 0 to 999) file name //Send new (random from 0 to 999) file name
//Old way //Old way
sprintf(buff, "new nate%03d.txt\r", fileNumber); sprintf(buff, "new nate%03d.txt\r", fileNumber);
Serial.print(buff); //\r in string + regular print works with older v2.5 Openlogs Serial.print(buff); //\r in string + regular print works with older v2.5 Openlogs
//New way //New way
//sprintf(buff, "new nate%03d.txt", fileNumber); //sprintf(buff, "new nate%03d.txt", fileNumber);
//Serial.println(buff); //regular println works with v2.51 and above //Serial.println(buff); //regular println works with v2.51 and above
//Wait for OpenLog to return to waiting for a command //Wait for OpenLog to return to waiting for a command
while(1) { while(1) {
if(Serial.available()) if(Serial.available())
if(Serial.read() == '>') break; if(Serial.read() == '>') break;
} }
sprintf(buff, "append nate%03d.txt\r", fileNumber); sprintf(buff, "append nate%03d.txt\r", fileNumber);
Serial.print(buff); Serial.print(buff);
//Wait for OpenLog to indicate file is open and ready for writing //Wait for OpenLog to indicate file is open and ready for writing
while(1) { while(1) {
if(Serial.available()) if(Serial.available())
if(Serial.read() == '<') break; if(Serial.read() == '<') break;
} }
} }
void loop() { void loop() {
Serial.println("Yay!"); Serial.println("Yay!");
digitalWrite(13, HIGH); digitalWrite(13, HIGH);
delay(1000); delay(1000);
digitalWrite(13, LOW); digitalWrite(13, LOW);
delay(1000); delay(1000);
} }

View File

@ -253,4 +253,4 @@ void gotoCommandMode(void) {
if(OpenLog.available()) if(OpenLog.available())
if(OpenLog.read() == '>') break; if(OpenLog.read() == '>') break;
} }
} }

View File

@ -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 Original test was recomended by ScottH on issue #12 : http://github.com/nseidle/OpenLog/issues#issue/12

View File

@ -1,14 +1,14 @@
OpenLog Firmware OpenLog Firmware
======= =================
* OpenLog - Firmware that ships with OpenLog. '?' command will show the version loaded onto a unit. * 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_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. * 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 * Examples - Arduino examples for controlling and testing OpenLog
* Benchmarking - Used to test OpenLog. Sends large amounts of data at 115200bps over multiple files. * 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. * 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 - 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. * 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 - Used to test OpenLog with lots of serial data.
* Test_Sketch_Binary - Used to test OpenLog with binary data and escape characters. * Test_Sketch_Binary - Used to test OpenLog with binary data and escape characters.