Hardware Reference
In-Depth Information
Figure 10-3: Hardware schematic (Image created with Fritzing)
Sketch
Time to get to work! Now that the hardware is complete, it is time to write the
sketch. The sketch will look like that shown in Listing 10-1.
Listing 10-1: Wireless Sensor Sketch (fi lename: Chapter10.ino )
1 #include <WiFi.h>
2 #include <WiFiClient.h>
3
4 const int DHTPin=10;
5 const int LEDPin=13;
6
7 const int MINHumidity=25;
8
9 char ssid[] = "yourNetwork"; // Your network SSID (name)
10 char pass[] = "secretPassword"; // Your network WPA2 password
11 char server[] = "smtp.yourdomain.com"; // Your SMTP server
12
 
Search WWH ::




Custom Search