Definitions:
Select Bits: A data byte consists of 8 bits. Bits 0 thru bit 7. The bits that are set high are used to set outputs/drives to be controlled by the command
The most typicl commands are CMD1 thru CMD9 are used to control the RGB Drivess: These are 5 byte commands (CMD#, select bits, brightness, fade, 204)
Brightness: Range is 0 - 255 (decimal). 0 = Off, 255 = Maximum Brightness (full on)
Fade: Range is 0-255: Fade is 'milliseconds' to change to the next brightness level. So if changing from 0 brightness to 255 brightness and fade = 10, then it takes 2,550 milliseconds to change because changing from brightness of 0 to 255. Changing from Brightness of 128 to 255 takes 1,255 milliseconds and so on. Fade = 0 is instant change to the Brightness.
Verify Byte: 204 is used as the verify byte so that in the event that 'strings' are sent instead of using the 'send bytes comma separated' command from BrightAuthor the string will be ignored because it did not meet the command structure requirement of the 204 byte
Note: All commands are listed and do not apply to all boards. I.E. if a board does not have an I/O terminal block, then CMD1 will be ignored. If a board only has 1 set or RBG drives, then command for those outputs will be ignored
Output Commands:
CMD1 [01, select bits, Brightness, Fade, 204] (5 bytes). Sets Drives (PWM Outputs 1 to 3) by Bit Selection.
CMD9 (GLOBAL: SET ALL SELECTED DRIVES) [9,SELECT BITS,BRIGHTNESS,FADE,204] I.E. If drive 1 bit selection, then each 'drive 1' of each set of drives is controlled by this command. This is intended for boards with multiple RGB drives. Very useful if the drives are all connected to the same colors and this one command will set all available drive 'sets' by bit selection. I.E. if 4 drive sets, then setting bit 0 of select bits (drive 1) will set drive 1 of TB2, drive 4 of TB3, drive 7 of TB4 and drive 10 of TB5
About Scenes:
Each scene is mapped to a 256 byte 'page' of non-volatile-memory. The scene can just control outputs (PWM Drives or Outputs) or the scene can 'gosub' or 'goto' another scene. Scenes can overlap a page. The pointer used during scenes will just advance to the next page if zeroes are retrieved when 'looking' for the next command. The number of scenes is dependent on the processor used. If you need more scenes than the 'standard' number of scenes for a particular microprocessor, contact HMS Electronics for 'custom options'. During 'Play' all commands are expected to do with outputs or PWM drives.
Scene Structure (Playing a Scene): Note: 'skip pause' if Minutes = 254.
CMD (1 to 9): [CMD#, Select Bits, Brightness, Fade, Minutes,
Seconds, 10 Milliseconds] (7 bytes) or 5 bytes if skip pause.
Note the Brackets are not part of the send bytes command from BrightAuthor!
CMD10: (setting I/O's) = [10,select bits, on/off, Minutes, Seconds, 10 Milliseconds] (6 bytes). or 4 bytes if skip pause.
Scene Commands:
Play Scene
Erase Scene: [xxx,204
Say Scene: xxx,204
Record Scene: xxx,204
Cancel Play xxx.204
Tokens (special bytes) that are used in scenes
Gosub Scene = 253, number of repeats
Goto Scene = 251, number of repeats
End Scene = 252 (if repeats was > 0, then the scene is repeated. When repeats are done, then the scene that did the 'Gosub' is
End Play = 254
Scene Play Structure:
Scenes can be commanded from the 'Play Scene' command or selected from the I/O's.
The 'Play Scene Command issued from BrightAuthor is: CMD xx, scene#, repeats.
Manual Play (Scenes commanded from the input terminal block (TB1 mode = 2 or 3)
Miscellaneous Commands:
Set TB1 Mode
Say Version
Say Goals
Link: Scene Programmer (Runs on Windows machines and provides a 256 byte 'page' for programming scenes in decimal bytes
Author: Richard Harkey
Revised: August 27, 2024