;lk

Dependencies:   BSP_DISCO_F746NG LCD_DISCO_F746NG mbed

Fork of DISCO-F746NG_TSL3301 by Yaroslav Krainyk

Files at this revision

API Documentation at this revision

Comitter:
Bogdan1997
Date:
Tue Mar 20 13:18:51 2018 +0000
Parent:
1:979d4820e32a
Commit message:
asd

Changed in this revision

BSP_DISCO_F746NG.lib Show annotated file Show diff for this revision Revisions of this file
LCD_DISCO_F746NG.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
diff -r 979d4820e32a -r 4e9b06db7ab8 BSP_DISCO_F746NG.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BSP_DISCO_F746NG.lib	Tue Mar 20 13:18:51 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/ST/code/BSP_DISCO_F746NG/#df2ea349c37a
diff -r 979d4820e32a -r 4e9b06db7ab8 LCD_DISCO_F746NG.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD_DISCO_F746NG.lib	Tue Mar 20 13:18:51 2018 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/LCD_DISCO_F746NG/#d44525b1de98
diff -r 979d4820e32a -r 4e9b06db7ab8 main.cpp
--- a/main.cpp	Tue Mar 06 13:04:48 2018 +0000
+++ b/main.cpp	Tue Mar 20 13:18:51 2018 +0000
@@ -1,11 +1,26 @@
 #include "mbed.h"
+#include "LCD_DISCO_F746NG.h"
 
 DigitalIn miso(D8);
 DigitalOut mosi(D7);
 DigitalOut clk(D6);
 
+LCD_DISCO_F746NG lcd;
+
 unsigned char lcam_buffer[102];
+unsigned char lcam_flip[102];
 
+/*int flip ( int a[] ){
+    for(int i = 0,  j = n - 1; i < j; ++i, --j) {
+ 
+        int t = a[i];
+        a[i] = a[j];
+        a[j] = t;
+    }
+   for (int i = 0; i<s) 
+    
+}
+*/
 void lcam_pulse(void) { 
     clk = 1;
     clk = 0;
@@ -134,8 +149,19 @@
 }
 
 int main() {  
+    lcd.Clear(LCD_COLOR_WHITE);
     lcam_setup();
+    char str [30];
+    
+    
     while(1) {
-
+        lcd.SetTextColor(LCD_COLOR_RED);
+        lcam_integrate(10);
+        lcam_read();
+       // sprintf(str,"Value = %d\n",lcam_buffer[50]);
+       // lcd.DisplayStringAt(0, 1, (uint8_t *)str, CENTER_MODE);
+        for (int i = 0; i < 102; i++ )
+        lcd.DrawPixel(50+i, 50+i, (0xff<<24)+(lcam_buffer[i]<<16)+(lcam_buffer[i]<<8)+lcam_buffer[i]);
+        
     }
 }