so today i tried using my seeduino 9dof with my esp32. When i tried using the library that seeduino has made it compiled with this error "avr/pgmspace.h no such file or directory”.
I also tried reading the raw i2c data but i only manage to read either a static 1 or 0.
When i tried using the library that seeduino has made it compiled with this error "avr/pgmspace.h no such file or directory”, this led to me changing a line that called pgmspace in the library to this:
#if defined(AVR)
#include <avr/pgmspace.h>
#else //defined(AVR)
#include <pgmspace.h>
#endif //defined(AVR)
which only caused more compiler errors.
After this i tried reading the raw i2c data but did not figure out which pins the esp32 used for i2c since the pinout on the site did not list the i2c pins ( https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/_images/ESP32-S3_DevKitC-1_pinlayout_v1.1.jpg ), butt i figured out it was 19, 20 (Or every PWM pin?). However, i do get the adress from the WireScan script, but when i try to read the data i only get either 1 or 0 and it stays static.
The wirecheck script does say error 5 at 0x6B but i dont use this adress so shouldn't be a problem?
So my 2 options is to get the library working on the esp32, or figure out the i2c communication?
Thanks for any help i can get.
Also here is the code i use to read the i2c data:
#include <Wire.h>
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Wire.begin(21, 20);
pinMode(8, OUTPUT);
digitalWrite(8, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
Wire.requestFrom(0x69, 6);
float test = Wire.read();
Serial.println(test);
delay(100);
}