summaryrefslogtreecommitdiff
path: root/spi_comm/arduino_slave_write/arduino_slave_write.ino
diff options
context:
space:
mode:
Diffstat (limited to 'spi_comm/arduino_slave_write/arduino_slave_write.ino')
-rw-r--r--spi_comm/arduino_slave_write/arduino_slave_write.ino34
1 files changed, 0 insertions, 34 deletions
diff --git a/spi_comm/arduino_slave_write/arduino_slave_write.ino b/spi_comm/arduino_slave_write/arduino_slave_write.ino
deleted file mode 100644
index d6f838f..0000000
--- a/spi_comm/arduino_slave_write/arduino_slave_write.ino
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <SPI.h>
-
-int x;
-long randNumber;
-
-
-volatile boolean received;
-volatile byte Slavereceived,Slavesend;
-
-void setup() {
- Serial.begin(115200);
- randomSeed(analogRead(0));
-
- pinMode(MISO,OUTPUT);
- SPCR |= _BV(SPE);
- received = false;
- SPI.attachInterrupt();
-
-}
-
-ISR (SPI_STC_vect){
- Slavereceived = SPDR;
- received = true;
-}
-
-void loop() {
- // put your main code here, to run repeatedly:
- randNumber = random(0, 1);
- Serial.println(randNumber);
- Slavesend=randNumber;
- SPDR = Slavesend;
- delay(1000);
-
-}