Created
September 8, 2019 11:15
-
-
Save jancumps/410793d712195463f294c2ff78acb55c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SPI.h> | |
| #include <Ethernet.h> | |
| void setup() { | |
| /* https://www.arduino.cc/en/Guide/MKRETHShield | |
| * As the W5500 and SD card share the SPI bus, | |
| * only one at a time can be active. | |
| * If you are using both peripherals in your program, this should be taken care of by the corresponding libraries. | |
| * If you're not using one of the peripherals in your program, however, you'll need to explicitly deselect it. | |
| * To do this with the SD card, set pin 4 as an output and write a high to it. | |
| * For the W5500, set digital pin 5 as a high output. | |
| */ | |
| pinMode(4, OUTPUT); | |
| digitalWrite(4, HIGH); | |
| Ethernet.init(5); // MKR ETH shield | |
| // .... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment