SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
www.researchdesignlab.com Page 1
WEB SHIELD
INTERNET OF THINGSREV1.0
INTERNET OF THINGS (IoT)
WEB SHIELD
SMART INTERNET APPLICATION
DEVELOPMENT KIT
www.researchdesignlab.com Page 2
WEB SHIELD
INTERNET OF THINGSREV1.0
Contents
OVERVIEW ................................................................................................................................... 3
INTERNET OF THINGS (IoT).................................................................................................. 3
FEATURES: ................................................................................................................................... 4
Ethernet Controller (ENC28J60) .................................................................................................... 4
CIRCUIT DIAGRAM .................................................................................................................... 5
SCHEMATIC OF WEB SHIELD .................................................................................................. 6
INTERNAL CONNECTION OF WEBSHIELD WITH UNO BOARD ...................................... 7
INTERNAL CONNECTIONS OF XBEE WITH WEBSHIELD .................................................. 8
XBEE – WEBSHIELD................................................................................................................... 9
MODULE SETUP ........................................................................................................................ 10
SCREENSHOTS........................................................................................................................... 11
Code:............................................................................................................................................. 12
To control onboard relay and to display analog pin values in web browser............................. 12
www.researchdesignlab.com Page 3
WEB SHIELD
INTERNET OF THINGSREV1.0
OVERVIEW
INTERNET OF THINGS (IoT)
The Internet of Things (IoT) is the interconnection of uniquely identifiable embedded
computing devices within the existing Internet infrastructure.
Ethernet Web shield is a smart communication shield for controlling and monitoring
embedded application via internet. Internet is the media and economic way for communication
between anywhere from to geographical location. This shield is compatible with Arduino open
source and make easy way for customized application development. This shield has got four
relay 10AMP.The board by ULN2003 IC. The board works on 5V.
www.researchdesignlab.com Page 4
WEB SHIELD
INTERNET OF THINGSREV1.0
FEATURES:
1. IEEE 802.3 compatible.
2. Supports Full and Half-Duplex modes.
3. Integrated MAC and 10Base-T PHY
4. SPI Interface with Clock Speeds Up to 20 MHz.
5. With this Ethernet Shield, your Arduino board can be connected to internet.
6. Stackable by accepting prototype shield or any other boards with Arduino compatible
interface.
7. LED indication for relay & power supply.
8. Design based on highly proven IC ULN2803 as driver.
9. DC-DC Converter.
Ethernet Controller (ENC28J60)
The Ethernet Controller (ENC28J60) is a so called SPI device and uses the SPI pins (10, 11, 12,
13) of your Arduino.
 SS stands for Slave Select, used to enable or disable the slave device (the Ethernet
module in this case).
 MOSI stands for Master Output Slave Input, or in other words: Arduino OUTPUT (data
from Arduino to Ethernet Controller).
 MISO stands for the opposite, Master Input Slave Output, or: Arduino INPUT (data from
Ethernet Controller to Arduino).
 SCK is the clock used for SPI timing.
