This is a driver library for the popular QDSP-6064 bubble display. These miniature displays can be leveraged for small breadboard projects in order to display debug information or even in larger projects where LCD displays are unpractical.

Dependents:   QDSP-6064-hello

Fork of BubbleDisplay by Michael Dushkoff

Files at this revision

API Documentation at this revision

Comitter:
MACRUM
Date:
Tue Mar 29 07:51:47 2016 +0000
Parent:
2:3604f34e944b
Commit message:
Add a write(uint16_t) method

Changed in this revision

bubble.cpp Show annotated file Show diff for this revision Revisions of this file
bubble.h Show annotated file Show diff for this revision Revisions of this file
diff -r 3604f34e944b -r 1d85399fdea3 bubble.cpp
--- a/bubble.cpp	Thu Mar 26 08:10:08 2015 +0000
+++ b/bubble.cpp	Tue Mar 29 07:51:47 2016 +0000
@@ -44,7 +44,9 @@
  * maps the pins in a simple way for the LPC11U24.
  */ 
 BubbleDisplay::BubbleDisplay(){
+#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24)
     init(p21,p22,p23,p24,p25,p26,p36,p35,p34,p33,p30,p29);
+#endif
 }
 
 /*
@@ -158,4 +160,16 @@
     _chrs[1] = c[1];
     _chrs[2] = c[2];
     _chrs[3] = c[3];
-}
\ No newline at end of file
+}
+
+/*
+ * This writes a sequence of integer number
+ * to the seven-segment displays.
+ */
+void BubbleDisplay::write(uint16_t num){
+    num %= 10000;
+    _chrs[0] = (num/1000);
+    _chrs[1] = ((num/100)%10);
+    _chrs[2] = (((num/10)%100)%10);
+    _chrs[3] = (((num%1000)%100)%10);
+}
diff -r 3604f34e944b -r 1d85399fdea3 bubble.h
--- a/bubble.h	Thu Mar 26 08:10:08 2015 +0000
+++ b/bubble.h	Tue Mar 29 07:51:47 2016 +0000
@@ -182,6 +182,13 @@
      * to the seven-segment displays.
      */
     void write(char* c);
+
+    /*
+     * This writes a sequence of integer number
+     * to the seven-segment displays.
+     */
+    void write(uint16_t num);
+
 private:
     /*
      * This is a constructor helper function