Hi
Once a SD card is set up and a data logging file created (rfid tag reads), once a USB HID device is attached via usb (via USB board attached) to the Arduino, keep in mind the output from the attached HID device is already in format for a text file. So when a tag is detected and the rfid device sends it data, should that data go automatically into the open focused SD card file ?
Thanks
Charles
No. You will have to write the code that stores the text from the RFID reader to the file on the SD card.
Thanks for your post. The ouput from the usb has already been changed to hid format, text. Should that go straight into the open file. Just as it does for going straight into a spreadsheet?
Might be trying to be too easy!
Charles
in pseudo code, it could look something like this
if new tag detected
{
newTag = .... [e.g. "1234"]
if file is not open
{
open file
if open file failed, stop
}
sd.print(newTag)
}
You need to decide when you want to close the file.
If you show your current code, it might be easier to advice where you need to put the store functionality.
Thanks sterretje.
Looks good. I am assembling hardware and looking at code at the moment. I will get back sometime to you, might be a few weeks though. I am not a fast mover. 80 yo.
Looking at one of these with adapted code etc.
http://kaptery.com/files/documents/nanodataloggerguide.pdf
Thanks
Charles
You will need a good SD adapter. Some cheap ones don't release the MISO pin when they are not selected and this can interfere with anything else that uses the SPI bus; in your case I think that that will be USB host shield (if I understand your project correctly).
If you want to play it safe, this is one: MicroSD card breakout board+ : ID 254 : Adafruit Industries, Unique & fun DIY electronics and kits