Skip to content

Commit 7126fc1

Browse files
author
Toni Klopfenstein
committed
Updating directory structure, updating fritzing documentation
1 parent d4cff21 commit 7126fc1

File tree

20 files changed

+125
-125
lines changed

20 files changed

+125
-125
lines changed

Documentation/FTDI-Connections.jpg

-61.4 KB
Binary file not shown.
-53.5 KB
Binary file not shown.
-148 KB
Binary file not shown.

Documentation/OpenLogFTDI.png

35 KB
Loading

Documentation/OpenLogProMini.png

66.6 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,107 @@
1-
/*
2-
6-1-2011
3-
SparkFun Electronics 2011
4-
Nathan Seidle
5-
6-
Controlling OpenLog command line from an Arduino
7-
8-
Connect the following OpenLog to Arduino:
9-
TXO of OpenLog to RX of the Arduino
10-
RXI to TX
11-
GRN to 2
12-
VCC to 5V
13-
GND to GND
14-
15-
NOTE: When uploading this example code you must temporarily disconnect TX and RX while uploading
16-
the new code to the Arduino. Otherwise you will get a "avrdude: stk500_getsync(): not in sync" error.
17-
18-
This example code assumes the OpenLog is set to operate at 9600bps in NewLog mode, meaning OpenLog
19-
should power up and output '12<'. This code then sends the three escape characters and then sends
20-
the commands to create a new random file called nate###.txt where ### is a random number from 0 to 999.
21-
22-
This code assume OpenLog is in the default state of 9600bps with ASCII-26 as the esacape character.
23-
24-
Be careful when sending commands to OpenLog. println() sends extra newline characters that
25-
cause problems with the command parser. The new v2.51 ignores \n commands so it should be easier to
26-
talk to on the command prompt level. This example code works with all OpenLog v2 and higher.
27-
28-
*/
29-
30-
char buff[50];
31-
int fileNumber;
32-
33-
int statLED = 13;
34-
int resetOpenLog = 2;
35-
36-
void setup() {
37-
pinMode(statLED, OUTPUT);
38-
pinMode(resetOpenLog, OUTPUT);
39-
40-
randomSeed(analogRead(0));
41-
Serial.begin(9600);
42-
43-
//Reset OpenLog
44-
digitalWrite(resetOpenLog, LOW);
45-
delay(100);
46-
digitalWrite(resetOpenLog, HIGH);
47-
48-
//Wait for OpenLog to respond with '<' to indicate it is alive and recording to a file
49-
while(1) {
50-
if(Serial.available())
51-
if(Serial.read() == '<') break;
52-
}
53-
54-
//Send three control z to enter OpenLog command mode
55-
//This is how Arduino v0022 used to do it. Doesn't work with v1.0
56-
//Serial.print(byte(26));
57-
//Serial.print(byte(26));
58-
//Serial.print(byte(26));
59-
60-
//Works with Arduino v1.0
61-
Serial.write(26);
62-
Serial.write(26);
63-
Serial.write(26);
64-
65-
//Wait for OpenLog to respond with '>' to indicate we are in command mode
66-
while(1) {
67-
if(Serial.available())
68-
if(Serial.read() == '>') break;
69-
}
70-
71-
fileNumber = random(999); //Select a random file #, 0 to 999
72-
73-
//Send new (random from 0 to 999) file name
74-
75-
//Old way
76-
sprintf(buff, "new nate%03d.txt\r", fileNumber);
77-
Serial.print(buff); //\r in string + regular print works with older v2.5 Openlogs
78-
79-
//New way
80-
//sprintf(buff, "new nate%03d.txt", fileNumber);
81-
//Serial.println(buff); //regular println works with v2.51 and above
82-
83-
//Wait for OpenLog to return to waiting for a command
84-
while(1) {
85-
if(Serial.available())
86-
if(Serial.read() == '>') break;
87-
}
88-
89-
sprintf(buff, "append nate%03d.txt\r", fileNumber);
90-
Serial.print(buff);
91-
92-
//Wait for OpenLog to indicate file is open and ready for writing
93-
while(1) {
94-
if(Serial.available())
95-
if(Serial.read() == '<') break;
96-
}
97-
}
98-
99-
void loop() {
100-
Serial.println("Yay!");
101-
digitalWrite(13, HIGH);
102-
delay(1000);
103-
digitalWrite(13, LOW);
104-
delay(1000);
105-
}
106-
107-
1+
/*
2+
6-1-2011
3+
SparkFun Electronics 2011
4+
Nathan Seidle
5+
6+
Controlling OpenLog command line from an Arduino
7+
8+
Connect the following OpenLog to Arduino:
9+
TXO of OpenLog to RX of the Arduino
10+
RXI to TX
11+
GRN to 2
12+
VCC to 5V
13+
GND to GND
14+
15+
NOTE: When uploading this example code you must temporarily disconnect TX and RX while uploading
16+
the new code to the Arduino. Otherwise you will get a "avrdude: stk500_getsync(): not in sync" error.
17+
18+
This example code assumes the OpenLog is set to operate at 9600bps in NewLog mode, meaning OpenLog
19+
should power up and output '12<'. This code then sends the three escape characters and then sends
20+
the commands to create a new random file called nate###.txt where ### is a random number from 0 to 999.
21+
22+
This code assume OpenLog is in the default state of 9600bps with ASCII-26 as the esacape character.
23+
24+
Be careful when sending commands to OpenLog. println() sends extra newline characters that
25+
cause problems with the command parser. The new v2.51 ignores \n commands so it should be easier to
26+
talk to on the command prompt level. This example code works with all OpenLog v2 and higher.
27+
28+
*/
29+
30+
char buff[50];
31+
int fileNumber;
32+
33+
int statLED = 13;
34+
int resetOpenLog = 2;
35+
36+
void setup() {
37+
pinMode(statLED, OUTPUT);
38+
pinMode(resetOpenLog, OUTPUT);
39+
40+
randomSeed(analogRead(0));
41+
Serial.begin(9600);
42+
43+
//Reset OpenLog
44+
digitalWrite(resetOpenLog, LOW);
45+
delay(100);
46+
digitalWrite(resetOpenLog, HIGH);
47+
48+
//Wait for OpenLog to respond with '<' to indicate it is alive and recording to a file
49+
while(1) {
50+
if(Serial.available())
51+
if(Serial.read() == '<') break;
52+
}
53+
54+
//Send three control z to enter OpenLog command mode
55+
//This is how Arduino v0022 used to do it. Doesn't work with v1.0
56+
//Serial.print(byte(26));
57+
//Serial.print(byte(26));
58+
//Serial.print(byte(26));
59+
60+
//Works with Arduino v1.0
61+
Serial.write(26);
62+
Serial.write(26);
63+
Serial.write(26);
64+
65+
//Wait for OpenLog to respond with '>' to indicate we are in command mode
66+
while(1) {
67+
if(Serial.available())
68+
if(Serial.read() == '>') break;
69+
}
70+
71+
fileNumber = random(999); //Select a random file #, 0 to 999
72+
73+
//Send new (random from 0 to 999) file name
74+
75+
//Old way
76+
sprintf(buff, "new nate%03d.txt\r", fileNumber);
77+
Serial.print(buff); //\r in string + regular print works with older v2.5 Openlogs
78+
79+
//New way
80+
//sprintf(buff, "new nate%03d.txt", fileNumber);
81+
//Serial.println(buff); //regular println works with v2.51 and above
82+
83+
//Wait for OpenLog to return to waiting for a command
84+
while(1) {
85+
if(Serial.available())
86+
if(Serial.read() == '>') break;
87+
}
88+
89+
sprintf(buff, "append nate%03d.txt\r", fileNumber);
90+
Serial.print(buff);
91+
92+
//Wait for OpenLog to indicate file is open and ready for writing
93+
while(1) {
94+
if(Serial.available())
95+
if(Serial.read() == '<') break;
96+
}
97+
}
98+
99+
void loop() {
100+
Serial.println("Yay!");
101+
digitalWrite(13, HIGH);
102+
delay(1000);
103+
digitalWrite(13, LOW);
104+
delay(1000);
105+
}
106+
107+

