Read Text from SD Card

Forum for problems or queries regarding other Flowcode Components. Eg LEDs, Switches, LCD, Gfx LCD etc

Moderators: Benj, Mods

kunibabina
Posts: 11
Joined: Thu Sep 16, 2010 12:00 am
Contact:

Read Text from SD Card

Postby kunibabina » Mon Oct 11, 2010 10:14 pm

How to read and search text database from SD Card in FCv3&4. For example vehicle details are stored in SD Card like Engine No, Insurance details etc in rows and columns. If the vehicle arrives the scanning zone the details are automatically searched for and if insurance premium expired a buzzer is made ON. I think it might be impossible to implement in freeware versions of flowcode. But still then I want to know how to read and search the text database in SD card, Any example please ? Thanks in advance.

User avatar
Benj
Matrix Staff
Posts: 13980
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4244 times
Been thanked: 4006 times
Contact:

Re: Read Text from SD Card

Postby Benj » Fri Oct 29, 2010 3:50 pm

Hello,

This is certainly possible to implement but would probably be a fairly large project. I would start with looking at the v4 Examples pack, specifically the FAT component examples. You would then need to create some kind of parsing system that scanned through the data on the card to look for specific data structures. You would therefore need to come up with some kind of a standard.

A state machine type methology would be of help here.

Eg

is the first byte 'c' ?
...if yes then is the next byte '1'?
......if yes then we have a valid command 1.
if no then is the next byte 'c'

etc...