Quad RGB sensor with SPI output drive, I2C display interface & analogue inputs / UI for various LED types
Dependencies: MCP23S17 PCF8574 TextLCD eeprom mbed-dev
Diff: main.cpp
- Revision:
- 14:02de92b0206a
- Parent:
- 13:ef2f1c11e33b
- Child:
- 15:bf821fd83219
--- a/main.cpp Thu Nov 10 16:57:19 2016 +0000 +++ b/main.cpp Thu Dec 08 12:03:13 2016 +0000 @@ -304,9 +304,9 @@ //working thresholds from pot inputs, scaled 0-100 -uint16_t RedThreshold = 0; -uint16_t GreenThreshold = 0; -uint16_t BlueThreshold = 0; +//uint16_t RedThreshold = 0; +//uint16_t GreenThreshold = 0; +//uint16_t BlueThreshold = 0; uint16_t Hysteresis = 0; @@ -557,12 +557,21 @@ MixRThreshold = 50 - ( Trimmer2.read_u16() /1310 ); MixGThreshold = 50 - ( Trimmer3.read_u16() /1310 ); //Hysteresis = HysTrimmer.read_u16() * 100 >> 11; + Hysteresis = 5; //fixed hysteresis + +#define FIXED_THRESHOLDS +#ifdef FIXED_THRESHOLDS + + SingleThreshold = 30; + MixRThreshold = 45; + //MixGThreshold = 35; //first value but a bit too close + MixGThreshold = 38; +#endif - RedThreshold = 45; //default for yellow detect (red) - GreenThreshold = 35;//default for yellow detect (green) - BlueThreshold = 10;//not used - Hysteresis = 5; + //RedThreshold = 45; //default for yellow detect (red) + //GreenThreshold = 35;//default for yellow detect (green) + //BlueThreshold = 10;//not used } void SelectSensorPort(uint8_t SensorID)