43. Multi-Master SPI Communication

Set up an SPI communication between two microcontrollers acting as two masters and an SD card as a slave, where:

Master 1

Two push-button switches are connected:

  • Pressing Button 1 will increment and update the counter value in the SD card.
  • Pressing Button 2 will reset the count to 0 and save it on the SD card.


Master 2

One push-button switch is connected:

  • Pressing it will read the counter value from the SD card
  • And display the counter value on the serial terminal (e.g., Putty, Arduino IDE)


Ensure proper SPI communication, SD card handling, button debouncing, and log all actions on the serial terminal (e.g., Putty, Arduino IDE)

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!