Hi everyone. I try to save data from ADXL345 sensor to stm32f103c8t6. But ı can't save it.
I have some errors.
sketch_may09a:25:45: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'uint16 {aka short unsigned int}' [-fpermissive]
Serial.print (EEPROM.read(addresses, xdata));
^
In file included from C:\Users\ufukc\AppData\Local\Temp\arduino_modified_sketch_883987\sketch_may09a.ino:3:0:
C:\Users\ufukc\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.5.31\libraries\EEPROM/EEPROM.h:69:9: error: initializing argument 2 of 'uint16 EEPROMClass::read(uint16, uint16*)' [-fpermissive]
uint16 read (uint16 address, uint16 data);
^
exit status 1
invalid conversion from 'uint16_t {aka short unsigned int}' to 'uint16 {aka short unsigned int*}' [-fpermissive]
**
Here they are. What should ı do for solving my problem?
My codes: #include <Wire.h> #include <ADXL345.h> #include <EEPROM.h>
ADXL345 adxl;
int x,y,z;
long int a = 0;
int b = 0;
int sayi = 0;
int xe;
It is telling you the second argument to EEPROM.read() needs to be a pointer, not a value. It also looks like you should declare your variable as unit16 instead of uint16_t
In your loop() function, you read the data but you never print it. How do you expect it to show up on the serial monitor? If you want to see it, you need to Serial.print(.....) the data you desire.