anklimov / lighthub

Flexible, Arduino Mega/Due/ESP8266/ESP32/STM32 based SmartHome controller with DMX-512 in/out, 1-Wire, Modbus, MQTT interfaces. OpenHab/HomeAssistant/ioBroker compatible.
https://lazyhome.ru
Apache License 2.0
97 stars 23 forks source link

Add configuration for CS pin for Ethernet W5500 #28

Closed MykhailoKh closed 6 years ago

MykhailoKh commented 6 years ago

Ethernet2 library for W5100/W5500 use pin 10 as SPI CS. If you compare Arduino Uno (http://forum.arduino.cc/index.php/topic,84190.0.html) and Arduino Mega (https://forum.arduino.cc/index.php?topic=125908.0) pinouts then you can see thas 10 is Uno CS pin but for Mega use 53. This merge request add flag which allows to configure pin 53 as CS for Mega board.

anklimov commented 6 years ago

I've never seen Ethernet shield (5100 based nor 5500 based) where pin 53 used as CS (pin 53 usually using as CS to re-program Mega itself by external programmer) But, I agree, this configuration might be useful for further changes in Lighthub shield to release pin 10 for another usage