Skip to content

Commit ebc77f9

Browse files
removed unnecessary code and added D24 to Leonardo ignore list
1 parent a0dc3e0 commit ebc77f9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

examples/StandardFirmataEthernet/StandardFirmataEthernet.ino

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@
3535
3636
Follow the instructions in the NETWORK CONFIGURATION section below to
3737
configure your particular hardware.
38+
39+
NOTE: If you are using an Arduino Ethernet shield you cannot use the following pins on
40+
the following boards. Firmata will ignore any requests to use these pins:
41+
42+
- Arduino Uno or other ATMega328 boards: (D4, D10, D11, D12, D13)
43+
- Arduino Mega: (D4, D10, D50, D51, D52, D53)
44+
- Arduino Leonardo: (D4, D10)
45+
- Arduino Due: (D4, D10)
3846
*/
3947

4048
#include <Servo.h>
@@ -784,7 +792,6 @@ void setup()
784792
#endif
785793
#endif
786794

787-
delay(1000); // TODO: determine if this delay is necessary and if so how short it can be
788795
DEBUG_PRINTLN("connecting...");
789796

790797
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
@@ -807,7 +814,8 @@ void setup()
807814
|| 4 == i // SD-Card on Ethernet-shiedl uses pin 4 for SS
808815
|| 10 == i // Ethernet-shield uses pin 10 for SS
809816
#if defined(__AVR_ATmega32U4__)
810-
|| 28 == i // On Leonardo, pin 28 is A10 which maps to D10
817+
|| 24 == i // On Leonardo, pin 24 maps to D4 and pin 28 maps to D10
818+
|| 28 == i
811819
#endif
812820
) {
813821
pinConfig[i] = IGNORE;
@@ -819,7 +827,6 @@ void setup()
819827
digitalWrite(PIN_TO_DIGITAL(4), HIGH); // SS is active low;
820828

821829
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
822-
setPinModeCallback(53, IGNORE); // on MEGA as 53 is hardware SS
823830
pinMode(PIN_TO_DIGITAL(53), OUTPUT); // configure hardware SS as output on MEGA
824831
#endif
825832

0 commit comments

Comments
 (0)