firmware/examples/OpenLog_ReadExample/OpenLog_ReadExample.ino renamed to firmware/Arduino_Sketches/OpenLog_ReadExample/OpenLog_ReadExample.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,4 @@ void gotoCommandMode(void) {
253253
if(OpenLog.available())
254254
if(OpenLog.read() == '>') break;
255255
}
256-
}
256+
}

firmware/examples/OpenLog_Test_Sketch/OpenLog_Test_Sketch.ino renamed to firmware/Arduino_Sketches/OpenLog_Test_Sketch/OpenLog_Test_Sketch.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ void loop()
101101
delay(1000);
102102
}
103103

104-
104+
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This is a simple test sketch for OpenLog. It sends a large batch of characters to the serial port at 9600bps.
1+
This is a simple test sketch for OpenLog. It sends a large batch of characters to the serial port at 9600bps.
22
Original test was recomended by ScottH on issue #12 : http://github.com/nseidle/OpenLog/issues#issue/12

firmware/examples/OpenLog_Test_Sketch_Binary/OpenLog_Test_Sketch_Binary.ino renamed to firmware/Arduino_Sketches/OpenLog_Test_Sketch_Binary/OpenLog_Test_Sketch_Binary.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ void loop()
8888
delay(200);
8989
}
9090

91-
91+

