/*
  Wokwi Custom SPI Chip example

  The chip implements a simple ROT13 letter substitution cipher:
  https://en.wikipedia.org/wiki/ROT13

  See https://docs.wokwi.com/chips-api/getting-started for more info about custom chips
*/

#include <SPI.h>

#define CS 10

void setup() {
  char buffer[] = "Uryyb, FCV! ";

  Serial.begin(115200);
  pinMode(CS, OUTPUT);

  // SPI Transaction: sends the contents of buffer, and overwrites it with the received data.
  digitalWrite(CS, LOW);
  SPI.begin();
  SPI.transfer(buffer, strlen(buffer));
  SPI.end();
  digitalWrite(CS, HIGH);

  Serial.println("Data received from SPI device:");
  Serial.println(buffer);
}

void loop() {
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
SPI ExampleBreakout
chip1:SCK
chip1:MISO
chip1:MOSI
chip1:CS
chip1:GND
chip1:VCC