0

Proximity Trinkey - Arduino APDS9960 library
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Proximity Trinkey - Arduino APDS9960 library

by fooman on Fri Sep 24, 2021 5:31 pm

Hello,
I got a prox trinkey and trying to use the prox sensor library in Ardunio. I've installed "Adafruit ADPS9960 Library" v1.2.2 and its dependencies.

Then I created a new example project based on the examples provided for the library "proximity_sensor" , selected the board "Adafruit ProxLight Trinkey (SAMD21)" in arduino , compile but getting the following error.

---
C:\Users\someone\AppData\Local\Temp\arduino_build_902143\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp.o
In file included from C:\Users\someone\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
C:\Users\someone\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h:68:72: error: 'SPI' was not declared in this scope; did you mean 'PI'?
68 | uint8_t dataMode = SPI_MODE0, SPIClass *theSPI = &SPI);
| ^~~
| PI
--

If I change the board to "Trinket M0" there are no compile errors. but things don't execute correctly once bits are uploaded, not even Serial.print's, I imagine pin CONSTs might be different between boards.

Any pointers/recommendations on what files i'd need to check or modify to add the new prox Trinkey to declare those missing SPI classes /constants ?

Thanks

fooman
 
Posts: 1
Joined: Fri Sep 24, 2021 5:14 pm

Please be positive and constructive with your questions and comments.