Skip to content

Commit 309d86c

Browse files
temp fix for initial state of CS pin
1 parent e4f6ac8 commit 309d86c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

examples/StandardFirmataPlus/StandardFirmataPlus.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated October 16th, 2016
23+
Last updated January 7th, 2017
2424
*/
2525

2626
/*
@@ -783,6 +783,7 @@ void systemResetCallback()
783783

784784
servoPinMap[i] = 255;
785785
}
786+
786787
// by default, do not report any analog inputs
787788
analogInputsToReport = 0;
788789

utility/SPIFirmata.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ boolean SPIFirmata::handleSysex(byte command, byte argc, byte *argv)
6363
if (argc > 8) {
6464
mCsPin = argv[8];
6565
pinMode(mCsPin, OUTPUT);
66+
// TODO - need to know if the device is active LOW or active HIGH at this time.
67+
digitalWrite(mCsPin, HIGH);
68+
6669
// protect the CS pin
6770
// TODO - decide if this is the best approach. If PIN_MODE_SPI is set, the user cannot
6871
// manually control the CS pin using DIGITAL_MESSAGE.
6972
Firmata.setPinMode(mCsPin, PIN_MODE_SPI);
7073
}
74+
7175
SPISettings settings(clockSpeed, getBitOrder(bitOrder), getDataMode(dataMode));
7276
SPI.beginTransaction(settings);
7377
break;

0 commit comments

Comments
 (0)