www.researchdesignlab.com Page 5
WEB SHIELD
INTERNET OF THINGSREV1.0
CIRCUIT DIAGRAM
www.researchdesignlab.com Page 6
WEB SHIELD
INTERNET OF THINGSREV1.0
SCHEMATIC OF WEB SHIELD
www.researchdesignlab.com Page 7
WEB SHIELD
INTERNET OF THINGSREV1.0
INTERNAL CONNECTION OF WEBSHIELD WITH UNO BOARD
www.researchdesignlab.com Page 8
WEB SHIELD
INTERNET OF THINGSREV1.0
INTERNAL CONNECTIONS OF XBEE WITH WEBSHIELD
www.researchdesignlab.com Page 9
WEB SHIELD
INTERNET OF THINGSREV1.0
XBEE – WEBSHIELD
www.researchdesignlab.com Page 10
WEB SHIELD
INTERNET OF THINGSREV1.0
MODULE SETUP
step 1 :Download - ETHER_28J60 and Ethershield libraries from Github.com
https://github.com/muanis/arduino-projects/tree/master/libraries
step 2 : Import ETHER_28J60 and Ethershield libraries into the Arduino1.0.6 .
step 3: Connect UNO board to PC then compile and dump the code (given in code section of
this document)to Arduino board before mounting web shield.
step 4: Mount Arduino onto web shield ,connect 12 V DC power supply to web shield.
step 5: Connect PC and web shield with Ethernet cable for direct control(local LAN network ).
or
Connect web shield to the router through Ethernet cable(internet)
*the IP address and port used in the code for web shield should be port forwarded in the
router so as to make it online accessible.
step 6: Enter IP address(Ex: http://192.168.1.15) into the browser specified in the code and
enter.(to follow up refer screen shots)(**this holds good for local LAN control )
Or
Port forward 192.168.1.15:80 IP in your respective router settings so that Webshield will
be accessed online
Note : *need to have to Dynamic DNS and port forwarding knowledge to access
through internet.
*if one has dedicated IP/ VPN owned, they can directly access within their private
network.
step 7 :after port forwarding, use “internet IP”(static/public IP Address) to access web shield
online.
www.researchdesignlab.com Page 11
WEB SHIELD
INTERNET OF THINGSREV1.0
SCREENSHOTS
www.researchdesignlab.com Page 12
WEB SHIELD
INTERNET OF THINGSREV1.0
Code:
To control onboard relay and to display analog pin values in web browser
#include "etherShield.h"
#include "ETHER_28J60.h"
static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24};
static uint8_t ip[4] = {192, 168, 1, 15}; // the IP address for your board. Check your home hub
// to find an IP address not in use and pick that
int outputPin1 = 2;
int outputPin2 = 3;
int outputPin3 = 4;
int outputPin4 = 5; // this or 10.0.0.15 are likely formats for an address
// that will work.
static uint16_t port = 80; // Use port 80 - the standard for HTTP
ETHER_28J60 e;
char flag1=0,flag2=0,flag3=0,flag4=0;
void setup()
{
e.setup(mac, ip, port);
pinMode(outputPin1, OUTPUT);
pinMode(outputPin2, OUTPUT);
pinMode(outputPin3, OUTPUT);
pinMode(outputPin4, OUTPUT);
}
void loop()
{
char *params;
if (params = e.serviceRequest())
{
e.print("<A HREF='?c'>ANALOG VALUES</A></BR>");
e.print("<A HREF='?cmd1=off'>REMOTE RELAY CONTROL</A></BR>");
if (strcmp(params, "?c") == 0)
{
analog();
}
e.print("<H1> </H1><br/>");
if (strcmp(params, "?cmd1=on") == 0)
{
digitalWrite(outputPin1, HIGH);
www.researchdesignlab.com Page 13
WEB SHIELD
INTERNET OF THINGSREV1.0
flag1=1;
display();
}
else if (strcmp(params, "?cmd1=off") == 0) // Modified -- 2011 12 15 # Ben Schueler
{
digitalWrite(outputPin1, LOW);
flag1=0;
display();
}
if (strcmp(params, "?cmd2=on") == 0)
{
digitalWrite(outputPin2, HIGH);
flag2=1;
display();
}
else if (strcmp(params, "?cmd2=off") == 0) // Modified -- 2011 12 15 # Ben Schueler
{
digitalWrite(outputPin2, LOW);
flag2=0;
display();
}
if (strcmp(params, "?cmd3=on") == 0)
{
digitalWrite(outputPin3, HIGH);
flag3=1;
display();
}
else if (strcmp(params, "?cmd3=off") == 0) // Modified -- 2011 12 15 # Ben Schueler
{
digitalWrite(outputPin3, LOW);
flag3=0;
display();
}
if (strcmp(params, "?cmd4=on") == 0)
{
digitalWrite(outputPin4, HIGH);
flag4=1;
display();
}
else if (strcmp(params, "?cmd4=off") == 0) // Modified -- 2011 12 15 # Ben Schueler
{
digitalWrite(outputPin4, LOW);
flag4=0;
display();
}
www.researchdesignlab.com Page 14
WEB SHIELD
INTERNET OF THINGSREV1.0
e.respond();
}
delay(100);
}
void analog()
{
e.print("<H1>Analog Values</H1><br/><table>");
e.print("<tr><th>Input</th><th>Value</th></tr>");
for (int i = 0; i < 6; i++)
{
e.print("<tr><td>"); e.print(i); e.print("</td><td>"); e.print(analogRead(i));
e.print("</td></tr>");
}
e.print("</table>");
}
void display()
{
if(flag1==0)
e.print("<A HREF='?cmd1=on'>RELAY1 ON</A></BR>");
else
e.print("<A HREF='?cmd1=off'>RELAY1 OFF</A></BR>");
if(flag2==0)
e.print("<A HREF='?cmd2=on'>RELAY2 ON</A></BR>");
else
e.print("<A HREF='?cmd2=off'>RELAY2 OFF</A></BR>");
if(flag3==0)
e.print("<A HREF='?cmd3=on'>RELAY3 ON</A></BR>");
else
e.print("<A HREF='?cmd3=off'>RELAY3 OFF</A></BR>");
if(flag4==0)
e.print("<A HREF='?cmd4=on'>RELAY4 ON</A></BR>");
else
e.print("<A HREF='?cmd4=off'>RELAY4 OFF</A></BR>");
}

Contenu connexe

Tendances

Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kitResearch Design Lab
 
How to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDEHow to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDENaoto MATSUMOTO
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BJingfeng Liu
 
Attendance System using ESP8266(Wi-Fi) with MySQL
Attendance System using ESP8266(Wi-Fi) with MySQLAttendance System using ESP8266(Wi-Fi) with MySQL
Attendance System using ESP8266(Wi-Fi) with MySQLSanjay Kumar
 
Scada Strangelove - 29c3
Scada Strangelove - 29c3Scada Strangelove - 29c3
Scada Strangelove - 29c3qqlan
 
IoThings you don't even need to hack
IoThings you don't even need to hackIoThings you don't even need to hack
IoThings you don't even need to hackSlawomir Jasek
 
Arduino 習作工坊 - Lesson 1 燈光之夜
Arduino 習作工坊 - Lesson 1 燈光之夜Arduino 習作工坊 - Lesson 1 燈光之夜
Arduino 習作工坊 - Lesson 1 燈光之夜CAVEDU Education
 
[5]投影片 futurewad樹莓派研習會 141218
[5]投影片 futurewad樹莓派研習會 141218[5]投影片 futurewad樹莓派研習會 141218
[5]投影片 futurewad樹莓派研習會 141218CAVEDU Education
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummiesPavlos Isaris
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsSlawomir Jasek
 
The Arduino WiFi Shield
The Arduino WiFi ShieldThe Arduino WiFi Shield
The Arduino WiFi Shieldkellison00
 
Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)Elaf A.Saeed
 
lesson2 - Nodemcu course - NodeMCU dev Board
 lesson2 - Nodemcu course - NodeMCU dev Board lesson2 - Nodemcu course - NodeMCU dev Board
lesson2 - Nodemcu course - NodeMCU dev BoardElaf A.Saeed
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCUroadster43
 

Tendances (20)

Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kit
 
How to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDEHow to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDE
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Attendance System using ESP8266(Wi-Fi) with MySQL
Attendance System using ESP8266(Wi-Fi) with MySQLAttendance System using ESP8266(Wi-Fi) with MySQL
Attendance System using ESP8266(Wi-Fi) with MySQL
 
Scada Strangelove - 29c3
Scada Strangelove - 29c3Scada Strangelove - 29c3
Scada Strangelove - 29c3
 
IoThings you don't even need to hack
IoThings you don't even need to hackIoThings you don't even need to hack
IoThings you don't even need to hack
 
Espressif Introduction
Espressif IntroductionEspressif Introduction
Espressif Introduction
 
Arduino 習作工坊 - Lesson 1 燈光之夜
Arduino 習作工坊 - Lesson 1 燈光之夜Arduino 習作工坊 - Lesson 1 燈光之夜
Arduino 習作工坊 - Lesson 1 燈光之夜
 
[5]投影片 futurewad樹莓派研習會 141218
[5]投影片 futurewad樹莓派研習會 141218[5]投影片 futurewad樹莓派研習會 141218
[5]投影片 futurewad樹莓派研習會 141218
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummies
 
Arduino & NodeMcu
Arduino & NodeMcuArduino & NodeMcu
Arduino & NodeMcu
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocols
 
The Arduino WiFi Shield
The Arduino WiFi ShieldThe Arduino WiFi Shield
The Arduino WiFi Shield
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
NodeMCU 0.9 Manual using Arduino IDE
NodeMCU 0.9 Manual using Arduino IDENodeMCU 0.9 Manual using Arduino IDE
NodeMCU 0.9 Manual using Arduino IDE
 
Intel Curie Presentation
Intel Curie PresentationIntel Curie Presentation
Intel Curie Presentation
 
Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)
 
lesson2 - Nodemcu course - NodeMCU dev Board
 lesson2 - Nodemcu course - NodeMCU dev Board lesson2 - Nodemcu course - NodeMCU dev Board
lesson2 - Nodemcu course - NodeMCU dev Board
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
 
IoT on Raspberry Pi
IoT on Raspberry PiIoT on Raspberry Pi
IoT on Raspberry Pi
 

En vedette

Toward io t application markets
Toward io t application marketsToward io t application markets
Toward io t application marketsDejan Munjin
 
Inventit service sync internet-of-things m2m application enablement platform
Inventit service sync internet-of-things m2m application enablement platformInventit service sync internet-of-things m2m application enablement platform
Inventit service sync internet-of-things m2m application enablement platformtaknishida
 
EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...
EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...
EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...Dell Technologies
 
Simplify Internet of Things with an Intelligent Gateway
Simplify Internet of Things with an Intelligent GatewaySimplify Internet of Things with an Intelligent Gateway
Simplify Internet of Things with an Intelligent GatewayEurotech
 
Internet of things (IoT)
Internet of things (IoT)Internet of things (IoT)
Internet of things (IoT)Ankur Pipara
 
THE INTERNET OF THINGS
THE INTERNET OF THINGSTHE INTERNET OF THINGS
THE INTERNET OF THINGSRamana Reddy
 
What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?Dr. Mazlan Abbas
 
Internet of Things and its applications
Internet of Things and its applicationsInternet of Things and its applications
Internet of Things and its applicationsPasquale Puzio
 
IoT - IT 423 ppt
IoT - IT 423 pptIoT - IT 423 ppt
IoT - IT 423 pptMhae Lyn
 
Internet of Things (IoT) - We Are at the Tip of An Iceberg
Internet of Things (IoT) - We Are at the Tip of An IcebergInternet of Things (IoT) - We Are at the Tip of An Iceberg
Internet of Things (IoT) - We Are at the Tip of An IcebergDr. Mazlan Abbas
 

En vedette (13)

Toward io t application markets
Toward io t application marketsToward io t application markets
Toward io t application markets
 
Inventit service sync internet-of-things m2m application enablement platform
Inventit service sync internet-of-things m2m application enablement platformInventit service sync internet-of-things m2m application enablement platform
Inventit service sync internet-of-things m2m application enablement platform
 
EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...
EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...
EMC Solutions for the Internet of Things and Industrie 4.0 - Platforms (EN) <...
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
Webinar- Internet of Things: Application Frameworks in IoT
Webinar- Internet of Things: Application Frameworks in IoTWebinar- Internet of Things: Application Frameworks in IoT
Webinar- Internet of Things: Application Frameworks in IoT
 
Simplify Internet of Things with an Intelligent Gateway
Simplify Internet of Things with an Intelligent GatewaySimplify Internet of Things with an Intelligent Gateway
Simplify Internet of Things with an Intelligent Gateway
 
Internet of things (IoT)
Internet of things (IoT)Internet of things (IoT)
Internet of things (IoT)
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
THE INTERNET OF THINGS
THE INTERNET OF THINGSTHE INTERNET OF THINGS
THE INTERNET OF THINGS
 
What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?
 
Internet of Things and its applications
Internet of Things and its applicationsInternet of Things and its applications
Internet of Things and its applications
 
IoT - IT 423 ppt
IoT - IT 423 pptIoT - IT 423 ppt
IoT - IT 423 ppt
 
Internet of Things (IoT) - We Are at the Tip of An Iceberg
Internet of Things (IoT) - We Are at the Tip of An IcebergInternet of Things (IoT) - We Are at the Tip of An Iceberg
Internet of Things (IoT) - We Are at the Tip of An Iceberg
 

Similaire à Webshield internet of things

AVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A Glance
AVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A GlanceAVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A Glance
AVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A GlanceScott Faria
 
programmer avec Arduino
programmer avec Arduinoprogrammer avec Arduino
programmer avec Arduinomohamednacim
 
Intel galileo gen 2
Intel galileo gen 2Intel galileo gen 2
Intel galileo gen 2srknec
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5Syed Mustafa
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection systemAashiq Ahamed N
 
All contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docx
All contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docxAll contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docx
All contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docxgalerussel59292
 
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...Jayanthi Kannan MK
 
ARUDINO UNO and RasberryPi with Python
 ARUDINO UNO and RasberryPi with Python ARUDINO UNO and RasberryPi with Python
ARUDINO UNO and RasberryPi with PythonJayanthi Kannan MK
 
IOT Talking to Webserver - how to
IOT Talking to Webserver - how to IOT Talking to Webserver - how to
IOT Talking to Webserver - how to Indraneel Ganguli
 
Arduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access DetailsArduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access DetailsSanjay Kumar
 
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11hussain0075468
 
IRJET- Wi-Fi Control First Person View Robot (FPV)
IRJET- Wi-Fi Control First Person View Robot (FPV)IRJET- Wi-Fi Control First Person View Robot (FPV)
IRJET- Wi-Fi Control First Person View Robot (FPV)IRJET Journal
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather piAsutosh Hota
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoMike Ochtman
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for BeginnersSarwan Singh
 
Using arduino and raspberry pi for internet of things
Using arduino and raspberry pi for internet of thingsUsing arduino and raspberry pi for internet of things
Using arduino and raspberry pi for internet of thingsSudar Muthu
 

Similaire à Webshield internet of things (20)

AVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A Glance
AVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A GlanceAVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A Glance
AVR HOW-TO GUIDE Interfacing SPI-Ethernet With AVR Slicker Contents At A Glance
 
programmer avec Arduino
programmer avec Arduinoprogrammer avec Arduino
programmer avec Arduino
 
Intel galileo gen 2
Intel galileo gen 2Intel galileo gen 2
Intel galileo gen 2
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
All contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docx
All contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docxAll contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docx
All contents are Copyright © 1992–2012 Cisco Systems, Inc. A.docx
 
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
 
ARUDINO UNO and RasberryPi with Python
 ARUDINO UNO and RasberryPi with Python ARUDINO UNO and RasberryPi with Python
ARUDINO UNO and RasberryPi with Python
 
IOT Talking to Webserver - how to
IOT Talking to Webserver - how to IOT Talking to Webserver - how to
IOT Talking to Webserver - how to
 
Arduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access DetailsArduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access Details
 
IoT Platform
IoT PlatformIoT Platform
IoT Platform
 
IoT Platform
IoT PlatformIoT Platform
IoT Platform
 
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
 
IRJET- Wi-Fi Control First Person View Robot (FPV)
IRJET- Wi-Fi Control First Person View Robot (FPV)IRJET- Wi-Fi Control First Person View Robot (FPV)
IRJET- Wi-Fi Control First Person View Robot (FPV)
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather pi
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduino
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for Beginners
 
RDL Uno pi
RDL Uno piRDL Uno pi
RDL Uno pi
 
Using arduino and raspberry pi for internet of things
Using arduino and raspberry pi for internet of thingsUsing arduino and raspberry pi for internet of things
Using arduino and raspberry pi for internet of things
 
IoT Workshop in Macao
IoT Workshop in MacaoIoT Workshop in Macao
IoT Workshop in Macao
 

Plus de Raghav Shetty

8 Channel Relay Board-Bluetooth
8 Channel Relay Board-Bluetooth8 Channel Relay Board-Bluetooth
8 Channel Relay Board-BluetoothRaghav Shetty
 
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for ArduinoRaghav Shetty
 
4 Channel Relay Board 12V-Compatible for Arduino
4 Channel Relay Board 12V-Compatible for Arduino4 Channel Relay Board 12V-Compatible for Arduino
4 Channel Relay Board 12V-Compatible for ArduinoRaghav Shetty
 
8 Channel Relay Board-Rs485
8 Channel Relay Board-Rs485 8 Channel Relay Board-Rs485
8 Channel Relay Board-Rs485 Raghav Shetty
 
Digitla Vibration Sensor
Digitla Vibration SensorDigitla Vibration Sensor
Digitla Vibration SensorRaghav Shetty
 
Digital Soil Moisture Sensor
Digital Soil Moisture SensorDigital Soil Moisture Sensor
Digital Soil Moisture SensorRaghav Shetty
 
Micro SD Memory Card Interface for 5V MCU
Micro SD Memory Card Interface for 5V MCUMicro SD Memory Card Interface for 5V MCU
Micro SD Memory Card Interface for 5V MCURaghav Shetty
 
Micro SD Memory Card Interface for 3.3V MCU
Micro SD Memory Card Interface for 3.3V MCUMicro SD Memory Card Interface for 3.3V MCU
Micro SD Memory Card Interface for 3.3V MCURaghav Shetty
 
Regulated Power Supply
Regulated Power Supply Regulated Power Supply
Regulated Power Supply Raghav Shetty
 
8 Channel Bi Directional Logic Level Converter
8 Channel Bi Directional Logic Level Converter8 Channel Bi Directional Logic Level Converter
8 Channel Bi Directional Logic Level ConverterRaghav Shetty
 
Plastic REED Float Switch
Plastic REED Float SwitchPlastic REED Float Switch
Plastic REED Float SwitchRaghav Shetty
 

Plus de Raghav Shetty (20)

8 Channel Relay Board-Bluetooth
8 Channel Relay Board-Bluetooth8 Channel Relay Board-Bluetooth
8 Channel Relay Board-Bluetooth
 
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
 
4 Channel Relay Board 12V-Compatible for Arduino
4 Channel Relay Board 12V-Compatible for Arduino4 Channel Relay Board 12V-Compatible for Arduino
4 Channel Relay Board 12V-Compatible for Arduino
 
8 Channel Relay Board-Rs485
8 Channel Relay Board-Rs485 8 Channel Relay Board-Rs485
8 Channel Relay Board-Rs485
 
Xbee X-CTU Software
Xbee X-CTU SoftwareXbee X-CTU Software
Xbee X-CTU Software
 
Digitla Vibration Sensor
Digitla Vibration SensorDigitla Vibration Sensor
Digitla Vibration Sensor
 
Thermal Printer
Thermal PrinterThermal Printer
Thermal Printer
 
Digital Soil Moisture Sensor
Digital Soil Moisture SensorDigital Soil Moisture Sensor
Digital Soil Moisture Sensor
 
Micro SD Memory Card Interface for 5V MCU
Micro SD Memory Card Interface for 5V MCUMicro SD Memory Card Interface for 5V MCU
Micro SD Memory Card Interface for 5V MCU
 
Micro SD Memory Card Interface for 3.3V MCU
Micro SD Memory Card Interface for 3.3V MCUMicro SD Memory Card Interface for 3.3V MCU
Micro SD Memory Card Interface for 3.3V MCU
 
Regulated Power Supply
Regulated Power Supply Regulated Power Supply
Regulated Power Supply
 
PIC Project Board
PIC Project BoardPIC Project Board
PIC Project Board
 
8 Channel Bi Directional Logic Level Converter
8 Channel Bi Directional Logic Level Converter8 Channel Bi Directional Logic Level Converter
8 Channel Bi Directional Logic Level Converter
 
LCD Keypad Shield
LCD Keypad ShieldLCD Keypad Shield
LCD Keypad Shield
 
L298 Motor Driver
L298 Motor DriverL298 Motor Driver
L298 Motor Driver
 
Joystick Shield
Joystick ShieldJoystick Shield
Joystick Shield
 
Force Sensor
Force SensorForce Sensor
Force Sensor
 
Plastic REED Float Switch
Plastic REED Float SwitchPlastic REED Float Switch
Plastic REED Float Switch
 
Flex Sensor
Flex SensorFlex Sensor
Flex Sensor
 
Serial EEPROM
Serial EEPROMSerial EEPROM
Serial EEPROM
 

Dernier

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

Webshield internet of things

  • 1. www.researchdesignlab.com Page 1 WEB SHIELD INTERNET OF THINGSREV1.0 INTERNET OF THINGS (IoT) WEB SHIELD SMART INTERNET APPLICATION DEVELOPMENT KIT
  • 2. www.researchdesignlab.com Page 2 WEB SHIELD INTERNET OF THINGSREV1.0 Contents OVERVIEW ................................................................................................................................... 3 INTERNET OF THINGS (IoT).................................................................................................. 3 FEATURES: ................................................................................................................................... 4 Ethernet Controller (ENC28J60) .................................................................................................... 4 CIRCUIT DIAGRAM .................................................................................................................... 5 SCHEMATIC OF WEB SHIELD .................................................................................................. 6 INTERNAL CONNECTION OF WEBSHIELD WITH UNO BOARD ...................................... 7 INTERNAL CONNECTIONS OF XBEE WITH WEBSHIELD .................................................. 8 XBEE – WEBSHIELD................................................................................................................... 9 MODULE SETUP ........................................................................................................................ 10 SCREENSHOTS........................................................................................................................... 11 Code:............................................................................................................................................. 12 To control onboard relay and to display analog pin values in web browser............................. 12
  • 3. www.researchdesignlab.com Page 3 WEB SHIELD INTERNET OF THINGSREV1.0 OVERVIEW INTERNET OF THINGS (IoT) The Internet of Things (IoT) is the interconnection of uniquely identifiable embedded computing devices within the existing Internet infrastructure. Ethernet Web shield is a smart communication shield for controlling and monitoring embedded application via internet. Internet is the media and economic way for communication between anywhere from to geographical location. This shield is compatible with Arduino open source and make easy way for customized application development. This shield has got four relay 10AMP.The board by ULN2003 IC. The board works on 5V.
  • 4. www.researchdesignlab.com Page 4 WEB SHIELD INTERNET OF THINGSREV1.0 FEATURES: 1. IEEE 802.3 compatible. 2. Supports Full and Half-Duplex modes. 3. Integrated MAC and 10Base-T PHY 4. SPI Interface with Clock Speeds Up to 20 MHz. 5. With this Ethernet Shield, your Arduino board can be connected to internet. 6. Stackable by accepting prototype shield or any other boards with Arduino compatible interface. 7. LED indication for relay & power supply. 8. Design based on highly proven IC ULN2803 as driver. 9. DC-DC Converter. Ethernet Controller (ENC28J60) The Ethernet Controller (ENC28J60) is a so called SPI device and uses the SPI pins (10, 11, 12, 13) of your Arduino.  SS stands for Slave Select, used to enable or disable the slave device (the Ethernet module in this case).  MOSI stands for Master Output Slave Input, or in other words: Arduino OUTPUT (data from Arduino to Ethernet Controller).  MISO stands for the opposite, Master Input Slave Output, or: Arduino INPUT (data from Ethernet Controller to Arduino).  SCK is the clock used for SPI timing.
  • 5. www.researchdesignlab.com Page 5 WEB SHIELD INTERNET OF THINGSREV1.0 CIRCUIT DIAGRAM
  • 6. www.researchdesignlab.com Page 6 WEB SHIELD INTERNET OF THINGSREV1.0 SCHEMATIC OF WEB SHIELD
  • 7. www.researchdesignlab.com Page 7 WEB SHIELD INTERNET OF THINGSREV1.0 INTERNAL CONNECTION OF WEBSHIELD WITH UNO BOARD
  • 8. www.researchdesignlab.com Page 8 WEB SHIELD INTERNET OF THINGSREV1.0 INTERNAL CONNECTIONS OF XBEE WITH WEBSHIELD
  • 9. www.researchdesignlab.com Page 9 WEB SHIELD INTERNET OF THINGSREV1.0 XBEE – WEBSHIELD
  • 10. www.researchdesignlab.com Page 10 WEB SHIELD INTERNET OF THINGSREV1.0 MODULE SETUP step 1 :Download - ETHER_28J60 and Ethershield libraries from Github.com https://github.com/muanis/arduino-projects/tree/master/libraries step 2 : Import ETHER_28J60 and Ethershield libraries into the Arduino1.0.6 . step 3: Connect UNO board to PC then compile and dump the code (given in code section of this document)to Arduino board before mounting web shield. step 4: Mount Arduino onto web shield ,connect 12 V DC power supply to web shield. step 5: Connect PC and web shield with Ethernet cable for direct control(local LAN network ). or Connect web shield to the router through Ethernet cable(internet) *the IP address and port used in the code for web shield should be port forwarded in the router so as to make it online accessible. step 6: Enter IP address(Ex: http://192.168.1.15) into the browser specified in the code and enter.(to follow up refer screen shots)(**this holds good for local LAN control ) Or Port forward 192.168.1.15:80 IP in your respective router settings so that Webshield will be accessed online Note : *need to have to Dynamic DNS and port forwarding knowledge to access through internet. *if one has dedicated IP/ VPN owned, they can directly access within their private network. step 7 :after port forwarding, use “internet IP”(static/public IP Address) to access web shield online.
  • 11. www.researchdesignlab.com Page 11 WEB SHIELD INTERNET OF THINGSREV1.0 SCREENSHOTS
  • 12. www.researchdesignlab.com Page 12 WEB SHIELD INTERNET OF THINGSREV1.0 Code: To control onboard relay and to display analog pin values in web browser #include "etherShield.h" #include "ETHER_28J60.h" static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24}; static uint8_t ip[4] = {192, 168, 1, 15}; // the IP address for your board. Check your home hub // to find an IP address not in use and pick that int outputPin1 = 2; int outputPin2 = 3; int outputPin3 = 4; int outputPin4 = 5; // this or 10.0.0.15 are likely formats for an address // that will work. static uint16_t port = 80; // Use port 80 - the standard for HTTP ETHER_28J60 e; char flag1=0,flag2=0,flag3=0,flag4=0; void setup() { e.setup(mac, ip, port); pinMode(outputPin1, OUTPUT); pinMode(outputPin2, OUTPUT); pinMode(outputPin3, OUTPUT); pinMode(outputPin4, OUTPUT); } void loop() { char *params; if (params = e.serviceRequest()) { e.print("<A HREF='?c'>ANALOG VALUES</A></BR>"); e.print("<A HREF='?cmd1=off'>REMOTE RELAY CONTROL</A></BR>"); if (strcmp(params, "?c") == 0) { analog(); } e.print("<H1> </H1><br/>"); if (strcmp(params, "?cmd1=on") == 0) { digitalWrite(outputPin1, HIGH);
  • 13. www.researchdesignlab.com Page 13 WEB SHIELD INTERNET OF THINGSREV1.0 flag1=1; display(); } else if (strcmp(params, "?cmd1=off") == 0) // Modified -- 2011 12 15 # Ben Schueler { digitalWrite(outputPin1, LOW); flag1=0; display(); } if (strcmp(params, "?cmd2=on") == 0) { digitalWrite(outputPin2, HIGH); flag2=1; display(); } else if (strcmp(params, "?cmd2=off") == 0) // Modified -- 2011 12 15 # Ben Schueler { digitalWrite(outputPin2, LOW); flag2=0; display(); } if (strcmp(params, "?cmd3=on") == 0) { digitalWrite(outputPin3, HIGH); flag3=1; display(); } else if (strcmp(params, "?cmd3=off") == 0) // Modified -- 2011 12 15 # Ben Schueler { digitalWrite(outputPin3, LOW); flag3=0; display(); } if (strcmp(params, "?cmd4=on") == 0) { digitalWrite(outputPin4, HIGH); flag4=1; display(); } else if (strcmp(params, "?cmd4=off") == 0) // Modified -- 2011 12 15 # Ben Schueler { digitalWrite(outputPin4, LOW); flag4=0; display(); }
  • 14. www.researchdesignlab.com Page 14 WEB SHIELD INTERNET OF THINGSREV1.0 e.respond(); } delay(100); } void analog() { e.print("<H1>Analog Values</H1><br/><table>"); e.print("<tr><th>Input</th><th>Value</th></tr>"); for (int i = 0; i < 6; i++) { e.print("<tr><td>"); e.print(i); e.print("</td><td>"); e.print(analogRead(i)); e.print("</td></tr>"); } e.print("</table>"); } void display() { if(flag1==0) e.print("<A HREF='?cmd1=on'>RELAY1 ON</A></BR>"); else e.print("<A HREF='?cmd1=off'>RELAY1 OFF</A></BR>"); if(flag2==0) e.print("<A HREF='?cmd2=on'>RELAY2 ON</A></BR>"); else e.print("<A HREF='?cmd2=off'>RELAY2 OFF</A></BR>"); if(flag3==0) e.print("<A HREF='?cmd3=on'>RELAY3 ON</A></BR>"); else e.print("<A HREF='?cmd3=off'>RELAY3 OFF</A></BR>"); if(flag4==0) e.print("<A HREF='?cmd4=on'>RELAY4 ON</A></BR>"); else e.print("<A HREF='?cmd4=off'>RELAY4 OFF</A></BR>"); }