Hi
In what ways is i possible to get data from multiple software I2C sensors?
im specifikly trying to with SEN0390.
Hi
In what ways is i possible to get data from multiple software I2C sensors?
im specifikly trying to with SEN0390.
You might be able to cheat. That device has an "enable" line.
HIGH enables it. LOW disables it.
Do a test. Run the i2c_scanner sketch with the enable line HIGH, then LOW.
If it shows up only when the enable line is HIGH...
Need I go on?
Edit: I'm going by this doc
You have THREE topics on the same subject and I don't see answers to any questions
Why use a multiplexer if the enable line works. If it doesn't, let me know.
This is an example for multiple MPU-6050 sensors. They can be at 0x68 and 0x69. I put them all at 0x69, but none is used at that address. One sensor is set to 0x68 and that one is used.
If the enable line enables and disables the i2c interface, you already have a multiplexer.
Each will require its own pin to enable/disable that sensor.
Hi,
Can anybody help me with making a sketch where it possible to read data for 6 SEN0390 using a PCA9548 multiplexer?
I am totally new to arduino, so I am in over head getting this to work.
Welcome to the forum
What have you tried so far ?
Sketch ?
Schematic ?
Thanks.
I just tried combining two sketches from toturials.
/**
* PCA9548 I2C Multi Sensor Example
*
* Using two VL53L4CD sensors on ports 0 and 1
*
*/
#include <Arduino.h>
#include <Wire.h>
#include <assert.h>
#include <DFRobot_B_LUX_V30B.h>
#define PCAADDR 0x70
#define DEV_I2C Wire
#define SerialPort Serial
// create two instances of the sensor
void pcaselect(uint8_t i) {
if (i > 7) return;
Wire.beginTransmission(PCAADDR);
Wire.write(1 << i);
Wire.endTransmission();
}
// standard Arduino setup()
void setup()
{
while (!Serial);
delay(1000);
Wire.begin();
Serial.begin(9600);
Serial.println("\nMultiSensor PCA9548");
// define the port on the PCA9548 for the first sensor
pcaselect(0);
// setup the first sensor
tof1.myLux.begin();
/*
* The setMode and readMode functions can be omitted. When not configured, the default configuration is the one used last time.
* When using the setMode function, its return value should be judged. If the return value is 1, the setting is successful.
* while(!myLux.setMode(myLux.eManual,myLux.eCDR_0,myLux.eTime800ms));
* Serial.print("mode: ");
* Serial.println(myLux.readMode());
*/
// define the port on the PCA9548 for the 2nd sensor
pcaselect(1);
// setup the 2nd sensor
tof2.myLux.begin();
/*
* The setMode and readMode functions can be omitted. When not configured, the default configuration is the one used last time.
* When using the setMode function, its return value should be judged. If the return value is 1, the setting is successful.
* while(!myLux.setMode(myLux.eManual,myLux.eCDR_0,myLux.eTime800ms));
* Serial.print("mode: ");
* Serial.println(myLux.readMode());
*/
}
void loop()
{
uint8_t NewDataReady = 0;
VL53L4CD_Result_t results;
uint8_t status;
char report[64];
// define port on the PCA9584
pcaselect(0);
// loop for time of flight sensor 1
do {
status = tof1.VL53L4CD_CheckForDataReady(&NewDataReady);
} while (!NewDataReady);
if ((!status) && (NewDataReady != 0)) {
// (Mandatory) Clear HW interrupt to restart measurements
tof1.VL53L4CD_ClearInterrupt();
// Read measured distance. RangeStatus = 0 means valid data
tof1.VL53L4CD_GetResult(&results);
snprintf(report, sizeof(report), "ToF 1 - Status = %3u, Distance = %5u mm, Signal = %6u kcps/spad\r\n",
results.range_status,
results.distance_mm,
results.signal_per_spad_kcps);
SerialPort.println(report);
}
// define port on PCA9548
pcaselect(1);
// loop for time of flight sensor 2
do {
status = tof2.VL53L4CD_CheckForDataReady(&NewDataReady);
} while (!NewDataReady);
if ((!status) && (NewDataReady != 0)) {
// (Mandatory) Clear HW interrupt to restart measurements
tof2.VL53L4CD_ClearInterrupt();
// Read measured distance. RangeStatus = 0 means valid data
tof2.VL53L4CD_GetResult(&results);
snprintf(report, sizeof(report), "ToF 2 - Status = %3u, Distance = %5u mm, Signal = %6u kcps/spad\r\n",
results.range_status,
results.distance_mm,
results.signal_per_spad_kcps);
SerialPort.println(report);
}
}
AND
#include <DFRobot_B_LUX_V30B.h>
/*!
* @file getLightIntensity.ino
* @brief Set sensor mode and read light values
* @n Experimental phenomenon: the light value is read once a second after the sensor device starts successfully
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @author [Fary](fary_young@outlook.com)
* @version V1.0
* @date 2020-12-03
* @https://github.com/DFRobot/DFRobot_B_LUX_V30B
*/
#include <DFRobot_B_LUX_V30B.h>
DFRobot_B_LUX_V30B myLux(13);//The sensor chip is set to 13 pins, SCL and SDA adopt default configuration
/*
* MANUAL
* eAutomatic:The default automatic configuration, after using this mode does not have to configure the following mode, IC automatic configuration.
* eManual :Manual configuration. This pattern is configured and used in combination with subsequent patterns
* CDR
* eCDR_0:Don't divide the CDR
* eCDR_1: Eight divided the CDR
* TIM
* eTime800ms:The collection time is 800ms
* eTime400ms:The collection time is 400ms
* eTime200ms:The collection time is 200ms
* eTime100mse:The collection time is 100ms
* Time50ms:The collection time is 50ms
* eTime25ms:The collection time is 25ms
* eTime12_5ms:The collection time is 12.5ms
* eTime6_25ms:The collection time is 6.25ms
* Manual mode combination
* (The collected value cannot exceed the maximum range of each mode. If the read data exceeds the range, the data is not correct)
* eManual+eCDR_0+eTime800ms mode=64 The maximum value collected is: 2938 (Lux)
* eManual+eCDR_0+eTime400ms mode=65 The maximum value collected is: 5875(lux)
* eManual+eCDR_0+eTime200ms mode=66 The maximum value collected is: 11750(lux)
* eManual+eCDR_0+eTime100ms mode=67 The maximum value collected is: 23501(lux)
* eManual+eCDR_0+eTime50ms mode=68 The maximum value collected is: 47002(lux)
* eManual+eCDR_0+eTime25ms mode=69 The maximum value collected is: 94003(lux)
* eManual+eCDR_0+eTime12.50ms mode=70 The maximum value collected is: 200000(lux)
* eManual+eCDR_0+eTime6.25ms mode=71 The maximum value collected is: 200000(lux)
*
* eManual+eCDR_1+eTime800ms mode=72 The maximum value collected is: 23501(lux)
* eManual+eCDR_1+eTime400ms mode=73 The maximum value collected is: 47002(lux)
* eManual+eCDR_1+eTime200ms mode=74 The maximum value collected is: 94003(lux)
* eManual+eCDR_1+eTime100ms mode=75 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime50ms mode=76 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime25ms mode=77 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime12.50ms mode=78 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime6.25ms mode=79 The maximum value collected is: 200000(lux)
*/
void setup() {
Serial.begin(9600);
myLux.begin();
/*
* The setMode and readMode functions can be omitted. When not configured, the default configuration is the one used last time.
* When using the setMode function, its return value should be judged. If the return value is 1, the setting is successful.
* while(!myLux.setMode(myLux.eManual,myLux.eCDR_0,myLux.eTime800ms));
* Serial.print("mode: ");
* Serial.println(myLux.readMode());
*/
}
void loop() {
Serial.print("value: ");
Serial.print(myLux.lightStrengthLux());
Serial.println(" (lux).");
delay(1000);
}
Please post your best effort at combining the two sketches and describe what problems you encountered
/**
* PCA9548 I2C Multi Sensor Example
*
* Using two VL53L4CD sensors on ports 0 and 1
*
*/
#include <Arduino.h>
#include <Wire.h>
#include <assert.h>
#include <DFRobot_B_LUX_V30B.h>
#define PCAADDR 0x70
#define DEV_I2C Wire
#define SerialPort Serial
// create two instances of the sensor
DFRobot_B_LUX_V30B tof1(&DEV_I2C, A1);
DFRobot_B_LUX_V30B tof2(&DEV_I2C, A1);
void pcaselect(uint8_t i) {
if (i > 7) return;
Wire.beginTransmission(PCAADDR);
Wire.write(1 << i);
Wire.endTransmission();
}
// standard Arduino setup()
void setup()
{
while (!Serial);
delay(1000);
Wire.begin();
Serial.begin(9600);
Serial.println("\nMultiSensor PCA9548");
// define the port on the PCA9548 for the first sensor
pcaselect(0);
// setup the first sensor
tof1.myLux.begin();
/*
* The setMode and readMode functions can be omitted. When not configured, the default configuration is the one used last time.
* When using the setMode function, its return value should be judged. If the return value is 1, the setting is successful.
* while(!myLux.setMode(myLux.eManual,myLux.eCDR_0,myLux.eTime800ms));
* Serial.print("mode: ");
* Serial.println(myLux.readMode());
*/
// define the port on the PCA9548 for the 2nd sensor
pcaselect(1);
// setup the 2nd sensor
tof2.myLux.begin();
/*
* The setMode and readMode functions can be omitted. When not configured, the default configuration is the one used last time.
* When using the setMode function, its return value should be judged. If the return value is 1, the setting is successful.
* while(!myLux.setMode(myLux.eManual,myLux.eCDR_0,myLux.eTime800ms));
* Serial.print("mode: ");
* Serial.println(myLux.readMode());
*/
}
void loop()
do {
// define port on the PCA9584
pcaselect(0);
Serial.print("value: ");
Serial.print(myLux.lightStrengthLux());
Serial.println(" (lux).");
delay(1000);
}
// define port on PCA9548
pcaselect(1);
// loop for time of flight sensor 2
do {
Serial.print("value: ");
Serial.print(myLux.lightStrengthLux());
Serial.println(" (lux).");
delay(1000);
SerialPort.println(report);
}
}
I get an error: invalid conversion from 'TwoWire*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Do you have 6x arduino digital pins available? If you do, then you do not need the multiplexer. Each sensor has an enable/chip select pin.
I think this DFRobot library uses software i2c only. Wire library is hardware i2c. They are not compatible, I suspect.
My advice would be to find another library for the sensor, one that uses hardware i2c and is compatible with Wire library.
Alternatively, do not use the multiplexer. Use an Arduino pin connected to the EN pin of each sensor and connect the SDA SCL pins of each sensor together and connect to 2 more Arduino pins. These do not need to be the usual SDA & SCL pins of the Uno.
You cannot pass the Wire object to this constructor. It will accept only pin numbers for 2 pins to use for software i2c, plus a pin number for the enable/chip select pin of the sensor.
Hi PaulRB,
Thanks for yout help,
I've have tried to find a wire library for the sensor with out luck.
When i tried a simple sketch using the EN function again without any luck.
can you se anything wrong the the code?
/*!
* @file getLightIntensity.ino
* @brief Set sensor mode and read light values
* @n Experimental phenomenon: the light value is read once a second after the sensor device starts successfully
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @author [Fary](fary_young@outlook.com)
* @version V1.0
* @date 2020-12-03
* @https://github.com/DFRobot/DFRobot_B_LUX_V30B
*/
#include <DFRobot_B_LUX_V30B.h>
DFRobot_B_LUX_V30B myLux(13);//The sensor chip is set to 13 pins, SCL and SDA adopt default configuration
/*
* MANUAL
* eAutomatic:The default automatic configuration, after using this mode does not have to configure the following mode, IC automatic configuration.
* eManual :Manual configuration. This pattern is configured and used in combination with subsequent patterns
* CDR
* eCDR_0:Don't divide the CDR
* eCDR_1: Eight divided the CDR
* TIM
* eTime800ms:The collection time is 800ms
* eTime400ms:The collection time is 400ms
* eTime200ms:The collection time is 200ms
* eTime100mse:The collection time is 100ms
* Time50ms:The collection time is 50ms
* eTime25ms:The collection time is 25ms
* eTime12_5ms:The collection time is 12.5ms
* eTime6_25ms:The collection time is 6.25ms
* Manual mode combination
* (The collected value cannot exceed the maximum range of each mode. If the read data exceeds the range, the data is not correct)
* eManual+eCDR_0+eTime800ms mode=64 The maximum value collected is: 2938 (Lux)
* eManual+eCDR_0+eTime400ms mode=65 The maximum value collected is: 5875(lux)
* eManual+eCDR_0+eTime200ms mode=66 The maximum value collected is: 11750(lux)
* eManual+eCDR_0+eTime100ms mode=67 The maximum value collected is: 23501(lux)
* eManual+eCDR_0+eTime50ms mode=68 The maximum value collected is: 47002(lux)
* eManual+eCDR_0+eTime25ms mode=69 The maximum value collected is: 94003(lux)
* eManual+eCDR_0+eTime12.50ms mode=70 The maximum value collected is: 200000(lux)
* eManual+eCDR_0+eTime6.25ms mode=71 The maximum value collected is: 200000(lux)
*
* eManual+eCDR_1+eTime800ms mode=72 The maximum value collected is: 23501(lux)
* eManual+eCDR_1+eTime400ms mode=73 The maximum value collected is: 47002(lux)
* eManual+eCDR_1+eTime200ms mode=74 The maximum value collected is: 94003(lux)
* eManual+eCDR_1+eTime100ms mode=75 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime50ms mode=76 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime25ms mode=77 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime12.50ms mode=78 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime6.25ms mode=79 The maximum value collected is: 200000(lux)
*/
void setup() {
Serial.begin(9600);
myLux.begin();
/*
* The setMode and readMode functions can be omitted. When not configured, the default configuration is the one used last time.
* When using the setMode function, its return value should be judged. If the return value is 1, the setting is successful.
* while(!myLux.setMode(myLux.eManual,myLux.eCDR_0,myLux.eTime800ms));
* Serial.print("mode: ");
* Serial.println(myLux.readMode());
*/
pinMode (12,OUTPUT);
pinMode (8,OUTPUT);
}
void loop() {
digitalWrite (12,LOW);
digitalWrite (8,LOW);
digitalWrite(12,HIGH);
delay(1000);
Serial.print("value: ");
Serial.print(myLux.lightStrengthLux());
Serial.println(" (lux).");
digitalWrite(12,LOW);
delay(1000);
digitalWrite (8,HIGH);
delay(1000);
Serial.print("value: ");
Serial.print(myLux.lightStrengthLux());
Serial.println(" (lux).");
digitalWrite(8,LOW);
delay(1000);
}
/*!
* @file getLightIntensity.ino
* @brief Set sensor mode and read light values
* @n Experimental phenomenon: the light value is read once a second after the sensor device starts successfully
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @author [Fary](fary_young@outlook.com)
* @version V1.0
* @date 2020-12-03
* @https://github.com/DFRobot/DFRobot_B_LUX_V30B
*/
#include <DFRobot_B_LUX_V30B.h>
DFRobot_B_LUX_V30B myLux[2] = {
DFRobot_B_LUX_V30B(12), //The sensor chip is set to pin 12, SCL and SDA adopt default configuration
DFRobot_B_LUX_V30B(8) //The sensor chip is set to pin 8, SCL and SDA adopt default configuration
};
/*
* MANUAL
* eAutomatic:The default automatic configuration, after using this mode does not have to configure the following mode, IC automatic configuration.
* eManual :Manual configuration. This pattern is configured and used in combination with subsequent patterns
* CDR
* eCDR_0:Don't divide the CDR
* eCDR_1: Eight divided the CDR
* TIM
* eTime800ms:The collection time is 800ms
* eTime400ms:The collection time is 400ms
* eTime200ms:The collection time is 200ms
* eTime100mse:The collection time is 100ms
* Time50ms:The collection time is 50ms
* eTime25ms:The collection time is 25ms
* eTime12_5ms:The collection time is 12.5ms
* eTime6_25ms:The collection time is 6.25ms
* Manual mode combination
* (The collected value cannot exceed the maximum range of each mode. If the read data exceeds the range, the data is not correct)
* eManual+eCDR_0+eTime800ms mode=64 The maximum value collected is: 2938 (Lux)
* eManual+eCDR_0+eTime400ms mode=65 The maximum value collected is: 5875(lux)
* eManual+eCDR_0+eTime200ms mode=66 The maximum value collected is: 11750(lux)
* eManual+eCDR_0+eTime100ms mode=67 The maximum value collected is: 23501(lux)
* eManual+eCDR_0+eTime50ms mode=68 The maximum value collected is: 47002(lux)
* eManual+eCDR_0+eTime25ms mode=69 The maximum value collected is: 94003(lux)
* eManual+eCDR_0+eTime12.50ms mode=70 The maximum value collected is: 200000(lux)
* eManual+eCDR_0+eTime6.25ms mode=71 The maximum value collected is: 200000(lux)
*
* eManual+eCDR_1+eTime800ms mode=72 The maximum value collected is: 23501(lux)
* eManual+eCDR_1+eTime400ms mode=73 The maximum value collected is: 47002(lux)
* eManual+eCDR_1+eTime200ms mode=74 The maximum value collected is: 94003(lux)
* eManual+eCDR_1+eTime100ms mode=75 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime50ms mode=76 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime25ms mode=77 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime12.50ms mode=78 The maximum value collected is: 200000(lux)
* eManual+eCDR_1+eTime6.25ms mode=79 The maximum value collected is: 200000(lux)
*/
void setup() {
Serial.begin(9600);
for (byte s=0; s<2; s++) myLux[s].begin();
/*
* The setMode and readMode functions can be omitted. When not configured, the default configuration is the one used last time.
* When using the setMode function, its return value should be judged. If the return value is 1, the setting is successful.
* while(!myLux.setMode(myLux.eManual,myLux.eCDR_0,myLux.eTime800ms));
* Serial.print("mode: ");
* Serial.println(myLux.readMode());
*/
}
void loop() {
for (byte s=0; s<2; s++) {
Serial.print("Sensor ");
Serial.print(s);
Serial.print(" value: ");
Serial.print(myLux[s].lightStrengthLux());
Serial.println(" (lux).");
}
}
Hi
I'm trying to use this guide: Software I2C Multiplexer – Arduino Craft Corner
In order to read data from multiple SEN0390 sensors.
Can anybody help?
#include <DFRobot_B_LUX_V30B.h>
#include <FlexWire.h>
#define MAXSENSOR 2
// The pins that we use for the I2C buses
uint8_t sdapin[MAXSENSOR] = { 2, 4 };
uint8_t sclpin[MAXSENSOR] = { 3, 5 };
// Array of Flexwire instances
FlexWire wire[MAXSENSOR] = { {sdapin[0], sclpin[0]}, {sdapin[1], sclpin[1]} };
// Create array of instances of the HTU21D class
DFRobot_B_LUX_V30B mylux[MAXSENSOR];
void setup()
{
Serial.begin(9600);
Serial.println(F("Multi-I2C example with HTU21D"));
for (uint8_t i=0; i < MAXSENSOR; i++) mylux[i].begin(wire[i]);
}
void loop()
{
for (uint8_t i=0; i < MAXSENSOR; i++) {
Serial.print(F("Sensor "));
Serial.print(i+1);
Serial.print(F(": "));
Serial.print(mylux[i].lightStrengthLux(), 1);
Serial.println("lux");
}
Serial.println();
delay(1000);
}
Error :
Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"
Software_multiplexer:15:35: error: no matching function for call to 'DFRobot_B_LUX_V30B::DFRobot_B_LUX_V30B()'
DFRobot_B_LUX_V30B mylux[MAXSENSOR];
^
In file included from C:\Users\Agri\Documents\Arduino\Software_multiplexer\Software_multiplexer.ino:1:0:
C:\Program Files (x86)\Arduino\libraries\DFRobot_B_LUX_V30B-master/DFRobot_B_LUX_V30B.h:136:3: note: candidate: DFRobot_B_LUX_V30B::DFRobot_B_LUX_V30B(uint8_t, uint8_t, uint8_t)
DFRobot_B_LUX_V30B(uint8_t cEN, uint8_t scl = SCL, uint8_t sda = SDA);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\DFRobot_B_LUX_V30B-master/DFRobot_B_LUX_V30B.h:136:3: note: candidate expects 3 arguments, 0 provided
C:\Program Files (x86)\Arduino\libraries\DFRobot_B_LUX_V30B-master/DFRobot_B_LUX_V30B.h:40:7: note: candidate: constexpr DFRobot_B_LUX_V30B::DFRobot_B_LUX_V30B(const DFRobot_B_LUX_V30B&)
class DFRobot_B_LUX_V30B{
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\DFRobot_B_LUX_V30B-master/DFRobot_B_LUX_V30B.h:40:7: note: candidate expects 1 argument, 0 provided
C:\Users\Agri\Documents\Arduino\Software_multiplexer\Software_multiplexer.ino: In function 'void setup()':
Software_multiplexer:21:63: error: no matching function for call to 'DFRobot_B_LUX_V30B::begin(FlexWire&)'
for (uint8_t i=0; i < MAXSENSOR; i++) mylux[i].begin(wire[i]);
^
In file included from C:\Users\Agri\Documents\Arduino\Software_multiplexer\Software_multiplexer.ino:1:0:
C:\Program Files (x86)\Arduino\libraries\DFRobot_B_LUX_V30B-master/DFRobot_B_LUX_V30B.h:145:8: note: candidate: void DFRobot_B_LUX_V30B::begin()
void begin(void);
^~~~~
C:\Program Files (x86)\Arduino\libraries\DFRobot_B_LUX_V30B-master/DFRobot_B_LUX_V30B.h:145:8: note: candidate expects 0 arguments, 1 provided
exit status 1
no matching function for call to 'DFRobot_B_LUX_V30B::DFRobot_B_LUX_V30B()'
Board at COM7 is not available
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I've never used that library but you could switch those two lines
as the doc states
The FlexWire library is the only library that allows the replacement of the Wire library on a per-sketch basis. You simply include this library as the first one in your sketch, after which the original Wire library will be ignored.
also the constructor requires the enable pin which is the error you get.
Hi J-M-L
Thank you for your suggestion, but it made no difference.
The sensor i'm using SEN0390 is a software i2c, do you think it matters in this library?
I added also the comment about the constructor. you need an additional pin for the enable pin so you would do something like
DFRobot_B_LUX_V30B mylux[] = {{10, 11}};
but if the library is hardwired for the I2C use in some ways, you might still get compile errors.
the constructor seems to accepts SCL and SDA pins, you'd need to double check the library to see if it can deal with multiple instances with different pins (and begin() does not take any argument apparently)
try something like this without your library and connect the pins 6 and 7 to the enable pins of the 2 sensors. Compile and open the serial monitor at 115200 bauds. what happens ?
#include <DFRobot_B_LUX_V30B.h>
DFRobot_B_LUX_V30B mylux[] = {{6, 2, 3}, {7, 4, 5}};
const byte MAXSENSOR = sizeof mylux / sizeof * mylux;
void setup() {
Serial.begin(115200);
Serial.println(F("Multi-I2C example with HTU21D"));
for (uint8_t i = 0; i < MAXSENSOR; i++) mylux[i].begin();
}
void loop() {
for (uint8_t i = 0; i < MAXSENSOR; i++) {
Serial.print(F("Sensor "));
Serial.print(i + 1);
Serial.print(F(": "));
Serial.print(mylux[i].lightStrengthLux(), 1);
Serial.println("lux");
}
Serial.println();
delay(1000);
}