Monitoring temperature, humidity, and light using Node.js with Arduino Ethernet
In the preceding section, we showed how to monitor our Arduino via Wi-Fi using the CC3000 module; now we will use another important module: Ethernet Shield. The hardware connection of the part is similar to the following image:

Code for the application of the Arduino Ethernet shield
You can now either copy the code inside a file called Monitor_Ethernet.ino
, or just get the complete code from the folder for this project; you need to use the Arduino IDE.
The following are the libraries included in the program:
#include <SPI.h> #include <Ethernet.h> #include <aREST.h> #include <avr/wdt.h>
Include the library for the DHT11 sensor:
#include "DHT.h"
We define the pins for the temperature and humidity sensor:
#define DHTPIN 7 #define DHTTYPE DHT11
We have the instance of the sensor:
DHT dht(DHTPIN, DHTTYPE);
We register the MAC address for the device...