Skip to content

zarpli/BrightSign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrightSign

BrightSign media players with a serial port can send and receive commands over serial using a custom script.

This Arduino Library is for use with BSuControl Script

Installation & Download

Download the latest version here and put the "BrightSign" folder in your "libraries" folder.

Basic Usage

BrightSign BS(Serial1)

Instantiate a BrightSign object and attach to Serial1, You may create multiple BrightSign objects.

BS.update()

Read the BrightSign and update its status. This update() function must be called regularly.

BS.debug()  

Enable debug messages on serial port :

Debug Messages Description
BS : error The last command was not executed correctly
BS : ok The last command was successful
BS : online The unit starts up and has the script installed
BS : media_ended A file has finished playing
BS.play("MEDIA/FILE.MOV")

Play media file called "file.mov" in "media" directory.

When media file is a video the PLAY command stops on the last frame.

The filename and path is used in uppercase as this is how brightsign handles files internally.

BS.loop("AlwaysLoop")

Enable loop mode seamlessly if possible. If the video file cannot be looped seamlessly, then the video will loop with seams.

BS.volume(INT)

Set the volume to INT percent of normal.

BS.stop()

Stop the currently playing media and clears the screen.

BS.pause()

Pause the currently playing media.

BS.resume()

Resume the currently paused media.

BS.reboot()

Restarts the unit.

boolean BS.online()

return TRUE when the unit starts up and has the script installed.

boolean BS.media_ended()

return TRUE when a media file has finished playing.

boolean BS.error()

return TRUE when the last command was not executed correctly.

Loop Example

Simple example of the BrightSign library that play a media file "demo.mov" locate in "video" directory, and wait for it to finish to run again.

The BSuControl Script must be installed in the BrightSign unit memory unit and must be connected to the Serial1 port of the arduino board.

#include <BrightSign.h>

// Instantiate a BrightSign object and Attach to Serial1
BrightSign BS(Serial1);   

void setup(){

// Enable debug msg over Serial
BS.debug();               

Serial.begin(9600);
while(!Serial);

Serial.println("Waiting BrightSign Power-Up");
while(!BS.online())BS.update(); 

//Set Volume to 20%
BS.volume(20);            
}

void loop(){
// Update the BrightSign instance
BS.update();
if(BS.media_ended()) BS.play("VIDEO/DEMO.MOV");
}

Media Files for Testing

Media

YouTube

YouTube

About

Arduino Library for BSuControl Script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages