|
14 | 14 | *
|
15 | 15 | * The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program.
|
16 | 16 | *
|
17 |
| - * COMPILING ENC28J60 |
| 17 | + * |
| 18 | + * COMPILING WIZNET (W5100) ETHERNET MODULE |
| 19 | + * > Edit RF24_config.h in (libraries\MySensors\utility) to enable softspi (remove // before "#define SOFTSPI"). |
| 20 | + * |
| 21 | + * COMPILING ENC28J60 ETHERNET MODULE |
18 | 22 | * > Use Arduino IDE 1.5.7 (or later)
|
19 | 23 | * > Disable DEBUG in Sensor.h before compiling this sketch. Othervise the sketch will probably not fit in program space when downloading.
|
20 |
| - * > Remove Ethernet.h include below and inlcude UIPEthernet.h |
21 |
| - * COMPILING WizNET (W5100) |
22 |
| - * > Remove UIPEthernet include below and include Ethernet.h. |
| 24 | + * > Remove Ethernet.h include below and include UIPEthernet.h |
| 25 | + * > Remove DigitalIO include |
| 26 | + * Note that I had to disable UDP and DHCP support in uipethernet-conf.h to reduce space. (which means you have to choose a static IP for that module) |
23 | 27 | *
|
24 |
| - * Note that I had to disable UDP and DHCP support in uipethernet-conf.h to reduce space. (which meas you ave to choose a static IP for that module) |
25 |
| -
|
26 | 28 | * VERA CONFIGURATION:
|
27 | 29 | * Enter "ip-number:port" in the ip-field of the Arduino GW device. This will temporarily override any serial configuration for the Vera plugin.
|
28 | 30 | * E.g. If you want to use the defualt values in this sketch enter: 192.168.178.66:5003
|
|
32 | 34 | * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
|
33 | 35 | * - ERR (red) - fast blink on error during transmission error or recieve crc error
|
34 | 36 | *
|
35 |
| - * ----------- Connection guide --------------------------------------------------------------------------- |
36 |
| - * 13 Radio & Ethernet SPI SCK |
37 |
| - * 12 Radio & Ethernet SPI MISO (SO) |
38 |
| - * 11 Radio & Ethernet SPI MOSI (SI) |
39 |
| - * 10 Ethernet SPI Slave Select (CS) Pin 10, the SS pin, must be an o/p to put SPI in master mode |
40 |
| - * 9 Radio TX LED using on board LED (optional) +5V -> LED -> 270-330 Ohm resistor -> pin 9. |
41 |
| - * 8 Radio RX LED (optional) +5V -> LED -> 270-330 Ohm resistor -> pin 8. |
42 |
| - * 7 Radio error LED (optional) +5V -> LED -> 270-330 Ohm resistor -> pin 7. |
43 |
| - * 6 Radio SPI Slave Select |
44 |
| - * 5 Radio Chip Enable |
45 |
| - * 3 Inclusion mode button (optional), 10K pull down to GND, button to VCC) |
46 |
| - * 2 Radio IRQ pin (optional), W5100 Int, if linked to pin 2) |
47 |
| - * ----------------------------------------------------------------------------------------------------------- |
48 |
| - * Powering: both NRF24l01 radio and Ethernet(ENC28J60) uses 3.3V |
| 37 | + * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions. |
| 38 | + * |
49 | 39 | */
|
50 | 40 |
|
| 41 | +#include <DigitalIO.h> // This include can be removed when using UIPEthernet module |
51 | 42 | #include <SPI.h>
|
52 | 43 | #include <MySensor.h>
|
53 | 44 | #include <MyGateway.h>
|
54 | 45 | #include <stdarg.h>
|
55 | 46 |
|
56 | 47 | // Use this if you have attached a Ethernet ENC28J60 shields
|
57 |
| -#include <UIPEthernet.h> |
| 48 | +//#include <UIPEthernet.h> |
58 | 49 |
|
59 |
| -// Use this fo WizNET module and Arduino Ethernet Shield |
60 |
| -//#include <Ethernet.h> |
| 50 | +// Use this fo WizNET W5100 module and Arduino Ethernet Shield |
| 51 | +#include <Ethernet.h> |
61 | 52 |
|
62 | 53 |
|
63 | 54 | #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
|
|
0 commit comments