nightingale / TSL_1401

Dependents:   LineCamLPC LineCamLPC

Files at this revision

API Documentation at this revision

Comitter:
andrey001207
Date:
Wed Mar 28 12:28:18 2018 +0000
Commit message:
to edit

Changed in this revision

TSL_1401.cpp Show annotated file Show diff for this revision Revisions of this file
TSL_1401.h Show annotated file Show diff for this revision Revisions of this file
TSL_1401_confg.h Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 82f151c23f33 TSL_1401.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSL_1401.cpp	Wed Mar 28 12:28:18 2018 +0000
@@ -0,0 +1,15 @@
+#include <TSL_1401.h>
+#include <TSL1401_config.h>
+#include <mbed.h>
+
+TSL_1401::TSL_1401()
+{
+    printf("andrey petuh");
+    
+}
+
+TSL_1401::~TSL_1401()
+{
+    
+}
+
diff -r 000000000000 -r 82f151c23f33 TSL_1401.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSL_1401.h	Wed Mar 28 12:28:18 2018 +0000
@@ -0,0 +1,18 @@
+#include <TSL_1401_config.h>
+
+class TSL_1401 
+{
+    public:
+    TSL_1401();
+    ~TSL_1401();
+    void scanFrame();
+    void refreshLine();
+    
+    private:
+    DigitalOut SI(SI_PIN);
+    DigitalOut CLK (CLK_PIN);
+    AnalogIn AO(p15);
+    double rawData[128];
+    int line[128]; 
+    int status;   
+}
\ No newline at end of file
diff -r 000000000000 -r 82f151c23f33 TSL_1401_confg.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSL_1401_confg.h	Wed Mar 28 12:28:18 2018 +0000
@@ -0,0 +1,11 @@
+//Wiring
+
+#define SI_PIN p13
+#define CLK_PIN p14
+#define AO_PIN p15
+
+
+//Freqency
+
+#define CAM_UPDATE_FREQ 400     //Camera update frequency (HZ)
+#define SAT_TIME 2              //Delay in camera PWM (must be under 10 us)