Pinscape Controller version 1 fork. This is a fork to allow for ongoing bug fixes to the original controller version, from before the major changes for the expansion board project.

Dependencies:   FastIO FastPWM SimpleDMA mbed

Fork of Pinscape_Controller by Mike R

Revision:
41:cbd237fe5021
Parent:
25:e22b88bd783a
--- a/ccdSensor.h	Thu Dec 03 07:34:57 2015 +0000
+++ b/ccdSensor.h	Wed Feb 03 23:07:55 2016 +0000
@@ -28,7 +28,6 @@
     // Perform a low-res scan of the sensor.  
     int lowResScan()
     {
-
         // read the pixels at low resolution
         const int nlpix = 32;
         uint16_t pix[nlpix];
@@ -37,9 +36,9 @@
         // determine which end is brighter
         uint16_t p1 = pix[0];
         uint16_t p2 = pix[nlpix-1];
-        int si = 1, di = 1;
+        int si = 0, di = 1;
         if (p1 < p2)
-            si = nlpix, di = -1;
+            si = nlpix - 1, di = -1;
         
         // figure the shadow edge threshold - just use the midpoint 
         // of the levels at the bright and dark ends