SPI.h Doesn't Work With Nano BLE 33 · Issue #117 - GitHub
Maybe your like
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} arduino / ArduinoCore-mbed Public 
marcoumlautopened on Jan 13, 2021
- Notifications You must be signed in to change notification settings
- Fork 222
- Star 399
- Code
- Issues 248
- Pull requests 31
- Actions
- Projects 0
- Security 0
- Insights
Description
I've used an Arduino Nano with SPI.h to make a SPI Slave. Now I have the Nano 33 BLE and want to use the same code, but there are Errors when I build the file. Does anyone have an idea what's the issue?
The Code:
#include <SPI.h> volatile byte c; volatile byte command = 0; void setup (void) { // have to send on master in, *slave out* pinMode(MISO, OUTPUT); pinMode(MOSI, INPUT); // turn on SPI in slave mode SPCR |= _BV(SPE); // turn on interrupts SPI.attachInterrupt(); Serial.begin(115200); } // end of setup // SPI interrupt routine ISR (SPI_STC_vect) { c = SPDR; Serial.println(SPDR); //SPDR = 8; } // end of interrupt service routine (ISR) SPI_STC_vect void loop (void) { if (digitalRead (SS) == HIGH) command = 0; } // end of loop The Error: src\main.cpp: In function 'void setup()': src\main.cpp:15:3: error: 'SPCR' was not declared in this scope SPCR |= _BV(SPE); ^~~~ src\main.cpp:15:3: note: suggested alternative: 'SPI' SPCR |= _BV(SPE); ^~~~ SPI src\main.cpp:15:15: error: 'SPE' was not declared in this scope SPCR |= _BV(SPE); ^~~ src\main.cpp:15:15: note: suggested alternative: 'SPI' SPCR |= _BV(SPE); ^~~ SPI src\main.cpp:15:11: error: '_BV' was not declared in this scope SPCR |= _BV(SPE); ^~~ src\main.cpp: At global scope: src\main.cpp:24:5: error: expected constructor, destructor, or type conversion before '(' token ISR (SPI_STC_vect) ^ *** [.pio\build\nano33ble\src\main.cpp.o] Error 1Metadata
Metadata
Assignees
No one assignedLabels
No labelsNo labelsType
No typeProjects
No projectsMilestone
No milestoneRelationships
None yetDevelopment
No branches or pull requestsIssue actions
You can’t perform that action at this time.Tag » Arduino Nano 33 Ble Spi Example
-
SPI On Arduino Nano 33 BLE Sense
-
SPI Slave With The Arduino Nano 33 BLE
-
Nano 33 BLE Sense Cheat Sheet - Arduino Documentation
-
Nano 33 BLE And SPI Stops Loop Running - Arduino Forum
-
Nano 33 BLE Sense - SPI Communication - Glitches On SS
-
Arduino Nano 33 BLE SPI Mode Not Changing
-
Nano 33 BLE SPI Issues - Arduino Forum
-
Arduino Nano 33 Ble — SPICamera Documentation - Arducam
-
SPI Incompatibility With Nrf52840 (Nano 33 BLE And BLE Sense) #242
-
SPI Pins On Arduino Nano 33 BLE Sense - Pinterest
-
Arduino Nano 33 BLE Sense Overview
-
Measure LSM9DS1 Sensor Outputs Using Nano 33 BLE Sense
-
ARDUINO NANO 33 BLE SENSE - Review - Element14 Community