Free C++ code for 635 in Linux... lots of sweet stuff

keckstar

New member
If anyone is interested, after I clean up my code tonight, I will release my c++ code I've been writing the last week full of functions you can use/rewrite/whatever. I did not want to bother with other people's software, so I wrote my own.

I used VI (of course :D ) and just basically wiped out the test635.c that came with the linux source from this site and have been building by just running 'make' since my code depends on functions in the source CrystalFontz wrote.

Here are some of the functions:
sendString - sends a string of characters to the LCD at any location
sendSpecial - sends a special character from the GCROM to the LCD at any location
waitForKey - will wait for a keypress. It has a screen saver (currently set at 4.5 minutes) to sleep the screen if no keypress is encountered. Of course it will wake back up after any key is pressed.
setLED - can control any LED to make it any of 4 colors (red, green, orange, yellow)
setContrast - sets how bright the display is
flashScreen - will flash the screen a certain amount of times (good for getting attention)
clearScreen, clearRow, clearColumn - clears either the whole screen, a row, or a column
setGCROM - really just shows how to send data to GCROM to make your own little graphics

The code is very clean, commented well, and very modular, so you will be able to follow my examples and use the functions very easily to get the most from your CrystalFontz product in Linux.

OK so later on I will post it and feel free to expand the code and use it however you want. No strings attached.

Thanks to CrystalFontz for a great product.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

igor512

New member
Thanks a bunch! This is going to make things a LOT easier for me. :D

I don't suppose you have any thoughts on using the code you've developed with LCD4Linux? Either taking code from the plugins they have, or trying to make a 635 plugin for it. I'm not THAT experienced as a C developer, so I'm finding the plugin code for it a little hard to follow.
 
Top