Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 20, 2019 6:57 pm

I will give that a try.

I don't HAVE to use a Nano 33 BLE, but I am making a project in which I want to include:

5 color OLED 0.96" displays
Bluetooth Classic
and a Tilt sensor (IMU)

The Nano 33 BLE has both old and new Bluetooth plus a tilt sensor embedded, leaving lots of IO pins to connect up the screens. Each display takes two dedicated pins, and SPI takes another 4 pins, plus the SD reader takes another pin, so that's 15 IO pins to get the displays and SD working!

Then, an external Bluetooth takes at minimum 2 pins, and an IMU another 2 at least. So, 19 pins total, but the new Nano saves me 4 pins as the BT and IMU are internal.

I did try using an ItsyBitsy M0, but simply could not figure out how to get a second Serial object running on it. I need Serial0 for USB comm back to the Arduino IDE (running on IO pins 0 and 1, Rx and Tx), and a second Serial1 to connect a Bluetooth module, but the instructions I tried to follow in the Adafruit website for adding a 2nd Serial object just didn't work for me (I can't seem to locate the URL for the page with the instructions about creating extra Serial ports on the ItsyBitsy). I checked on the forums here and couldn't find an answer. If you wouldn't mind, I'd like to upload a sketch that attempts to set up two serial objects, but just doesn't seem to work. I just need help getting the second Serial working and then can go back to the ItsyBitsy. I have a Bluetooth module that connect fine to a smartphone and seems connected correctly to the ItsyBitsy M0, but just doesn't seem to send a receive any data.

Thanks much!

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by adafruit2 on Wed Nov 20, 2019 7:06 pm

FYI, https://store.arduino.cc/usa/nano-33-ble does not contain bluetooth classic ("old" Bluetooth) - its BT LE only

adafruit2
Site Admin
 
Posts: 19221
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 20, 2019 9:50 pm

According to this page: https://www.arduino.cc/en/Reference/ArduinoBLE the Nano 33 BLE supports Bluetooth 4.0, which includes the "classic" mode, and obviously the newer BLE 5.0 spec.

I guess the only way to prove this actually works in "classic" mode is for me to test it. Will try to get results back tonight if I can.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by adafruit2 on Wed Nov 20, 2019 10:22 pm

i'm pretty sure that's a typo. the nrf52840 chip does not support classic
https://devzone.nordicsemi.com/f/nordic ... h-nrf52840

adafruit2
Site Admin
 
Posts: 19221
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by jdbock on Sun Mar 15, 2020 8:38 pm

This post was useful to help get the bmp loading working on the Nano, but the attached code needed an update.

The bmpDraw function needs to be updated to what's in the latest <Adafruit_GFX.h> library.

So this code:

// Convert pixel from BMP to TFT format, push to display
b = sdbuffer[buffidx++];
g = sdbuffer[buffidx++];
r = sdbuffer[buffidx++];
tft.writePixel(tft.color565(r,g,b));

Needs to add the x,y location on the screen....

// Convert pixel from BMP to CScreen format, push to display
b = sdbuffer[buffidx++];
g = sdbuffer[buffidx++];
r = sdbuffer[buffidx++];
tft.writePixel (col,row,CScreen.color565(r,g,b));

With this change, you don't need the imagereader library to get a bmp loaded from the SD card to the TFT.

jdbock
 
Posts: 8
Joined: Thu Feb 27, 2020 12:22 am

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by jdbock on Tue Mar 17, 2020 6:12 pm

Forgot to add the link from previously in the thread. The bmp code was taken from here

https://github.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino/blob/b483d4126df0d4efd2defa49cf9b8e5818418bf0/examples/bmp/bmp.ino

and modified per the instructions I show above.

jdbock
 
Posts: 8
Joined: Thu Feb 27, 2020 12:22 am

Please be positive and constructive with your questions and comments.