Hello community,
SPI connection to Kx_134 works on arduino uno but not on arduino nano, what is wrong? I’m using same code:
#include <SPI.h>
#include “SparkFun_Qwiic_KX13X.h”
const int CS = 10;
QwiicKX134 kxAccel;
outputData myData; /
void setup() {
while(!Serial){
delay(50);
}
Serial.begin(115200);
Serial.println(“Welcome.”);
SPI.begin();
pinMode(CS, OUTPUT);
if ( !kxAccel.beginSPI(CS, 8000000, SPI) ){
Serial.println(“Could not communicate with the KX134. Freezing.”);
while(1);
}
else
Serial.println(“Ready.”);
Arduino uno: code runs ok.
Arduino nano: Freezing: could not communicat with the KX134
Arduino nano has a ATmega328P(old bootloader)
Who can help?
Reto