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.
Diff: main.cpp
- Revision:
- 2:7751080fb267
- Parent:
- 1:a220fd937508
- Child:
- 3:83cb6eb61adf
diff -r a220fd937508 -r 7751080fb267 main.cpp
--- a/main.cpp Sun Aug 17 16:33:40 2014 +0000
+++ b/main.cpp Mon Aug 18 02:00:24 2014 +0000
@@ -30,6 +30,7 @@
int high = 1000000;
int veryHigh = 10000000;
+double imageData;
int sensitivity = medium;
int pixelTotal = 3694;
int leadingDummyElements = 16;
@@ -104,6 +105,8 @@
case readOut_signalElements:
pixelCount++;
// pixelValue[pixelCount] = imageIn.read();
+// imageData = ((imageIn.read_u16() * 5.0) / 4096.0);
+ raspi.printf("%4.20f \r\n", (imageIn.read_u16() * 5.0) / 4096.0);
LED = !LED;
if (pixelCount == signalElements) {
pixelCount = 0;
@@ -115,17 +118,17 @@
if (pixelCount == trailingDummyElements) {
pixelCount = 0;
state = readOut_integrationTime;
+ ICG = 0;
}
break;
case readOut_integrationTime:
- if (ICG == 1) {
- ICG = 0;
wait_us(sensitivity);
- state = readOut_Finish;
- }
+ state = readOut_Finish;
+ raspi.printf("---\r\n");
break;
case readOut_Finish:
state = readOut_IDLE;
+ wait_us(sensitivity);
LED = 0;
ICG = 1;
break;
@@ -154,6 +157,7 @@
shiftGate.period_us(shiftGate_period);
shiftGate.pulsewidth_us(shiftGate_width);
+ raspi.baud(921600);
wait(0.5);
shiftGate_int.rise(checkState);