Skip to content

User Methods

Christopher Lindsay edited this page Dec 19, 2018 · 3 revisions

User Functions:

Mega_Nodesign();

Constructor - This function prepares the Arduino Mega port registers and sets working and use_Guard to false. User must call begin before using the sign methods.


void begin();

This must be called before using any other sign methods. There is currently no code to prevent calling other methods before begin, basically they just won't work, so just don't do it. Enables power to the lightstrings. Enumerates the IDs for the lights on all the strings. The frame buffers are filled with ID values. The logo is loaded and sent to the sign. After a delay of 5 seconds the frame buffers are cleared to BLACK. It is up to the user code to update the sign, this keeps the logo displayed until real content is ready.


void stop();

Disables power to the lightstrings. After this is called nothing will be displayed on the sign.


void Send_Picture();

This function must be called whenever the user desires to update the display. Please note this function disables all interrupts while performing the update. So micros() and millis() will not be updated during execution of this function. Takes ~16ms to execute.


void Set_Guard(bool yes_no);

The guard sends an ‘s’ before updating the light strings with Send_Picture and an ‘d’ once complete.


bool Get_Working();

Returns true if stop() has not been called.


void Set_Pixel(row, col, high_bright, color);

This function changes a color value in the frame buffer. Row is 1<>24. Col is 1<>48. Bright is not currently implemented so any byte value will do. Color is any value like a Color Constant.


void Clear_Screen();

This function changes all the color values in the frame buffer to BLACK


void Load_Logo();

This function updates the frame buffer with a copy of the Baltimore Node logo that is stored in the EEPROM. Please note that the right most 22 columns are not changed by this function.


void Put_Char(int row, int col, char letter, unsigned int color);

Puts a 5x8 pixel font image of color into the frame buffer based on the 3 row by 8 column font of letter. The background of the text is BLACK.


void Put_String(int row, int col, char[] text, int len, unsigned int color);

Puts a series of 5x8 pixel font images of color into the frame buffer. There is a 1 column space between each letter in the string. Supports C’ish style string, there is no NULL character termination in text, so len is only the number of characters.

Clone this wiki locally