Testprogramm fuer den SMD IoTKit Shield.

Dependencies:   MFRC522 RemoteIR Servo StepperMotorUni mbed-rtos mbed ESP8266 RCSwitch SAA1064 TMP175

Files at this revision

API Documentation at this revision

Comitter:
marcel1691
Date:
Mon Apr 20 07:43:54 2015 +0000
Parent:
3:880adec02196
Commit message:
SAA1064 Library eingebunden

Changed in this revision

SAA1064.lib Show annotated file Show diff for this revision Revisions of this file
StepperMotorUni.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SAA1064.lib	Mon Apr 20 07:43:54 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/smdiotkitch/code/SAA1064/#e6f764285b44
--- a/StepperMotorUni.lib	Wed Mar 25 13:20:47 2015 +0000
+++ b/StepperMotorUni.lib	Mon Apr 20 07:43:54 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/okano/code/StepperMotorUni/#5d0abdf92786
+http://developer.mbed.org/users/okano/code/StepperMotorUni/#5de3a9848490
--- a/main.cpp	Wed Mar 25 13:20:47 2015 +0000
+++ b/main.cpp	Mon Apr 20 07:43:54 2015 +0000
@@ -11,6 +11,7 @@
 #include "ESP8266.h"
 #include "RCSwitch.h"
 #include "TMP175.h"
+#include "SAA1064.h"
 // Trace
 #include "trace.h"
 
@@ -514,41 +515,18 @@
 void do4DigitLED()
 {
     INFO( "LED Digit Test" );
-    unsigned char saa1064 = 0x70; // define the I2C bus address for our SAA1064
-    //nums array 0,1,2,3,4,5,6,7,8,9,A,b,c,D,E,F,' ' //last element == blank
-    // add 8 for dot
-    unsigned char nums[17]={ 0xE7, 0x84, 0xD3, 0xD6, 0xB4, 0x76, 0x77, 0xC4, 0xF7, 0xF6, 0xF5, 0x37, 0x13, 0x97, 0x73, 0x71};
-    unsigned char  digit[4]={0,0,0,0};
-    uint8_t data[6];    
+    SAA1064 display;
     
-    I2C i2c( D14, D15); // SDA, SCL
-        // Initialisierung
-    data[0] = 0x00;
-    data[1] = 0x47;
-    i2c.write( saa1064, (char*) data, 2 );
-
-    // alles auf OFF setzen
-    data[0] = 1;
-    data[1] = 0;
-    data[2] = 0;
-    data[3] = 0;
-    data[4] = 0;
-    i2c.write(saa1064, (char*) data, 5);
-
-    for ( int i = 0; i <= 16-4; i++ ) 
+    for ( int i = 0; i < 10; i++ ) 
     {
-        digit[0]=nums[i];
-        digit[1]=nums[i+1];
-        digit[2]=nums[i+2];
-        digit[3]=nums[i+3];
-        data[0] = 1;
-        data[1] = ((digit[3]<<4) & 0xF0) | (digit[1] & 0x0F);
-        data[2] = ((digit[2]<<4) & 0xF0) | (digit[0] & 0x0F);
-        data[3] = ((digit[1]>>4) & 0x0F) | (digit[3] & 0xF0);
-        data[4] = ((digit[0]>>4) & 0x0F) | (digit[2] & 0xF0);
-        i2c.write(saa1064, (char*) data, 5);
+        display.write( i, i+1, i+2, i+3 );
         wait( 0.2 );
     }
+    for ( int i = 1000; i < 1234+1; i++ ) 
+    {
+        display.writeInt( i );
+        wait( 0.2 );
+    }    
 }
 
 /** I2C Kommunikation mit Arduino */
--- a/mbed-rtos.lib	Wed Mar 25 13:20:47 2015 +0000
+++ b/mbed-rtos.lib	Mon Apr 20 07:43:54 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/mbed_official/code/mbed-rtos/#d3d0e710b443
+http://developer.mbed.org/users/mbed_official/code/mbed-rtos/#34292fba723c
--- a/mbed.bld	Wed Mar 25 13:20:47 2015 +0000
+++ b/mbed.bld	Mon Apr 20 07:43:54 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file