Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 6:728c38a132ba, committed 2016-11-11
- Comitter:
- FatCookies
- Date:
- Fri Nov 11 12:19:54 2016 +0000
- Parent:
- 5:727d5bbc14a5
- Parent:
- 2:4b6f6fc84793
- Commit message:
- clean out again
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp.orig | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Nov 11 12:16:50 2016 +0000
+++ b/main.cpp Fri Nov 11 12:19:54 2016 +0000
@@ -1,10 +1,9 @@
#include "mbed.h"
#include "TFC.h"
-#define CAM_THRESHOLD 128
-
+Serial pc(USBTX,USBRX);
DigitalOut myled(LED1);
-Serial pc(PTD3,PTD2);
+//Serial pc(PTD3,PTD2);
@@ -12,11 +11,11 @@
int main() {
TFC_Init();
pc.baud(57600);
-
+
uint32_t i = 0;
+
while(1) {
-
- //If we have an image ready
+
if(TFC_LineScanImageReady>0) {
pc.putc('H');
for(i = 0; i < 128; i++) {
@@ -28,5 +27,6 @@
TFC_LineScanImageReady=0;
wait(0.05);
}
+
}
}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp.orig Fri Nov 11 12:19:54 2016 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "TFC.h"
+#define CAM_THRESHOLD 128
+
+
+DigitalOut myled(LED1);
+Serial pc(PTD3,PTD2);
+
+
+
+
+int main() {
+ TFC_Init();
+ pc.baud(57600);
+
+ uint32_t i = 0;
+ while(1) {
+
+ //If we have an image ready
+ if(TFC_LineScanImageReady>0) {
+ pc.putc('H');
+ for(i = 0; i < 128; i++) {
+ pc.putc((int8_t)(TFC_LineScanImage0[i] >> 4) & 0xFF);
+ }
+
+
+ //Reset image ready flag
+ TFC_LineScanImageReady=0;
+ wait(0.05);
+ }
+ }
+}
\ No newline at end of file