{"id":303,"date":"2020-06-05T11:31:03","date_gmt":"2020-06-05T15:31:03","guid":{"rendered":"http:\/\/marcduino.com\/?page_id=303"},"modified":"2024-11-12T11:02:55","modified_gmt":"2024-11-12T15:02:55","slug":"marcduino-command-reference","status":"publish","type":"page","link":"https:\/\/marcduino.com\/?page_id=303","title":{"rendered":"MarcDuino Command Reference"},"content":{"rendered":"\n<p>Updated on: May 17, 2018<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Command implementation in Firmware v1.6 Master<\/h2>\n\n\n\n<p>The MarcDuino Master board is receiving string commands on its serial Rx pin. In the normal configuration this will be connected to an &nbsp;XBee or WiFi radio, but any other source at sending serial information at 9600 bauds, 8 bits, no parity, one stop, will work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Command Format, Prefix Character<\/h2>\n\n\n\n<p>All commands are short ASCII strings.<\/p>\n\n\n\n<p>Each command must start with a prefix character and end with a carriage return (0x13).<\/p>\n\n\n\n<p>The starting prefix character must be one of the following: <strong>&nbsp;: * @ $<\/strong> !%<\/p>\n\n\n\n<p>MarcDuino Command Prefixes are briefly explained below, complete format for each prefix is detailed further down<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>:     Pie panel command<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>*     HP commands<\/code><\/pre>\n\n\n\n<p>Any * commands received by the Master are passed on to the Slave board<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@     Display commands, also passed to the MarcDuino board<\/code><\/pre>\n\n\n\n<p>Any @ commands received by the Master are passed on to the Slave board<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$     Sound commands<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>!     Custom Extension command 1.<\/code><\/pre>\n\n\n\n<p>! commands received by the Master are passed on to the Sound output (SUART2\/PC4 on MarcDuino v1, PC1\/Sound on MarcDuino v1.5 and v2), stripped of the ! prefix. This prefix allows for custom sound or special systems to be attached to the Master at 9600 bauds<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%     Custom Extension command 2. <\/code><\/pre>\n\n\n\n<p>% commands received by the Master or the Slave are output by Slave Board at 9600 bauds on the Slave Out port &nbsp;(SUART2\/PC4 on MarcDuino v1, PC0?\/Slave Out on MarcDuino v1.5 and v2) after being stripped of the % prefix. This allows for a third MarcDuino board to be attached to the slave.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;    I2C command (MarcDuino v2 firmware only)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">&nbsp;Panel commands<\/h2>\n\n\n\n<p>&nbsp;They must follow the syntax&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    :CCxx\\r<\/code><\/pre>\n\n\n\n<p>&nbsp;where CC= two ASCII characters for the command code, xx= two digit decimal number, \\r carriage return (0x13)<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">&nbsp;The following panels commands are recognized:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> :SExx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; launches sequence xx, see details below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> :OPxx <\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; open panel number xx=01-10. If xx=00, opens all panels<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OP11= open top panels<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OP12= open bottom panels<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> :CLxx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; close panel number xx=01-10, removes from RC if it was, stops servo. If xx=00, all panels, slow close.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> :RCxx <\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; places panel xx=01-10 under RC input control. If xx=00, all panels placed on RC.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> :STxx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; buzz kill\/soft hold: removes panel from RC control AND shuts servo off to eliminate buzz.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xx=00 all panels off RC servos off.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> :HDxx <\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; RC hold: removes from RC, but does not turn servo off, keeps at last position. xx=00 all panels hold.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">&nbsp;Sequences Command details&nbsp;<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE00     Close all panels (full speed), servo off - use as init only. Use CL00 for all soft close.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE01     Scream, with all panels open<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE02     Wave, one panel at a time<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE03     Fast (Smirk) back and forth wave<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE04     Wave 2 (open progressively all panels, then close one by one)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE05     Beep Cantina (with marching ants panel action)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE06     Faint\/Short Circuit<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE07     Cantina dance (orchestral, rhythmic panel dance)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE08     Leia<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE09     Disco<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE10     Quite Mode reset (panel close, stop holos, stop sounds)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE11     Full Awake Mode reset (panel close, random sound, holo movement, no holo lights)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE12     Top Panels to RC<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE13     Mid Awake Mode reset (panel close, random sound, stop holos)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE14     Awake+ Mode reset ((panel close, random sound, holo movement, lights on)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE15     Screams no panels<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> Panel Moves and light display only, no sound<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE51     Scream, with all panels open<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE52     Wave, one panel at a time<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE53     Fast (Smirk) back and forth wave<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE54     Wave 2 (open progressively all panels, then close one by one)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE55     Marching ants <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE56     Faint\/Short Circuit<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> :SE57     Rhythmic cantina panel dance<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">I2C Commands (Master and Slave MarcDuino Firmware v1.8 and up only)<\/h2>\n\n\n\n<p>I2C capability was added with the MarcDuino boards v1.5, and &nbsp;the MarcDuino boards v2. The corresponding firmware for both boards is rev 1.8. If you send a command following the format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;I2Caddress, data, data, data...<\/code><\/pre>\n\n\n\n<p>an I2C write command will be generated on all the I2C ports in the MarcDuino chain (master and all slaves). The write command will be addressed to the device at <code>I2Caddress<\/code> and will write all the data bytes provided in order.<\/p>\n\n\n\n<p>Data can be decimal numbers, hex bytes, characters or strings, depending on the prefix appended to the data, as follows.<\/p>\n\n\n\n<p>Decimals need no prefix. Valid range is -128 to 255. For example, to send command 2 (decimal) to an I2C device at address 25:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;25,2<\/code><\/pre>\n\n\n\n<p>To send an hex byte, add x as a prefix. To send the hex byte 0xFF to device 25:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;25,xFF<\/code><\/pre>\n\n\n\n<p>To send a single character, use the &#8216; prefix<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;25,'c<\/code><\/pre>\n\n\n\n<p>To send a string, use the &#8221; prefix. Don&#8217;t put another &#8221; at the end or it will be transmitted as part of the string&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;25,\"Hello World  (note: there is no second \" at the end of the string)<\/code><\/pre>\n\n\n\n<p>And of course you can mix everything:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;25,2,xFF,'c,\"Hello World<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Commands implemented in Firmware v1.5 Slave MarcDuino<\/h2>\n\n\n\n<p>The slave HP MarcDuino board receives the commands from its Rx pin at 9600 bauds, 8 bits, no parity, one stop. In the normal setup, the Rx pin is connected to the Master board ouptut, and the Slave receives all of its commands as created or forwarded by the Master.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">&nbsp;Slave valid command start characters&nbsp;<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>*  Holoprojector or Magic Panel commands. Any * commands received by the Master are simply forwarded to the Slave.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>@ display command, forwarded to Teeces controller on suart1 after stripping the '@' control character<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>: panel command, can be received but will be ignored. Normally processed by the Master and not forwarded. <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sound command, can be received but will be ignored. Normally processed by the Master and not forwarded. <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">&nbsp;HP Controller Commands recognized<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> *RDxx <\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; Random Holo movement (xx=01 to 03). If xx=00 and &gt;3 all random.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> *ONxx <\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; Turns Holo Light on (xx=01 to 03). If xx=00 or &gt;3 all lights on<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> *OFxx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; Turns Holo Lights off (xx=01 to 03). If xx=00 turns all lights off<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> *RCxx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; Holo vertical movement under RC control, horizontal centered (xx=01-03).<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp;If xx=00 or &gt;3 all RC<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> *STxx <\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; reset Holo: stops random movement, servos off, turns lights off, and RC off. 00=all off<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> *HDxx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; &nbsp;hold Holo: stops holo movement and turn servos off, but does not turn light off. 00=all stopped<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> *MOxx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; magic panel on. xx=01 to 98, on from 1 to 98 seconds. 00=off, 99=on permanently<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> *MFxx <\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; magic panel flicker xx=1 to 99 flicker for 1 to 99 seconds. 00= off.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*H1xx, *H2xx, *H3xx, and *H0xx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; Turns on-board HP1, 2, 3, and all holos (H0) for xx seconds<\/p>\n\n\n\n<p>&nbsp; &nbsp; x=99 is permanently on.<\/p>\n\n\n\n<p>&nbsp; &nbsp; x=0 turns holo off.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*F1xx, *F2xx, *F3xx, and *F0xx<\/code><\/pre>\n\n\n\n<p>&nbsp; &nbsp; Will flicker on-board HP1, 2, 3, and all for xx seconds<\/p>\n\n\n\n<p>&nbsp; &nbsp; x=0 turns holo flicker off.<\/p>\n\n\n\n<p>&nbsp; &nbsp; (x=99 turns holo flicker for 99 seconds, and not permanently)<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Dome Lights Command Reference<\/h3>\n\n\n\n<p>A MarcDuino dome light command follows the format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> @xxYzzz\\r <\/code><\/pre>\n\n\n\n<p>where xxYzzz is a JawaLite command detailed below.<\/p>\n\n\n\n<p>The JawaLite command set used to control the dome lights was <a href=\"https:\/\/sites.google.com\/s\/142GngKUvKjHHmcwleZoGS2vUSYydr4xQ\/p\/1bAarzwAx525FYXttPKU4SsBoUvK2l3z_\/edit\">originally defined<\/a> by Scott Gray for his JEDI system. I later ported JawaLite on my sketch for the Teeces system so it too could be controlled by the MarcDuino system. &nbsp;Both the original JEDI display system and the Teeces system running my sketch will work with the MarcDuino.<\/p>\n\n\n\n<p>Any arbitrary command can be sent to the Teeces via the Master or Slave by simply prefixing the command by the @ character. The command will find its way through the two boards, and will be forwarded to the attached display system with the @ is dropped. &nbsp;<\/p>\n\n\n\n<p><strong>CuriousMarc Teeces JawaLite implementation<\/strong><\/p>\n\n\n\n<p>When running <a href=\"https:\/\/sites.google.com\/s\/142GngKUvKjHHmcwleZoGS2vUSYydr4xQ\/p\/1OimrCfdGZj5RtN92CGyF4iWMeq-6EsPs\/edit\">my sketch<\/a>, the Teeces Lights respond to JawaLite commands, sent via serial at 2400 bauds (rate chosen for compatibility with the JEDI display). Most JawaLite commands found on the original JEDI display are implemented, completed by a few CuriousMarc&#8217;s Teeces commands that adds more functionality.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>General JawaLite command format: xxYzzz<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>where xx= address (one or two chars), Y=command letter, zzz=optional argument<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>xx address field is interpreted as follows:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0 - global address, all displays that support the command are set<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>1 - TFLD (Top Front Logic Dislay)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>2 - BFLD (Bottom Front Logic Display)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>3 - RLD  (Rear Logic Display)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>4 - Front PSI<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>5 - Rear PSI<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>6 - Front Holo (not implemented here)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>7 - Rear Holo  (not implemented here)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>8 - Top Holo   (not implemented here)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Implemented commands (indicated durations are the sketch defaults, they are adjustable, see below):<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Command T<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-5T0      - test (switches all logics to on)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-5T1      - display to normal random<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0T2        - flash, same as alarm<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0T3        - alarm for 4 seconds (flashes displays on and off)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0T4        - short circuit (10 seconds sequence)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0T5        - scream, same as alarm<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0T6        - leia, 34 seconds (moving horizontal bar)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0T10       - Star Wars. Displays \"Star Wars\" on RLD, \"STARS\" on TFLD, \"WARS\" on BFLD<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0T11       - March (alternating halfs of logics, 47 seconds)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-3T92     - spectrum, bargraph displays. Runs forever, reset by calling to 0T1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-3T100    - Text displays. Displays text set by the M command below<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>6T1, 7T1, 8T1  - holos on:  not implemented, HP lights directly controlled by MarcDuino Slave.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0D, 6D, 7D, 8D - holos off: not implemented, HP lights directly controlled by MarcDuino Slave.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Command xMmessage, set message for the text. <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>x=0: all logics, 1: TFLD, 2: BFLD, 3: RLD<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>message: ASCII string to be displayed. Only uppercase implemented.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Command P, character set<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-3P61    - swtich display to aurabesh characters<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-3P60    - switch display to latin (e.g.english) characters<\/code><\/pre>\n\n\n\n<p>Extended &#8220;CuriousMarc Teeces&#8221; only commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Extra command T to turn displays off<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-5T20<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Command R, adjusts random style:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0-3Rx where x=0 to 6.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Command S, PSI state<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0,4-5S0  - PSI all on (same as 4-5T0)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0,4-5S1  - PSI normal mode (same as 4-5T1)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0,4-5S2  - PSI first color<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0,4-5S3  - PSI second color<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0,4-5S4  - PSI off<\/code><\/pre>\n\n\n\n<p><strong>Scott Gray&#8217;s JawaLite implementation<\/strong><\/p>\n\n\n\n<p>For reference only, the original JawaLite as implemented in the JEDI system can be found <a href=\"https:\/\/sites.google.com\/s\/142GngKUvKjHHmcwleZoGS2vUSYydr4xQ\/p\/1bAarzwAx525FYXttPKU4SsBoUvK2l3z_\/edit\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Sound commands (CF-III or MP3Trigger sound systems)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Sound files organization&nbsp;<\/h3>\n\n\n\n<p>The sounds are organized in banks of similar sounds. A sound is accessed programmatically by its bank number and its number within the bank, not by its file name on the memory card. The actual file name of the sound depends on the particular implementation of the sound subsystem. At present, the R2 Touch\/MarcDuino supports two sound systems, the <a href=\"https:\/\/marcduino.com\/?page_id=210\" data-type=\"page\" data-id=\"210\">CF-III sound system<\/a> and the <a href=\"https:\/\/marcduino.com\/?page_id=117\" data-type=\"page\" data-id=\"117\">MP3Trigger board<\/a>.\u00a0<\/p>\n\n\n\n<p>My original CFIII sound implementation uses the following naming convention for the sound files on the memory card:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CF-III sound file naming convention:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 1, generic sounds, files named: gen-x.wav, where x is the number of the sound (1 to 99)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 2, chatty sounds: chat-x.wav<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 3, happy sounds: happy-x.wav<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 4, sad sounds: sad-x.wav<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 5, whistle sounds: whis-x.wav<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 6, scream sounds: screa-x.wav<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 7, Leia sounds: leia-x.wav<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 8, musical sounds: mus-x.wav<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 9, user sounds: user-x.wav (not used by R2 Touch, but accessible grammatically or through the CF-III contacts)<\/code><\/pre>\n\n\n\n<p>The later MP3Trigger sound implementation uses a numbering convention for sound files, and is limited to 25 sounds per bank. The suffix of the file (-xxx) can be anything. There is no bank 9.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MP3 Trigger sound file naming convention:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 1, generic sounds, files named 001-xxx.mp3 to 025-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 2, chatty sounds: 026-xxx.mp3 to 050-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 3, happy sounds: 051-xxx.mp3 to 075-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 4, sad sounds: 076-xxx.mp3 to 100-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 5, whistle sounds: 101-xxx.mp3 to 125-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 6, scream sounds:126-xxx.mp3 to 150-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 7, Leia sounds:151-xxx.mp3 to 175-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Bank 8, musical sounds:176-xxx.mp3 to 200-xxx.mp3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Startup Sound: 255-xxx.mp3 <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Sound Command format&nbsp;<\/h3>\n\n\n\n<p>Sound commands sent to the MarcDuino must follow the format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$soundcommand\\r <\/code><\/pre>\n\n\n\n<p>In the Master firmware targeting the CF-III sound system, the string command is simply forwarded as is to the CF-III sound unit after stripping the beginning $. Sound command &nbsp;processing, including random sound generation, is done by the procesor in the CF-III unit itself, which executes a program residing on its memory card.<\/p>\n\n\n\n<p>In the Master firmware targeting MP3Trigger system, the MarcDuino processes the command, and sends play commands to the MP3Trigger. All sound command deciphering and processing, including random sound generation, is handled by the MarcDuino firmware.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Sound Commands Reference<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$x <\/code><\/pre>\n\n\n\n<p>If x is between 1 and 4: &nbsp; &nbsp;<\/p>\n\n\n\n<p>&nbsp; &nbsp; Play next sound from bank x<\/p>\n\n\n\n<p>If x is between 5 and 9:<\/p>\n\n\n\n<p>&nbsp; &nbsp; Play first sound from bank x. Bank 9 not implemented on MP3Trigger platforms.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$xy or $xyy <\/code><\/pre>\n\n\n\n<p>Play sound y or yy from bank x (x from 1 to 9, y from 1 to 9, yy from 10 to 99). MP3Trigger platform implements sounds only up to yy=25.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$R    <\/code><\/pre>\n\n\n\n<p>Start playing sounds randomly chosen from banks 1 to 5, at random intervals<\/p>\n\n\n\n<p>(no sounds from banks 6-9 will be played in random mode)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$O       <\/code><\/pre>\n\n\n\n<p>(capital letter O) Random Off<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$s    <\/code><\/pre>\n\n\n\n<p>Stop any current playing sound, and cancel random mode.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$-    <\/code><\/pre>\n\n\n\n<p>Volume down<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$+      <\/code><\/pre>\n\n\n\n<p>Volume up<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$m   <\/code><\/pre>\n\n\n\n<p>Volume mid<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$f       <\/code><\/pre>\n\n\n\n<p>Volume max<\/p>\n\n\n\n<p>Some particular sounds have been given their own command for convenience. They point to specific files numbers, and you can only change their assignment by editing the code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$S    <\/code><\/pre>\n\n\n\n<p>Scream (bank 6 sound 1)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$F       <\/code><\/pre>\n\n\n\n<p>Faint\/short circuit (bank 6 sound 3)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$L    <\/code><\/pre>\n\n\n\n<p>Leia message (bank 7 sound 1)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$c    <\/code><\/pre>\n\n\n\n<p>Short Cantina music (bank 8 sound 1)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$W    <\/code><\/pre>\n\n\n\n<p>Star Wars (bank 8 sound 2)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$M    <\/code><\/pre>\n\n\n\n<p>Imperial March (bank 8 sound 3)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$C    <\/code><\/pre>\n\n\n\n<p>Long Cantina music (bank 8 sound 5)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$D    <\/code><\/pre>\n\n\n\n<p>Disco Star Wars music (bank 8 sound 6)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Updated on: May 17, 2018 Command implementation in Firmware v1.6 Master The MarcDuino Master board is receiving string commands on its serial Rx pin. In the normal configuration this will &hellip; <a href=\"https:\/\/marcduino.com\/?page_id=303\" class=\"more-link\"><span>Continue reading<span class=\"screen-reader-text\">MarcDuino Command Reference<\/span><\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-303","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/marcduino.com\/index.php?rest_route=\/wp\/v2\/pages\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marcduino.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/marcduino.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/marcduino.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/marcduino.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=303"}],"version-history":[{"count":3,"href":"https:\/\/marcduino.com\/index.php?rest_route=\/wp\/v2\/pages\/303\/revisions"}],"predecessor-version":[{"id":643,"href":"https:\/\/marcduino.com\/index.php?rest_route=\/wp\/v2\/pages\/303\/revisions\/643"}],"wp:attachment":[{"href":"https:\/\/marcduino.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}