Reading Sensors

circle-info

Good to know: This software is currently in Beta.

//LightSensor.h

#pragma once

#include "Arduino.h"
#include <Wire.h>

class LightSensor 
{
    public:
        LightSensor();
        bool Any();
        
        void Read();

        bool Front_Sensor();
        bool Rear_Sensor();
        bool Left_Sensor();
        bool Right_Sensor();
        bool Right_Front_Sensor();
        bool Left_Front_Sensor();
        bool Right_Rear_Sensor();
        bool Left_Rear_Sensor();

        bool Left_Centre_Sensor();
        bool Right_Centre_Sensor();

    private:
        char buffer[3];
         
};

Last updated