it seems to work, but when the sun goes up it shoes vales like 10-300 and when it gets dark it goes up like 600 (LUX)
is there a way to change that to the other way. Dark = values from 0-100 and Light values 100+++ ?
before i was using this function in arduini i found:
void sensorRead() {
//Record a reading from the light sensor and add it to the array
readings[readIndex] = analogRead(A0); //get an average light level from previouse set of samples
readIndex = readIndex + 1; // advance to the next position in the array:
// if we're at the end of the array move the index back around...
if (readIndex >= numReadings) {
// ...wrap around to the beginning:
readIndex = 0;
}
//now work out the sum of all the values in the array
sumBrightness = 0;
for (int i = 0; i < numReadings; i++)
{
sumBrightness += readings[i];
}
// and calculate the average:
lightSensorValue = sumBrightness / numReadings;
//set the brightness based on ambiant light levels
color1_brightness = map(lightSensorValue, 0, 1023, 255, 0);
if (color1_brightness < 2) {
color1_brightness = 2;
}
}//end of sensorRead
I’m glad you found your answer. I have a HX711 and I thought I had seen something to invert values but just couldn’t find it. There is a check box for solution, consider checking it on your above post to make it easier for others to find answers.
Is there a way to use the digital output pin ?
As we can see in the picture, there are 2 pin, 1 for A0 and an other one for D0.
Do you know how to use it ?