Hi all, I'm making a temperature data logger with a VDIP1 module. I got it working last night with a set phrase, but now I'm reading an LM35 and trying to store that. Here's the code:
I've got a VDIP2 and think it flashes like that when its searching for a device.
Have you tried your original code since to see if that works? only ask as I recall from one of the writeups on a datalogger that the author confessed to wrecking a few memory sticks if the file was not explicitly closed after writing??
As to the 'int/float' I have had issues trying to send values via serial and have had to turn into a 'string' first.
Okay, I've tried various approaches to it. For a while I couldn't get it to recognize any of three flash drives, but now it's working better. LED 2 lights up, which the data sheet says means the USB disk is ready. Good, right? yes. However, it doesn't flash when I send data through. I made it stop sending after ten logs just because I was afraid I was taking the flash drive out while the file was still open, which might be bad.
Also, I don't think a carriage return is necessary after printing the data, so I took that out and adjusted the noOfChars accordingly. For testing purposes it won't get above 99, so I just made it 5 (eg 77.00).
My flash drive is readable and fine, but no file is created. The datasheet says that a file will be created if you try to open a nonexistent file, and it's worked in the past.
I tried it with the old code too, and no flashing or file. Also, when I pull the flash drive out of the VDIP1, it still says the USB drive is ready. The second LED stays lit.
I'm still a noob at data types etc. and Arduino so come back to me if I'm wrong but an integer is 2 bytes??? and 'long' is 4. If your telling it 5 but only 2 are being transferred then is it just hanging waiting for the rest???
hmm. you're right, I just checked in the reference section. With WRF are you specifying the number of characters or the number of bytes to be written?
I'm thinking it could be related to no handshaking. I think I'm going to add some delays when I get home tonight just to be safe. Also, I was worried that the VDIP1 was still running or something so I put the SUD in to put it to sleep. However, I'm thinking it might be better to have it after the log is closed rather than before anything else. It might not make a difference, but oh well.