SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By tasha
#116712
I'm using Arduino Duemilanove board and openLog. On the product description it says that it's as simple as plug it in and it will log anything that's send to the serial.. But it does nothing for me when I run this simple code below. The card is completely empty. What exactly is needed to be done in order to get this thing to work? Looking through a lot of different forums a lot of people seem to have problems and any of their solutions wont work for me..


Code: Select all
#include <NewSoftSerial.h>

NewSoftSerial mySerial =  NewSoftSerial(1, 0);

void setup() {
  Serial.begin(9600);  
  mySerial.begin(9600);  
	 // Openlog RXI pin -> Ard 3, Openlog TXO -> Ard 2
}

void loop() {
  Serial.println("This is a test line of text.");
  mySerial.println("This is a test line of text.");
  delay(5000);    // wait 5 seconds
} 
By follower
#116719
tasha wrote:
Code: Select all
NewSoftSerial mySerial =  NewSoftSerial(1, 0);

...
	 // Openlog RXI pin -> Ard 3, Openlog TXO -> Ard 2
The arguments to the NewSoftSerial constructor should match your comments. At the moment you're asking the Arduino to perform software serial on the hardware serial pins.

--Philip;
By follower
#116744
You have the OpenLog board connected to the hardware serial pins 0 and 1? If that's the case, I don't understand why you have included NewSoftSerial in your test?

Have you tried swapping the RX/TX pins connected in case they are backwards?

--Philip;
By tasha
#116799
According to the datasheet the RX pin on openLog goes to TX pin on the arduino. As far as the NewSoftSerial, it's just one of the examples that I've tried, from searching online I noticed that's what they used. But from running a very simple sketch not using newsoftserial still nothing happens. From my understanding it should log everything that is send to the Serial monitor..
By coyote20000
#116852
You can try this.
If you don't have an ftdi basic and you are running Windows,
Remove the atmega from the arduino.
Connect arduino Gnd to OpenLog and OpenLog (RXI) to Gnd
Plug arduino into Usb as usual.
With MicroSd card installed, connect arduino 5v to OpenLog and wait 10 seconds. (Resets OpenLog to default)
Disconnect 5v.

Now,
Connect 5v, Gnd, Rx (pin0) and Tx (pin1) to OpenLog.
Arduino Pin 0 (RX) to OpenLog (TXO) (Don't forget, the chip needs to be removed)
Arduino Pin 1 (TX) to OpenLog (RXI)

With Usb connected to arduino, and OpenLog connected to arduino, open HyperTerminal and set the connection to the port in which the arduino was assigned to. Set baud (Bits per second) = 9600, Data bits = 8, no parity, One stop bit, Flow control = none.

Type a few characters to get sync'd and hit (CTRL Z) three times quickly. You should get a prompt. Something like "12>" or "12<" It might be missing the '1', I don't remember. Enter a '?' and enter. The menu should display.
If you get this far, it's probably working now, it probably needed a reset.
If it's not working then I would say you will probably need exchange it for a non-defective unit.

If you got the menu, then you can read the log file via the terminal 'read <filename>' (Get a directory listing with 'ls').
OR, just pull the microsd, and put it in a reader and open the file of the pc.

Hopefully I didn't miss anything, kinda going by memory.

You can do the exact same thing with an FTDI basic without using an aduino.

Good luck.
Dave

EDIT: Also, format the SD card via windows (or whatever OS flavor you like, FAT16). If you have a large sd card (SDHC) > 2G, you will probably need to flash version 2 firmware into OpenLog for it to work (Sorry, I only use 2G cards, so I haven't tested the big ones, YET! :D ).
By tasha
#116875
Thanks coyote for going into the detail.. quick question though, hyperterminal -- never really used it, I have windows7 and don't think I have it. Is it something that I download?
By coyote20000
#116908
Tasha,
http://helpdeskgeek.com/windows-7/windo ... rterminal/
Sorry, I don't have windows 7 or Vista. Work still uses Xp in my building.
The link above tells you how to copy hyperterminal if you have a copy of Xp. If that is a problem I would try Putty. I've never used it, but I've seen quite a few people telling others to use it.

Let me know if you get the OpenLog to work. I'm curious if the reset solved the problem.

Dave
By CMStrawn
#116977
Thanks for the help Coyote. (I'm with tasha.)

We tried what you said and nothing comes up in the hyperterminal window. All our openlogger does is have a solid blue light on all the time with the green light flickering quickly.

Also reading the data sheet on it I don't think it is resetting. I hook up the rx to gnd and power it up and it acts as it always does. But the data sheet says it should have it's lights blink back and forth for a second or two.
By coyote20000
#117030
If you try another microsd card and it still doesn't work then contact tech support. In my opinion it's a dead module.

Dave
By alzirogodoyneto
#117057
Hello,

I've just bought an OpenLog and it is working fine here. But I have one question about ASCII characters:

How can I send an "ENTER" to the OpenLog ?

I've tried: uart_puts("\n") but the text doesn't move one line down.

Anyone know how to do this ?

Thanks !
By alzirogodoyneto
#117074
No, it'a an Atmega644 @ 8MHz sampling one LM35 every 3 minutes to measure the room temperature. Just a test to see if the OpenLog is working.

I think that I solved the problem. I'm using a library from Peter Fleury to interface with UART but the library only allow me to send chars and not an int. This way, if I write uart_puts(13) the compiler returns an error but if the code were uart_puts("13") I'm only going to send the ascii values of 1 and 3.

I solved the problem by writing a new function:

void uart_sendint(unsigned int data){

while ( !( UCSR0A & (1<<UDRE0)) ){};
UDR0 = data;

}

This function allows me to send any int value that I want through the UART, therefore, now I can send the value of the chars from the ascii table that doesn't have a character representation.

Please, correct me if I'm wrong !! Sorry for the bad english.
By CMStrawn
#118188
Just to finish this topic off...the openlog was bad. Received a new one and it works perfectly.