SD card Tree architecture

SD card file system.

Netduino Plus 2 should natively support both FAT and FAT32 File systems.
It does not support NTFS file system.

Overall SD card architecture:

At the end the SD card tree should look like this:
Sequences\
Sequences\sequence1.txt
Sequences\sequence2.txt
Sequences\sequence3.txt
etc....
zapper.ini
forbidden_frequencies.txt

Settings architecture.

On the root folder of your SD card you should have 2 files:
  • "zapper.ini": Main settings of OpenZapper
  • "forbidden_frequencies.txt": contains the list of each forbidden frequencies.

zapper.ini

contains something like this:
//Sequence synthax should be:
//SEQUENCE_NAME
//FEQUENCY|PeriodRatioIn%|DurationInSeconds
//active duration is 7 minutes (420 seconds)
ActiveDuration=420
//pause duration is 20 minutes (1200 seconds)
PauseDuration=1200
//amount of cycles to perform
CyclesToDo=3
//frequency of the beep (frequency in Hz)
BeepFrequency=10000
END
  • ActiveDuration: correspond to the duration of the active period. During this time the PWM output will be active and a signal will be present on the output of the board.
  • PauseDuration: correspond to the period where the PWM output will be idle (no signal).
This pause duration is active after each Active Period.

*CylesToDo: A cycle is a Sequence of Active and Pause period.
The basic cycles from Dr Clark where 7/20 3 times: 7 minute active, 20 minutes pause.
Here the default settings are set on this cycles.

The BeepFrequency is not used as it requires a piezo electric component on the board. (not present now)

forbidden_frequencies.txt

contains a list of frequencies that the device will remove when loading any Sequence.
The frequencies must be written 1 per line.
Forbidden frequencies must be integers (no float values)

Sequences folder

  • This folder contains a list of files containing all specific frequencies.
  • The names of each files doesn't matter.
  • The extension of each valid files MUST be "*.txt"
  • The amount of supported files is Unknown right now. (depends on the Netduino plus 2 ram memory.
  • The length of the name of each file is not important. Only 15 characters will be displayed on the LCD (1 char is reserved for the "*" character)

Sequence file format

The file format of each sequence file must contain the following:
  • The first line must be either: "Random" or "Sequential"
    • Random means that the frequencies will be taken randomly
    • Sequential means that the frequencies will be applied sequentially.
  • each following lines must follow this format:
    • *FREQUENCY|DUTY CYCLE IN PERCENT|DURATION IN SECONDS
NOTE: the frequency value must be an integer, float values are not supported;
  • at the end of each line you must go to the next line, leaving the last line empty.

A file should look like this:
Random
727|50|60
784|50|60
787|50|60
800|50|60
880|50|60

the first line says that the frequencies will be used randomly
the second line means: frequency 727 hz is applies with a duty cycle of 50% (0.5) during a period of 60 seconds
etc...





Last edited Jul 27, 2013 at 4:41 PM by Nutz95, version 2

Comments

No comments yet.