Skip to content
Snippets Groups Projects
Commit d30f79ad authored by René Ebeling's avatar René Ebeling
Browse files

documentation

parent e202b000
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,8 @@
#define LPN_PIN6 6
#define LPN_PIN7 7
#define LPN_PIN8 8
long count = 0;
long allduration = 0;
uint16_t sensoraddress0 = 0x30;
uint16_t sensoraddress1 = 0x31;
uint16_t sensoraddress2 = 0x32;
......@@ -80,8 +81,8 @@ uint16_t sensoraddress8 = 0x38;
uint16_t wait_for_i2c = 50;
uint16_t imageWidth = 8;
uint16_t ranging_frequency = 15;
uint32_t i2c_freq_hz = 1000000;
uint32_t baudrate = 1000000;
uint32_t i2c_freq_hz = 600000;
unsigned long baudrate = 2000000;
pin_size_t SDA_PIN0 = 4;
pin_size_t SCL_PIN0 = 5;
pin_size_t SDA_PIN1 = 26;
......@@ -179,6 +180,8 @@ void setup() {
}
void loop() {
count++;
long timestamp = micros();
// Declare the result data variables for each sensor
VL53L7CX_ResultsData Results0;
VL53L7CX_ResultsData Results1;
......@@ -219,8 +222,15 @@ void loop() {
processSensorData(sensor16, Results16, "sensor17", LPN_PIN8);
// Serialize the JSON document and print to Serial
serializeJson(doc, Serial);
//serializeJson(doc, Serial);
Serial.println();
long loopduration = micros() - timestamp;
allduration = allduration + loopduration;
long averageloopduration = allduration/count;
Serial.println(averageloopduration);
Serial.println(count);
}
void i2cScanner(TwoWire DEV_I2C) {
......
This diff is collapsed.
16:28:42.887 -> 657
16:28:42.983 ->
16:28:42.983 -> 95598
16:28:42.983 -> 658
16:28:43.079 ->
16:28:43.079 -> 95598
16:28:43.079 -> 659
16:28:43.177 ->
16:28:43.177 -> 95598
16:28:43.177 -> 660
16:28:43.275 ->
16:28:43.275 -> 95598
16:28:43.275 -> 661
16:28:43.373 ->
16:28:43.373 -> 95598
16:28:43.373 -> 662
16:28:43.471 ->
16:28:43.471 -> 95598
16:28:43.471 -> 663
16:28:43.568 ->
16:28:43.568 -> 95598
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment