6 x 7 segment display library for PCA9637 driven breakout board

Dependents:   FTSE100 InternetDispBoB digitalThermometer Counter ... more

Files at this revision

API Documentation at this revision

Comitter:
d_worrall
Date:
Mon Jul 04 08:42:21 2011 +0000
Parent:
12:2235c72db927
Child:
14:10570d97f4d3
Commit message:
version8

Changed in this revision

dispBoB.cpp Show annotated file Show diff for this revision Revisions of this file
dispBoB.h Show annotated file Show diff for this revision Revisions of this file
--- a/dispBoB.cpp	Fri Jul 01 16:28:56 2011 +0000
+++ b/dispBoB.cpp	Mon Jul 04 08:42:21 2011 +0000
@@ -124,6 +124,12 @@
     _pca.bus(leds);
 }
 
+void dispBoB::brightness(char value){
+    for(int i = 0; i < 3; i++){
+        _pca.setAddress(loc[i]);
+        _pca.brightness(0xFF, value);
+    }
+}
 
 
 
@@ -131,3 +137,4 @@
 
 
 
+
--- a/dispBoB.h	Fri Jul 01 16:28:56 2011 +0000
+++ b/dispBoB.h	Mon Jul 04 08:42:21 2011 +0000
@@ -65,6 +65,11 @@
     * @param leds Set output according to parameter value - e.g. 0x0003 >> p0 & p1 high, rest low 
     */
     void bus(short leds);
+    /** Define LED brightness
+    *
+    * @param value Brightness of LED, 0x00 < value < 0xFF
+    */
+    void brightness(char value);
     
 #if DOXYGEN_ONLY
     /** Write a character to the display