Menu

FileReader

MeduZaPaT

FileReader

This actor will read a file with animation data.
This actor only have six parameters: speed, direction, filename, format

  • **speed:** The speed the frames will be displayed.
  • **direction:** The direction the animation will move.
  • **format:** The file format, right now only one format is supported:
    • **RGBA** A very simple XML file format to display LED information used by other programs.
  • **filename:** the full path to where the file is located.

Example

    <actor
        type="FileReader"
        group="All"
        filter="Combine"
        direction="Forward"
        speed="Normal"
        filename="/home/pi/rgba/filename.rgba"
        format="rgba"
    />

The RGBA files will store RGB information in groups of three values from 0 to 255 per element, that means that if your system have six RGB or SINGLE color LEDs you need 6×3=18 values.
Every element will be assigned in the same order it appears on their group.
Every frame will be inside the anim tag and will be called frm, any other type element with different name will be ignored.
Also, every frame will have a dec="" with a comma separated values.
This is an example file, let's call it example.rgba:

<anim>
    <frm dec="255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"/>
    <frm dec="0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"/>
    <frm dec="0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,"/>
    <frm dec="0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,"/>
    <frm dec="0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,"/>
    <frm dec="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,"/>
</anim>

Related

Wiki: Animations

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.