A port of the pololu header from arduino to mbed

Dependencies:   PololuQTRSensors

source for original arduino library: https://github.com/pololu/zumo-shield/tree/master/ZumoReflectanceSensorArray

Files at this revision

API Documentation at this revision

Comitter:
I_failed_Cpp
Date:
Wed Oct 18 15:45:07 2017 +0000
Parent:
2:4aa1484fa679
Commit message:
Down to one error left to fix:; ; Error: No instance of overloaded function "ZumoReflectanceSensorArray::init" matches the argument list in "main.cpp", Line: 29, Col: 25;

Changed in this revision

ZumoReflectanceSensorArray.h Show annotated file Show diff for this revision Revisions of this file
diff -r 4aa1484fa679 -r e3afbfd0a71c ZumoReflectanceSensorArray.h
--- a/ZumoReflectanceSensorArray.h	Wed Oct 18 11:06:18 2017 +0000
+++ b/ZumoReflectanceSensorArray.h	Wed Oct 18 15:45:07 2017 +0000
@@ -124,8 +124,8 @@
    * \param timeout    Maximum duration of reflectance reading in microseconds.
    * \param emitterPin Pin that turns IR emitters on or off.
    *
-   * This constructor calls `init(unsigned char * pins, unsigned char
-   * numSensors, unsigned int timeout, unsigned char emitterPin)` with all
+   * This constructor calls `init(PinName * pins, unsigned char
+   * numSensors, unsigned int timeout, PinName emitterPin)` with all
    * settings as given.
    */
   ZumoReflectanceSensorArray(PinName *pins, unsigned char numSensors, unsigned int timeout = 2000, PinName emitterPin = ZUMO_SENSOR_ARRAY_DEFAULT_EMITTER_PIN){
@@ -153,7 +153,7 @@
    * emitters will always be on.
    */
   void init(PinName emitterPin = ZUMO_SENSOR_ARRAY_DEFAULT_EMITTER_PIN){
-    unsigned char sensorPins[] = { D4, A3, D11, A0, A2, D5 };
+    PinName sensorPins[]={ D4, A3, D11, A0, A2, D5 };  // sensorPins[] = { D4, A3, D11, A0, A2, D5 };
     QTRSensorsRC::init(sensorPins, sizeof(sensorPins), 2000, emitterPin);
   }