Skip to content

Commit c5bfd51

Browse files
committed
fix compilation for ESP32S3 and DoIt DevKit
1 parent b434d80 commit c5bfd51

File tree

1 file changed

+3
-2
lines changed
  • examples/utils/sensor_test/magnetic_sensors/magnetic_sensor_i2c/magnetic_sensor_i2c_dual_bus_examples/esp32_i2c_dual_bus_example

1 file changed

+3
-2
lines changed

examples/utils/sensor_test/magnetic_sensors/magnetic_sensor_i2c/magnetic_sensor_i2c_dual_bus_examples/esp32_i2c_dual_bus_example/esp32_i2c_dual_bus_example.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <SimpleFOC.h>
2+
#include <Wire.h>
23

34
/** Annoyingly some i2c sensors (e.g. AS5600) have a fixed chip address. This means only one of these devices can be addressed on a single bus
45
* This example shows how a second i2c bus can be used to communicate with a second sensor.
@@ -7,8 +8,8 @@
78
MagneticSensorI2C sensor0 = MagneticSensorI2C(AS5600_I2C);
89
MagneticSensorI2C sensor1 = MagneticSensorI2C(AS5600_I2C);
910

10-
// example of esp32 defining 2nd bus
11-
TwoWire Wire1(1);
11+
// example of esp32 defining 2nd bus, if not already defined
12+
//TwoWire Wire1(1);
1213

1314
void setup() {
1415

0 commit comments

Comments
 (0)