Skip to content

A quick port of the library for the Graphic Serial LCD backpack to the Particle IDE.

License

Notifications You must be signed in to change notification settings

sparkfun/SparkFun_Serial_Graphic_LCD_Particle_Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SparkFun SparkFun's Serial Graphic LCD Backpack Particle Library

Firmware library for SparkFun's Serial Graphic LCD Backpack.

About

This is a firmware library for SparkFun's Serial Graphic LCD Backpack.

SparkFun's Serial Graphic LCD Backpack.

This is the serial backpack for graphic LCDs. The SparkFun Graphic LCD Serial Backpack interfaces to either our 160x128 pixel “Huge” Graphic LCD, or the smaller 128x64 pixel display, and provides a simple serial interface to a full range of controls.

This backpack will allow you to write text, draw lines, circles and boxes, set or reset individual pixels, and erase specific blocks of the display. The backlight and baud rate can also be controlled via serial communication. There’s also a reverse mode that allows the screen to operate blue on white instead of white on blue. Additionally, all source code for the ATMega168 processor is compiled using the free WinAVR compiler and is free for downloading.

Repository Contents

  • /doc - Additional documentation for the user. These files are ignored by the IDE.
  • /firmware - Source files for the library (.cpp, .h).
  • /firmware/examples - Example sketches for the library (.cpp). Run these from the Particle IDE.
  • spark.json - General library properties for the Particel library manager.

Example Usage

Include the Serial Graphic LCD library:

#include "SparkFun_Serial_Graphic_LCD.h"

Initalize and instance of the LCD object:

//Create an instance of the LCD class named LCD. We will use this instance to call all the
//subsequent LCD functions
LCD LCD;

Here is a list of the avaialbel functions:

void printStr(char Str[78]);
void printNum(int num);
void nextLine();
void clearScreen();
void toggleReverseMode();
void toggleSplash();
void setBacklight(byte duty);
void setBaud(byte baud);
void restoreDefaultBaud();
void setX(byte posX);
void setY(byte posY);
void setHome();
void demo();
void setPixel(byte x, byte y, byte set);
void drawLine(byte x1, byte y1, byte x2, byte y2, byte set);
void drawBox(byte x1, byte y1, byte x2, byte y2, byte set);
void drawCircle(byte x, byte y, byte rad, byte set);
void eraseBlock(byte x1, byte y1, byte x2, byte y2);

Recommended Components

License Information

This product is open source!

Please review the LICENSE.md file for license information.

If you have any questions or concerns on licensing, please contact [email protected].

Distributed as-is; no warranty is given.

  • Your friends at SparkFun.

About

A quick port of the library for the Graphic Serial LCD backpack to the Particle IDE.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages