Arduino master to Malduino Elite Slave SPI

For my project i am using a malduino with SD-Card, as well as an arduino. i have hooked up the arduino to the malduino SPI interface. (MISO -> MISO, MOSI->MOSI, SCK->SCK, GND->GND).
when i am sending messages from malduino to arduino the messages arrive without any problem.
for my project i need communication the other way, and this does not seem to work.

i have attached the code i used to send, as well as the code i used to read the messages.

this exact code worked to send messages from the malduino to the arduino.

Arduino_SPI_Master.ino (824 Bytes)

Malduino_Read_Code.ino (965 Bytes)

(MISO -> MISO, MOSI->MOSI, SCK->SCK, GND->GND).

I'm missing a connection to the SS pin.

char buf [100];

The buf variable should be declared volatile.

  digitalWrite(SS, HIGH);  // ensure SS stays high for now

I'm missing code that sets SS as an output.

  delay (100);  // 1 seconds delay

Comments shouldn't be misleading.

the SS pin is set to output in SPI.begin, i have a method call in my setup.
i forgot to do this in my malduino code tho, so i will edit this, thanks

source code for the spi library is available at : SPI/SPI.cpp at master · PaulStoffregen/SPI · GitHub

the malduino does not have an SS pin, therefore i could not connect it.
i have attached an image with the malduino pin schematic.

you are correct in the comments concerning my code, and i will improve on them, thanks for that feedback

unfortunately i still have not figured out how to set up communication from malduino to arduino

the malduino does not have an SS pin, therefore i could not connect it.

Unfortunately that does mean it cannot be SPI slave. The SPI hardware is activated by the SS pin going low, if that doesn't happen the hardware won't receive anything. The schematics on the web page are wrong (SS is connected to MISO there). Why are you using such hardware for the task?

i dont believe the schematics are wrong, i sent a mail to the creator of the malduino and he confirmed the schematics as they are in that picture. but thanks for letting me know this method won't work. i will try something else :slight_smile: