42. LED toggle using SPI

Establish SPI communication between two microcontrollers, with one acting as the master and the other as the slave.

Connect a push-button switch to the master and an LED to the slave.

Toggle the state of the LED by pressing the push-button switch.

Expected LED Toggling Output:

 

Submit Your Solution

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