Hi ,@dychen24, thanks for sharing this awsome work:-)
As you can see, we build the PCB board and we want to make it work ,when we fllowed the instruction of the web:
https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/arduino-bsp-setup
and we replaced the liabary of Adafruit_MLX90393(version2.0.0) with your Codes it seems when we compiled with this staff ,it come out with the fllowing errors : can you help with us :-) ,hava a nice day :-)
Arduino: 1.8.19 (Linux), Board: "Adafruit Feather nRF52832, S132 6.1.1, Level 0 (Release), Serial"
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp: In member function 'bool Adafruit_MLX90393::writeRegister(uint8_t, uint16_t)':
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:392:25: warning: narrowing conversion of '(((int)data) >> 8)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]
392 | data >> 8, // high byte
| ~^~~~
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:393:25: warning: narrowing conversion of '(int)(((short unsigned int)((int)data)) & 255)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]
393 | data & 0xFF, // low byte
| ~^~
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:394:24: warning: narrowing conversion of '(((int)reg) << 2)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]
394 | reg << 2}; // the register itself, shift up by 2 bits!
| ~~^~
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp: In member function 'bool Adafruit_MLX90393::readRegister(uint8_t, uint16_t*)':
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:402:24: warning: narrowing conversion of '(((int)reg) << 2)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]
402 | reg << 2}; // the register itself, shift up by 2 bits!
| ~~^~
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp: In member function 'mlx90393_resolution Adafruit_MLX90393::getResolution(mlx90393_axis)':
/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:235:1: error: control reaches end of non-void function [-Werror=return-type]
235 | }
| ^
cc1plus: some warnings being treated as errors
exit status 1
Error compiling for board Adafruit Feather nRF52832.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Hi ,@dychen24, thanks for sharing this awsome work:-) As you can see, we build the PCB board and we want to make it work ,when we fllowed the instruction of the web: https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/arduino-bsp-setup and we replaced the liabary of Adafruit_MLX90393(version2.0.0) with your Codes it seems when we compiled with this staff ,it come out with the fllowing errors : can you help with us :-) ,hava a nice day :-)
Arduino: 1.8.19 (Linux), Board: "Adafruit Feather nRF52832, S132 6.1.1, Level 0 (Release), Serial" /home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp: In member function 'bool Adafruit_MLX90393::writeRegister(uint8_t, uint16_t)': /home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:392:25: warning: narrowing conversion of '(((int)data) >> 8)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing] 392 | data >> 8, // high byte |
~^~~~ /home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:393:25: warning: narrowing conversion of '(int)(((short unsigned int)((int)data)) & 255)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing] 393 | data & 0xFF, // low byte |~^~/home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:394:24: warning: narrowing conversion of '(((int)reg) << 2)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing] 394 | reg << 2}; // the register itself, shift up by 2 bits! |~~^~ /home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp: In member function 'bool Adafruit_MLX90393::readRegister(uint8_t, uint16_t*)': /home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:402:24: warning: narrowing conversion of '(((int)reg) << 2)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing] 402 | reg << 2}; // the register itself, shift up by 2 bits! |~~^~ /home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp: In member function 'mlx90393_resolution Adafruit_MLX90393::getResolution(mlx90393_axis)': /home/gaofei/Arduino/libraries/Adafruit_MLX90393/Adafruit_MLX90393.cpp:235:1: error: control reaches end of non-void function [-Werror=return-type] 235 | } | ^ cc1plus: some warnings being treated as errors exit status 1 Error compiling for board Adafruit Feather nRF52832.This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.