Balboa32U4 library
Balboa32U4LineSensors.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <QTRSensors.h>
6 
30 {
31 public:
32 
34  {
35  setTypeRC();
36  }
37 
45  {
46  setSensorPins((const uint8_t[]){ 5, A4, A3, A2, A0 }, 5);
47  setEmitterPin(12);
48  }
49 
57  {
58  setSensorPins((const uint8_t[]){ A4, A3, A2, A0, 12 }, 5);
59  setEmitterPin(5);
60  }
61 };
62 
Gets readings from the five line sensors on the reflectance sensor array.
void setTypeRC()
Specifies that the sensors are RC.
Definition: QTRSensors.cpp:4
void setEmitterPin(uint8_t emitterPin)
Sets the emitter control pin for the sensors.
Definition: QTRSensors.cpp:56
void setSensorPins(const uint8_t *pins, uint8_t sensorCount)
Sets the sensor pins.
Definition: QTRSensors.cpp:16
void setEdgeAligned()
Configures this object to use a center-aligned sensor array.
Represents a QTR sensor array.
Definition: QTRSensors.h:83
void setCenterAligned()
Configures this object to use a center-aligned sensor array.