Using adafruit-circuitplayground library with arduino nano33 IoT

I recently bought an arduino nano33 IoT and a open-smart 3.0" TFT LCD display.

I have been getting a number of errors related to variables like "wire1" and "A8" not being declared in the scope.

I believe these errors are related to some adafruit libraries not being compatible with the nano 33 IoT. I am open to looking into how to try and get this working but honestly I do not know where to start.

Is anyone able to guide me on how to attempt this task?

  1. Post a link to the actual display that you have bought. e.g. Ebay sale page

  2. Tools->Boards->Board Manager. Check for up to date SAMD core e.g. v1.8.11

  3. Tools->Library Manager. Check for up to date Adafruit libraries

  4. Run all of the relevant examples from Adafruit Circuit Playground library(s)

  5. If you have a problem. Report version numbers. Report example by name. Report problem in English. Attach Error report as a TXT file.

  6. In an ideal world you would open an Issue or PullRequest on GitHub for any genuine library problem.
    But it is probably easier to ask for help here. 95% of the time readers can show you where you have gone wrong. Or investigate on your behalf and possibly do the GitHub Issue/PullRequest.

There are a lot of different Target boards nowadays.
Adafruit is pretty good at keeping up to date with new Boards but sometimes needs some assistance.

I do not own a Nano33 IoT board.

David.

Hey David,

Thanks for replying to my post.

  1. Here's a link to the display I got: Display Link

2&3) I checked both board and library updates as you suggested and there were updates available for both I have updated now.

  1. I ran the adafruit_circuitplayground example and it resulted in the same error, the error text is at the very bottom.

  2. The version number for the adafruit circuit playground library is 1.11.2 and for the SAMD boards is 1.8.11. The name of the example is CircuitPlaygroundFirmata.

I guess it might not be here that I need to report this issue so could you let me know where I should report this?

Error text:

Arduino: 1.8.13 (Windows 10), Board: "Arduino NANO 33 IoT"

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp: In member function 'bool Adafruit_CircuitPlayground::begin(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:75:32: error: 'Wire1' was not declared in this scope

  • lis = Adafruit_CPlay_LIS3DH(&Wire1); // i2c on*

  • ^~~~~*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:75:32: note: suggested alternative: 'Wire'

  • lis = Adafruit_CPlay_LIS3DH(&Wire1); // i2c on*

  • ^~~~~*

  • Wire*

In file included from C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30:0:

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp: In member function 'uint16_t Adafruit_CircuitPlayground::lightSensor()':

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:75:33: error: 'A8' was not declared in this scope

  • #define CPLAY_LIGHTSENSOR A8 ///< light sensor pin*

  • ^*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:253:21: note: in expansion of macro 'CPLAY_LIGHTSENSOR'

  • return analogRead(CPLAY_LIGHTSENSOR);*

  • ^~~~~~~~~~~~~~~~~*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:75:33: note: suggested alternative: 'A7'

  • #define CPLAY_LIGHTSENSOR A8 ///< light sensor pin*

  • ^*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:253:21: note: in expansion of macro 'CPLAY_LIGHTSENSOR'

  • return analogRead(CPLAY_LIGHTSENSOR);*

  • ^~~~~~~~~~~~~~~~~*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp: In member function 'float Adafruit_CircuitPlayground::temperature()':

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:76:33: error: 'A9' was not declared in this scope

  • #define CPLAY_THERMISTORPIN A9 ///< thermistor pin*

  • ^*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:317:24: note: in expansion of macro 'CPLAY_THERMISTORPIN'

  • reading = analogRead(CPLAY_THERMISTORPIN);*

  • ^~~~~~~~~~~~~~~~~~~*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:76:33: note: suggested alternative: 'A7'

  • #define CPLAY_THERMISTORPIN A9 ///< thermistor pin*

  • ^*

C:\Program Files (x86)\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:317:24: note: in expansion of macro 'CPLAY_THERMISTORPIN'

  • reading = analogRead(CPLAY_THERMISTORPIN);*

  • ^~~~~~~~~~~~~~~~~~~*

exit status 1

Error compiling for board Arduino NANO 33 IoT.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This topic was automatically closed after 120 days. New replies are no longer allowed.