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

Files at this revision

API Documentation at this revision

Comitter:
mjr
Date:
Wed Feb 03 23:07:55 2016 +0000
Parent:
34:6b981a2afab7
Child:
42:f6f9735b67a1
Commit message:
Fix CCD bug in sensing CCD orientation; updated to latest USBDevice library with ISR bug fixes

Changed in this revision

USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
ccdSensor.h Show annotated file Show diff for this revision Revisions of this file
--- a/USBDevice.lib	Thu Dec 03 07:34:57 2015 +0000
+++ b/USBDevice.lib	Wed Feb 03 23:07:55 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mjr/code/USBDevice/#a8eb758f4074
+http://mbed.org/users/mjr/code/USBDevice/#cd877d5c09ea
--- 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