firmware/README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
OpenLog Firmware
2-
=======
3-
4-
* OpenLog - Firmware that ships with OpenLog. '?' command will show the version loaded onto a unit.
5-
* OpenLog_Light - Used for high-speed logging. By removing the menu and command mode the receive buffer is increased.
6-
* OpenLog_Minimal - Highest speed logging. Baud rate must be set in code and uploaded. Hardest, most advanced, and best at high-speed logging.
7-
* Examples - Arduino examples for controlling and testing OpenLog
8-
* Benchmarking - Used to test OpenLog. Sends large amounts of data at 115200bps over multiple files.
9-
* CommandTest - Example of how to create and append a file via command line control.
10-
* ReadExample - Example of how to control OpenLog via command line.
11-
* ReadExample_LargeFile - Example of how to open a large file stored on OpenLog and report it over a local bluetooth connection.
12-
* Test_Sketch - Used to test OpenLog with lots of serial data.
13-
* Test_Sketch_Binary - Used to test OpenLog with binary data and escape characters.
14-
1+
OpenLog Firmware
2+
=================
3+
4+
* OpenLog - Firmware that ships with OpenLog. '?' command will show the version loaded onto a unit.
5+
* OpenLog_Light - Used for high-speed logging. By removing the menu and command mode the receive buffer is increased.
6+
* OpenLog_Minimal - Highest speed logging. Baud rate must be set in code and uploaded. Hardest, most advanced, and best at high-speed logging.
7+
* Examples - Arduino examples for controlling and testing OpenLog
8+
* Benchmarking - Used to test OpenLog. Sends large amounts of data at 115200bps over multiple files.
9+
* CommandTest - Example of how to create and append a file via command line control.
10+
* ReadExample - Example of how to control OpenLog via command line.
11+
* ReadExample_LargeFile - Example of how to open a large file stored on OpenLog and report it over a local bluetooth connection.
12+
* Test_Sketch - Used to test OpenLog with lots of serial data.
13+
* Test_Sketch_Binary - Used to test OpenLog with binary data and escape characters.
14+

0 commit comments

Comments
 (0)