This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GSM.h> | |
// the gsm library instances | |
GSM gsmAccess ; | |
GSM_SMS sms ; | |
void setup() { | |
// initialize serial communications |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import the GSM Library | |
#include <GSM.h> | |
// define PIN Number | |
#define PINNUMBER "" | |
// initialize the library instance | |
GSM gsmAccess( true ) ; // true with debug enabled | |
GSMScanner scannerNetworks ; | |
GSMModem modemTest ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> | |
const int lightPin = A0 ; // Light Sensor Pin | |
const int tempPin = A1 ; // Temperature Sensor Pin | |
const int lcdRSPin = 13 ; // Select Pin | |
const int lcdENPin = 12 ; // Enable Pin | |
const int lcdD4Pin = 11 ; // Databus line 4 | |
const int lcdD5Pin = 8 ; // Databus line 5 | |
const int lcdD6Pin = 7 ; // Databus line 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "arduPi.h" | |
int main () { | |
setup() ; | |
while(1) { | |
loop() ; | |
} | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void loop() { | |
// verify if there is new client connected | |
EthernetClient client = server.available() ; | |
if ( !client ) return ; | |
// prepare for reading request data | |
boolean isBlankLine = true ; | |
// read and proces the client request data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <LiquidCrystal.h> | |
// prepare for lcd shield | |
LiquidCrystal lcd( 8 , 9 , 4 , 5 , 6 , 7 ) ; | |
// prepare for ethernet shield | |
byte mac[] = { 0x00 , 0x08 , 0xDC , 0x00 , 0x00 , 0x09 } ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void loop() { | |
// verify if there is new client connected | |
WiFiClient client = server.available() ; | |
if ( !client ) return ; | |
// prepare for reading request data | |
boolean isBlankLine = true ; | |
// found new client connected and process the request data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
// initialize serial | |
Serial.begin( 9600 ) ; | |
while( !Serial ) ; // it only start the code when found serial pc terminal connected | |
// validate if the wifi shield plugged | |
if ( WiFi.status() == WL_NO_SHIELD ) { | |
Serial.println( "Wifi shield is not plugged yet" ) ; | |
while( true ) ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <WiFi.h> | |
char ssid[] = "biskandar" ; | |
char pass[] = "*******" ; | |
int status = WL_IDLE_STATUS ; | |
// build web server with listener port 80 | |
WiFiServer server( 80 ) ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <aJSON.h> | |
#include <SPI.h> | |
#include <WiFi.h> | |
// build web server with listener port 80 | |
WiFiServer server( 80 ) ; | |
void setup() { | |
// validate if the wifi shield plugged | |
if ( WiFi.status() == WL_NO_SHIELD ) { |