diff --git a/Arduino/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575.ino b/Arduino/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575.ino index 702163c0efe825e9a0269406f1c55a79094740fc..a88f22ecb51ecaa3109437e5df7fbf5d092e2f02 100644 --- a/Arduino/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575.ino +++ b/Arduino/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575/18_vl53l7cx_clean_both_I2C_with_STMlibrary_PCF8575.ino @@ -199,7 +199,6 @@ void loop() { VL53L7CX_ResultsData Results16; VL53L7CX_ResultsData Results17; - // Process each sensor data and save to respective JSON arrays processSensorData(sensor0, Results0, doc["sensor0"].to<JsonArray>(), "sensor0", LPN_PIN0); processSensorData(sensor1, Results1, doc["sensor1"].to<JsonArray>(), "sensor1", LPN_PIN1); @@ -306,23 +305,23 @@ void processSensorData(VL53L7CX &sensor, VL53L7CX_ResultsData &results, const Js // Turn LED on to indicate data processing digitalWrite(LedPin, HIGH); - // If data is ready, get the ranging data and store it in the JSON array if ((!status) && (NewDataReady != 0)) { status = sensor.vl53l7cx_get_ranging_data(&results); - + JsonArray sensorData = doc[sensorKey].to<JsonArray>(); - // Process the results and add them to the JSON array for (int y = imageWidth * (imageWidth - 1); y >= 0; y -= imageWidth) { for (int x = 0; x <= imageWidth - 1; x++) { - if Results0. - sensorData.add(results.distance_mm[VL53L7CX_NB_TARGET_PER_ZONE * (x + y)]); - Results0.status + int index = VL53L7CX_NB_TARGET_PER_ZONE * (x + y); + + // Neu: JsonArray via add<JsonArray>() + JsonArray measurement = sensorData.add<JsonArray>(); + measurement.add(results.distance_mm[index]); + measurement.add(results.target_status[index]); } } } - // Turn LED off to indicate processing is done digitalWrite(LedPin, LOW); } diff --git a/CAD_Designs/Fusion_Files/Final_UR10_Upperarm_vl53l7cx_bracket_v8.f3z b/CAD_Designs/Fusion_Files/Final_UR10_Upperarm_vl53l7cx_bracket_v8.f3z new file mode 100644 index 0000000000000000000000000000000000000000..7b87d000a9325b74deb19a1676c1053ffe331ab5 Binary files /dev/null and b/CAD_Designs/Fusion_Files/Final_UR10_Upperarm_vl53l7cx_bracket_v8.f3z differ