Hi,
I wish to code a program of a master and a slave with I2C.
Procedure(step by step)
- Master - light up LED on pin 13
- Master- sent a 'R' input data to slave
- Slave- receive the data and light up LED on pin 12
- Slave- Once light up, sent 'S' input data back to Master
5)Master- receive the data and switch off LED on pin 13 - Master- Once LED is off, sent a "P" input data back to slave
- Slave- receive the data and light up LED on pin 10 for 3 seconds and than switch off LED on pin 12 and pin 10
- Slave- once done it will sent a "L" input data back to the Master
- Master- received the data and light up LED on pin 13
10)Master- sent a "B" input data to slave - Slave- receive the data and switch on LED on pin 11
- Slave-Once LED is light up, sent 'S' input data back to Master
13)Master- receive the data and switch off LED on pin 13 - Master- Once LED is off, sent a "P" input data back to slave
- Slave- receive the data and light up LED on pin 10 for 3 seconds and than switch off LED on pin 12 and pin 10
- program end
i know its a bit long, may i know how to code this program and if it is possible to code it using I2C.