![Global Specialties RP6-M256 Скачать руководство пользователя страница 36](http://html1.mh-extra.com/html/global-specialties/rp6-m256/rp6-m256_instruction-manual_2233250036.webp)
RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library
4.1.9. MicroSD card
The microSD card can be controlled via an additional library that can be found in the
RP6M256Lib directory. This library offers many functions to access partition and
FAT16/32 file systems.
The library contains detailed documentation in HTML format in the directory:
RP6Lib/RP6control_M256_WIFI/sdc/doc/html/
The usage is briefly demonstrated in the example programs. Example program 4
shows how general information about the microSD card can be retrieved and how a
file can be read.
In example 14, sensor data gets logged once every second into a file. The web server
code in example 13 allows to retrieve the contents of the log file via a web browser.
CAUTON:
The microSD card slot is NOT intended for changing cards
during operation! It might work but we can't guarantee for
anything!
In general there is no warranty for any data losses! It is
highly recommended to use an empty card.
Tip:
It might happen that the file system / partition table on the card gets
damaged when a program error occurs or power off/reset happens
while data is written to the card. It might be necessary to reformat the
card e.g. with the Linux tool mkfs.vfat. In Windows Explorer, right click
on the (correct) data storage device and select “Format...”. In the
worst case it might be necessary to set up a new partition table on the
card e.g. under Linux via fdisk or under Windows via the disk manager.
Of course all data on the card gets lost.
It is advisable to add a function to your own program which stops the
writing process safely e.g. if one of the buttons is pressed, a specific
command is sent or the battery voltage falls below a certain threshold.
You should then always trigger this prior to turning the robot off.
This is a normal restriction for data storage devices with file a system.
A PC could also damage the file system if you pull out the card during
operation. Alternatively you can work in raw data mode on the AVR,
this means without any file system at all. However then you can't use
the card easily with your PC anymore...
- 36 -