mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Moving SPI pin initialization from constructor to begin() function. That way, the SPI library won't alter any pin states unless / until you call begin().
This commit is contained in:
@ -60,6 +60,9 @@ long pressure = 0;
|
||||
long lastReadingTime = 0;
|
||||
|
||||
void setup() {
|
||||
// start the SPI library:
|
||||
SPI.begin();
|
||||
|
||||
// start the Ethernet connection and the server:
|
||||
Ethernet.begin(mac, ip);
|
||||
server.begin();
|
||||
@ -68,8 +71,6 @@ void setup() {
|
||||
pinMode(dataReadyPin, INPUT);
|
||||
pinMode(chipSelectPin, OUTPUT);
|
||||
|
||||
// start the SPI library:
|
||||
SPI.begin();
|
||||
Serial.begin(9600);
|
||||
|
||||
//Configure SCP1000 for low noise configuration:
|
||||
|
Reference in New Issue
Block a user