Commit 638f6668 authored by Patrick Fenner's avatar Patrick Fenner

added the missing SPI.begin(end)Transaction

parent ee6cc6a9
......@@ -41,11 +41,13 @@ t_SensorData red_peg::ask(sensor_e request, uint8_t _y, uint8_t _m, uint8_t _d,
// send the buffer and receive the incoming
digitalWrite(_ss_pin, LOW);
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
for (uint8_t i=0; i<size_t_SensorData; i++) {
incoming[i] = SPI.transfer(outgoing[i]);
digitalWrite(_ss_pin, HIGH);
// and reply with the return
return response;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment