1
0
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:
David A. Mellis
2010-08-07 21:24:49 +00:00
parent 08feacbb40
commit b89d8a9c11
5 changed files with 20 additions and 23 deletions

View File

@ -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: