# data[].attributes.body
#include <FastLED.h>
#include <Wire.h>
#include <BH1750.h>

#define LED_PIN   7
#define NUM_LEDS  60

BH1750 bh1750_a;
BH1750 bh1750_b;
CRGB leds[NUM_LEDS];

void setup(){

Serial.begin(9600);
Wire.begin();
bh1750_a.begin(BH1750::CONTINUOUS_HIGH_RES_MODE, 0x23);
bh1750_b.begin(BH1750::CONTINUOUS_HIGH_RES_MODE, 0x5C);

FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
}

void loop() {

//Variablen
int helligkeit_1;
int helligkeit_2;
double max_ = 800.00;
double min_ = 750.00;
bool Beenden = true;

do{
float lux_1 = bh1750_a.readLightLevel();
float lux_2 = bh1750_b.readLightLevel();
bool stop = false;

do{
if (lux_1 < min_)
{
if (helligkeit_1 < 255)
{
helligkeit_1++;
licht(helligkeit_1, helligkeit_2);
}
else
{
licht(helligkeit_1, helligkeit_2);
}
}

else if (lux_1 > max_)
{
if ( helligkeit_1 != 0)
{
helligkeit_1--;
licht(helligkeit_1, helligkeit_2);
}
else
{
licht(helligkeit_1, helligkeit_2);
}
}
else
{
licht(helligkeit_1, helligkeit_2);
}
}while(stop);

stop = false;

do{
if (lux_2 < min_)
{
if (helligkeit_2 < 255)
{
helligkeit_2++;
licht(helligkeit_1, helligkeit_2);
}
else
{
licht(helligkeit_1, helligkeit_2);
}
}

else if (lux_2 > max_)
{
if ( helligkeit_2 != 0)
{
helligkeit_2--;
licht(helligkeit_1, helligkeit_2);
}
else
{
licht(helligkeit_1, helligkeit_2);
}
}
else
{
licht(helligkeit_1, helligkeit_2);
}
}while(stop);

//Ausgabe Lux Werte
Serial.print("Lux_1 Wert: ");
Serial.print(lux_1);
Serial.print("  |  ");
Serial.print("LED_1 Wert: ");
Serial.print(helligkeit_1);
Serial.print(" || ");
Serial.print("Lux_2 Wert: ");
Serial.print(lux_2);
Serial.print("  |  ");
Serial.print("LED_2 Wert: ");
Serial.print(helligkeit_2);
Serial.println();
//delay(50);

}while(Beenden);
}

void licht(int helligkeit_1, int helligkeit_2)
{
for (int i = 0; i <= 59; i++)
{
if (i <30)
{
leds[i] = CHSV (255,0,helligkeit_1);
FastLED.show();
}
else
{
leds[i] = CHSV (255,0,helligkeit_2);
FastLED.show();
}
}
}

# data[].attributes.body
This is our plan. But when we sticked it together, the arduino nano burned through.Then we had to think about putting the LED ring on an external power supply.

# data[].attributes.body
Our code uses two main libraries the BH1750 for the light sensor, and FastLedMaster for the LED ring.

With those libraries we were able to read the data from the light sensor. The data we used to control the light by looking to keep the lux level between 790-800 lux.

# data[].attributes.body
After that we decided to use only 4 light sensors but for this we had to use two Arduino Nano.

# data[].attributes.body
While combining our preresults we encountered some problems with the hardware.  This was the reason why our plan of implementing 8 light sensors failed and we had to do a new one.

# data[].attributes.body
After each group finished, we planned on how to put  our research together.

# data[].attributes.body
At the begin we split our group in two sections.  One of them worked on the programming of the led ring and the other had to figure out how to get the data of the lux sensor.

# data[].attributes.body
Our task is to write a program that independently produces the appropriate brightness for the plants. We also have to fix the sensors in a suitable place. The LED rings will be soldered with cables and then connected as well. We will coordinate with the other two groups so that we pull our cables through the same drilled holes and thus get as few problems as possible in the assembly.

# data[].attributes.headline
Planning and realization of the signed pictures and drawings

# data[].attributes.subject
Planning and realization of the signed pictures and drawings

# data[].attributes.body
This was our final decison because the Arduino Nano is compact and suitable for the fine cables and holes of the 3D-Printed-Work

# data[].attributes.headline
Example of 6 BH1750 combined together with one Arduino UNO

# data[].attributes.subject
Example of 6 BH1750 combined together with one Arduino UNO