Skip to content

Instantly share code, notes, and snippets.

View biskandar's full-sized avatar
💭
Spring Boot + Kubernetes = DevOps

Benny biskandar

💭
Spring Boot + Kubernetes = DevOps
View GitHub Profile
@biskandar
biskandar / 2013101801.c
Created October 18, 2013 14:04
Arduino Uno + GSM Shield + StarHub Sim Card : Send / Recv SMS
#include <GSM.h>
// the gsm library instances
GSM gsmAccess ;
GSM_SMS sms ;
void setup() {
// initialize serial communications
@biskandar
biskandar / 2013101701.c
Created October 16, 2013 16:04
Arduino Uno + GSM Shield + StarHub Sim Card : Intro
// 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 ;
#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
@biskandar
biskandar / 2013032301.c
Created March 23, 2013 01:43
Integration between Raspberry Pi and Arduino
#include "arduPi.h"
int main () {
setup() ;
while(1) {
loop() ;
}
return 0;
}
@biskandar
biskandar / 2012101702.c
Created October 17, 2012 06:56
Request Counter with Arduino Uno + Ethernet Shield + LCD Shield 2012101702
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
@biskandar
biskandar / 2012101701.c
Created October 17, 2012 06:47
Request Counter with Arduino Uno + Ethernet Shield + LCD Shield 2012101701
#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 } ;
@biskandar
biskandar / 2012101613.c
Created October 16, 2012 09:08
Build Webserver with Arduino Leonardo and WiFi Shield 2012101613
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
@biskandar
biskandar / 2012101612.c
Created October 16, 2012 09:07
Build Webserver with Arduino Leonardo and WiFi Shield 2012101612
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 ) ;
@biskandar
biskandar / 2012101611.c
Created October 16, 2012 09:06
Build Webserver with Arduino Leonardo and WiFi Shield 2012101611
#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 ) ;
@biskandar
biskandar / 2012101607.c
Created October 16, 2012 09:03
Reading Arduino's Analog Pins with JSON Protocol by using WiFi Shield 2012101607
#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 ) {