Export for DEIMOS SD

This function copies the domain animations to an SD card, so that the DEIMOS board plays them on its own, without a PC. Each animation is linked to a physical button wired to the Arduino Mega: when you press the button, DEIMOS starts the matching animation.

Open it from the start window → DEIMOS menu → 📤 Export to DEIMOS SD, after selecting a domain. Press F1 in the window to open this page.

Before you start

Window fields

FieldPurpose
SD folderRoot folder of the SD card (e.g. E:\). It is detected automatically when a single compatible removable card is inserted; otherwise use Browse....
Browse...Choose the SD card folder manually. If the card already holds a MENU.TXT, its pins and indexes are loaded back into the table.
SelectTick the animations to export.
NameAnimation name, also used in the file name on the SD card.
PINArduino Mega pin wired to the button that starts the animation. If the animation has a trigger button assigned, its pin is suggested.
IndexAnimation number on the SD card, from 0 to 9. Each animation needs a different index: if two ticked animations share an index, the export is blocked with a warning.
DescriptionAnimation description, for information only.
Auto-assignAssigns pins 8, 9, 10… and indexes 0, 1, 2… in sequence to the ticked animations.
ExportWrites the files to the SD card. During the export the controls are disabled and the window cannot be closed.
CloseCloses the window.

Step by step

  1. Insert the SD card into the PC.
  2. In the start window select the domain, then open DEIMOS → 📤 Export to DEIMOS SD.
  3. Check the SD folder; if it is empty or wrong, press Browse....
  4. Tick the animations to export.
  5. Set PIN and Index for each one, or press Auto-assign.
  6. Press Export and wait for the confirmation message.
  7. Safely remove the SD card, insert it into the DEIMOS board reader and power the board up again.
Export time: each animation is run in simulation to record its commands, so the export takes as long as the animation plus about 3 seconds. The main editor opens during the export: do not close it and do not remove the SD card until the confirmation message appears.

Files written to the SD card

FileContent
<index>#-<name>.d5sThe animation commands recorded tick by tick (e.g. 0#-greeting.d5s). One file per animation. Any previous files with the same index are deleted, because DEIMOS would play the first one it finds.
MENU.TXTButton → animation mapping, one line per animation (PIN,INDEX,NAME). Lines of animations already on the card and not exported again are kept.
DEIMOS.CFGOptions of each animation (INDEX,START,LOOP,RAND_MIN,RAND_MAX): immediate or random start, continuous loop, random delay in ms. Lines of animations not exported again are kept here too.

Example of MENU.TXT:

PIN,INDEX,NAME
8,0,greeting
9,1,bow
10,2,laugh

Exported animation options

These settings are read from the animation properties and written to DEIMOS.CFG:

If a button seems not to respond, check the random start: with a long delay the animation only starts after several seconds.

Wiring the buttons

Wire each button between the pin shown in the PIN column and GND. No resistors are needed: DEIMOS enables the internal pull-up and detects a press when the pin goes low. Pins 8 to 13 are the usual choice. Pressing the button again during playback stops the animation.

How DEIMOS uses the SD card at power-up

SD card contentBehaviour
MENU.TXT presentDEIMOS waits for the buttons listed in the file. This is the mode created by this function.
Only a 0#-*.d5s file, no MENU.TXTDEIMOS immediately plays the animation with index 0.
NeitherDEIMOS waits for commands from the PC over serial.

Parametrized animations

Parametrized animations are exported like the others. The D5S file also holds the parameter source and the servos to scale, and can only be read by DEIMOS 2.0 or later. The animation is recorded in full: the editor's Parameter slider does not affect the export. With the analog pin source wire the sensor to the chosen pin; with the serial command source the external program sends fv before or during playback.

Common problems

ProblemCause and solution
The table is emptyNo domain animation uses activation mode trigger. Change it in the animation properties.
"Select an SD folder"The SD card was not detected: use Browse....
"Index N is assigned to both … and …"Two ticked animations share the same Index: change one of them or use Auto-assign.
"… uses N ports: DEIMOS supports only one"The animation uses elements on several ports. Split it into animations that use one port each.
"… has no segments" or "… does not use any port"The animation is empty, or its elements have no port assigned.
"Playback did not start"The diagnostics found problems in the animation: open it in the editor and use Diagnostics → Diagnose current animation.
"Timed out"The recording did not finish in the expected time. The incomplete file is deleted: stop any other running playback and try again.
DEIMOS does not react to the buttonsCheck that pins and wiring match MENU.TXT, that the card is FAT32 and that the firmware is 1.8 or later.
See also: Load DEIMOS firmware — Animation properties — Trigger Button — Start window