Initial commit
This commit is contained in:
35
examples/helper/scan_spi.cpp
Normal file
35
examples/helper/scan_spi.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <Arduino.h>
|
||||
#include <SPI.h>
|
||||
#include <Wire.h>
|
||||
|
||||
/*
|
||||
Rui Santos
|
||||
Complete project details at https://RandomNerdTutorials.com/esp32-spi-communication-arduino/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
*/
|
||||
|
||||
// Find the default SPI pins for your board
|
||||
// Make sure you have the right board selected in Tools > Boards
|
||||
void setup()
|
||||
{
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(9600);
|
||||
Serial.print("MOSI: ");
|
||||
Serial.println(MOSI);
|
||||
Serial.print("MISO: ");
|
||||
Serial.println(MISO);
|
||||
Serial.print("SCK: ");
|
||||
Serial.println(SCK);
|
||||
Serial.print("SS: ");
|
||||
Serial.println(SS);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// put your main code here, to run repeatedly:
|
||||
}
|
||||
Reference in New Issue
Block a user