(128x64dot) Wi-Fi (CPU ESP-WROOM-02) Susumu Shikata V2: V3: SPIFF SSID / Password / IP " "

Size: px
Start display at page:

Download "(128x64dot) Wi-Fi (CPU ESP-WROOM-02) Susumu Shikata V2: V3: SPIFF SSID / Password / IP " ""

Transcription

1 /* (128x64dot) Wi-Fi (CPU ESP-WROOM-02) Susumu Shikata V2: GPIO0 ( ) V3: SPIFF SSID / Password / IP ) 4 "1" " " ESP-WROOM-02 #include <ESP8266WiFi.h> /* This function returns following codes to describe what is going on with Wi-Fi connection: 0 : WL_IDLE_STATUS when Wi-Fi is in process of changing between statuses 1 : WL_NO_SSID_AVAILin case configured SSID cannot be reached 3 : WL_CONNECTED after successful connection is established 4 : WL_CONNECT_FAILED if password is incorrect 6 : WL_DISCONNECTED if module is not configured in station mode #include <WiFiClient.h> #include <DNSServer.h> #include <ESP8266WebServer.h> #include <FS.h> #include <time.h> #define JST 3600*9 time_t t; struct tm *tm; static const char *wd[7] = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"; #define GPIO0 0 #define GPIO2 2 Wi-Fi const char* settings = "/wifi_settings.txt"; const char* modef = "/dsp_settings.txt";

2 byte dspf = 0; const String pass = "password"; I2C #include "SparkFun_Si7021_Breakout_Library.h" SI7021 #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> OLED #include <Fonts/FreeSerifBold24pt7b.h> #include <Fonts/FreeMonoBoldOblique18pt7b.h> #include <Fonts/FreeSerifBold18pt7b.h> #include <ESP_Adafruit_SSD1306.h> OLED #define OLED_RESET 4 SI7021 float humidity = 0; float tempf = 0; ( ) float tempc = 0; ( ) OLED Adafruit_SSD1306 display(oled_reset); Create Instance of HTU21D or SI7021 temp and humidity sensor and MPL3115A2 barrometric sensor Weather sensor; ESP8266WebServer server(80); IPAddress subnet(255, 255, 255, 0); /* Wi-Fi void handlerootget() { String html = ""; html += "<h1>wifi Settings</h1>"; html += "<form method='post'>"; html += " <input type='text' name='ssid' placeholder='ssid'><br>"; html += " <input type='text' name='pass' placeholder='pass'><br>"; html += " <input type='text' name='adr1' placeholder='ip#1'><br>"; html += " <input type='text' name='adr2' placeholder='ip#2'><br>"; html += " <input type='text' name='adr3' placeholder='ip#3'><br>"; html += " <input type='text' name='adr4' placeholder='ip#4'><br>"; html += " <input type='submit'><br>"; html += "</form>"; server.send(200, "text/html", html);

3 /* Wi-Fi SPIFFS void handlerootpost() { String ssid = server.arg("ssid"); String pass = server.arg("pass"); /*String adr1 = server.arg("adr1"); String adr2 = server.arg("adr2"); String adr3 = server.arg("adr3"); String adr4 = server.arg("adr4"); int adr1 = (server.arg("adr1")).toint(); int adr2 = (server.arg("adr2")).toint(); int adr3 = (server.arg("adr3")).toint(); int adr4 = (server.arg("adr4")).toint(); File f = SPIFFS.open(settings, "w"); f.println(ssid); f.println(pass); f.write(adr1); f.write(adr2); f.write(adr3); f.write(adr4); f.close(); String html = ""; html += "<h1>wifi Settings</h1>"; html += ssid + "<br>"; html += pass + "<br>"; html += adr1 + '.' + adr2 + '.' + adr3 + '.' + adr4 + "<br>"; html += String(adr1) + '.' + String(adr2) + '.' + String(adr3) + '.' + String(adr4) + "<br>"; server.send(200, "text/html", html); void handleroot() { char tmp[400]; t = time(null); tm = localtime(&t); snprintf ( tmp, 400, "<html>\ <head>\ <meta http-equiv='refresh' content='5'/>\ <meta charset='utf-8'>\

4 <title>get HTU21 status</title>\ <style>\ body { background-color: #cccccc; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; \ </style>\ </head>\ <body>\ <h2>weather condition now</h2>\ <h1> %02d.%02d %02d.%02d%</h1>\ <h1> %4d %02d %02d (%s) %02d:%02d</h1>\ </body>\ </html>", int(tempc), int( (tempc - floor( tempc)) * 100 ), int(humidity ), int( (humidity - floor( humidity )) * 100), tm->tm_year , tm->tm_mon + 1, tm->tm_mday, wd[tm->tm_wday], tm->tm_hour, tm->tm_min ); server.send ( 200, "text/html", tmp ); void handlenotfound() { String message = "File Not found\n\n"; message += "URI: "; message += server.uri(); message += "\nmethod: "; message += (server.method() == HTTP_GET)? "GET" : "POST"; message += "\narguments: "; message += server.args(); message += "\n"; for (uint8_t i = 0; i < server.args(); i++) { message += " NAME:" + server.argname(i) + server.arg(i) + "\n"; server.send(404, "text/plain", message); IP int x, y : (x,y ) void dsp_wifi( int x, int y ) { display.setcursor( x, y ); if ( WiFi.status() == WL_CONNECTED ) display.println ( WiFi.localIP() ); DHCP IP else display.println ( "WiFi not found." );

5 int x, y, f : (x,y ), (0: 1:18p) void dsp_time( int x, int y, int f ) { t = time(null); tm = localtime(&t); display.setcursor( 0, 57 ); if ( WiFi.status()!= WL_CONNECTED ) display.println ( "WiFi not found." ); else { display.setcursor( x, y ); if ( f == 0 ) { display.printf("%02d/%02d(%s) %02d:%02d", tm->tm_mon + 1, tm->tm_mday, wd[tm->tm_wday], tm->tm_hour, tm->tm_min); else { display.setfont(&freemonoboldoblique18pt7b); display.printf("%02d:%02d", tm->tm_hour, tm->tm_min); /** ( ) void setup_client() { int i, status; File f = SPIFFS.open(settings, "r"); String ssid = f.readstringuntil('\n'); String pass = f.readstringuntil('\n'); int adr1 = f.read(); int adr2 = f.read(); int adr3 = f.read(); int adr4 = f.read(); f.close(); ssid.trim(); pass.trim();

6 IPAddress ip( adr1, adr2, adr3, adr4 ); IPAddress gateway( adr1, adr2, adr3, 1 ); IP Serial.println(); Serial.println("SSID: " + ssid); Serial.println("PASS: " + pass); Serial.println("IP: " + String(adr1) + '.' + String(adr2) + '.' + String(adr3) + '.' + String(adr4) ); OLED display.cleardisplay(); display.setcursor(0, 20); display.print( "WiFi connecting." ); display.setcursor(0, 30); display.print( " to: " + ssid ); display.display(); attempt to connect to Wifi network: WiFi.disconnect(); WiFi.mode(WIFI_STA); WiFi.begin(ssid.c_str(), pass.c_str()); WiFi.config( ip, gateway, subnet ); IP Wait for connection for ( i = 0; i <= 50; i++ ) { if ( WiFi.status() == WL_CONNECTED ) break; delay ( 500 ); Serial.print('.'); Serial.println(""); Wi-Fi configtime( JST, 0, "ntp.nict.jp", "ntp.jst.mfeed.ad.jp"); if ( i < 50 ) { server.on ( "/", handleroot ); server.on ( "/inline", []() { server.send ( 200, "text/plain", "this works as well" ); ); server.onnotfound ( handlenotfound ); server.begin(); Serial.println("WiFi connected"); OLED

7 display.cleardisplay(); display.setcursor(0, 17); display.print( ssid ); display.setcursor(0, 27); display.print( pass ); display.setcursor(0, 37); display.print( "WiFi connected" ); display.setcursor(0, 47); display.print( "IP address:" ); dsp_wifi( 20, 57 ); display.display(); delay( 1000 ); else { Serial.println("WiFi:Missing connection."); /* ( ) void setup_server() { byte mac_adr[6]; WiFi.macAddress(mac_adr); String ssid = "ESP+"; SSID "ESP+" Mac (6 ) for (int i = 0; i < 6; i++) { ssid += String(mac_adr[i], HEX); String ssid = "ESP_WiFi_Setup"; Serial.println(); Serial.println("SSID: " + ssid); Serial.println("PASS: " + pass); /* OLED display.cleardisplay(); display.setcursor(0, 10); display.print( "ID:ESP_WiFi_Setup" ); display.setcursor(0, 24); display.print( "PAS:password" ); /* You can remove the password parameter if you want the AP to be open. WiFi.softAP(ssid.c_str(), pass.c_str()); server.on("/", HTTP_GET, handlerootget); server.on("/", HTTP_POST, handlerootpost); server.begin(); Serial.println("HTTP server started.");

8 display.setcursor(0, 44); display.print( "HTTP server started." ); [CASE0] void dsp0() { display.setfont(&freeserifbold18pt7b); display.setfont(&freemonoboldoblique18pt7b); display.setcursor(20, 23); display.print( tempc ); display.print(" C"); display.setfont(&freeserifbold18pt7b); display.setcursor(20, 52); display.print( humidity ); display.print(" %"); dsp_time( 20, 57, 0 ); [CASE1] ( ) ( ) void dsp1() { display.setfont(&freeserifbold18pt7b); display.setfont(&freemonoboldoblique18pt7b); display.setcursor(30, 23); display.print( tempc, 0 ); display.print(" C"); display.setfont(&freeserifbold18pt7b);

9 display.setcursor(30, 52); display.print( humidity, 0 ); display.print(" %"); dsp_time( 20, 57, 0 ); [CASE2] void dsp2() { display.setfont(&freeserifbold24pt7b); display.setfont(&freeserifbold18pt7b); display.setcursor(20, 36); display.print( tempc, 0 ); display.print(" C"); dsp_time( 16, 56, 1 ); [CASE3] void dsp3() { display.setfont(&freeserifbold24pt7b); display.setfont(&freeserifbold18pt7b); display.setcursor(20, 36); display.print( humidity, 0 ); display.print(" %"); dsp_time( 16, 56, 1 ); [CASE4]

10 void dsp4() { display.setfont(&freeserifbold24pt7b); display.setfont(&freeserifbold18pt7b); display.setcursor(16, 23); display.print( tempc, 0 ); display.print( " C " ); display.setfont(&freeserifbold18pt7b); display.print( humidity, 0 ); display.print(" %"); dsp_time( 16, 53, 1 ); void getweather() { Measure Relative Humidity from the HTU21D or Si7021 humidity = sensor.getrh(); Measure Temperature from the HTU21D or Si7021 tempf = sensor.gettempf(); tempc = sensor.gettemp(); Temperature is measured every time RH is requested. It is faster, therefore, to read it from previous RH measurement with gettemp() instead with readtemp() void setup() { int i; pinmode( GPIO0, INPUT ); Wire.begin( 5, 4 ); (SDA,SCL):ESP8266(IO_5)-OLED(SDA),(IO_4)-OLED(SCL) display.begin(ssd1306_switchcapvcc, 0x78 >> 1); OLED ADDRESS display.cleardisplay(); Clear the buffer. Serial.begin(74880);

11 Serial.println(); 2 MODE 0 : Server 1 : Client delay(2000); Initialize the I2C sensors and ping them sensor.begin(); SPIFFS.begin(); if (digitalread( GPIO0 ) == 0) { setup_server(); else { setup_client(); File f = SPIFFS.open( modef, "r" ); dspf = f.read(); f.close(); void loop() { int i; getweather(); OLED 5 WEB for ( i = 0; i <= 500; i++ ) { server.handleclient(); delay( 10 ); display.cleardisplay(); if ( digitalread( GPIO0 ) == LOW ) { delay( 20 ); dspf++; if ( dspf > 4 ) dspf = 0; File f = SPIFFS.open( modef, "w" ); f.write( dspf ); f.close(); switch ( dspf ) { case 0: dsp0();

12 break; case 1: dsp1(); break; case 2: dsp2(); break; case 3: dsp3(); break; case 4: dsp4(); break; default: dsp0(); break; display.display(); /*Serial.printf( " %4d %02d %02d (%s) %02d:%02d:%2d\n", tm->tm_year+1900,tm->tm_mon + 1, tm->tm_mday,wd[tm->tm_wday],tm->tm_hour, tm->tm_min,tm->tm_sec );

DIY Korner home security system

DIY Korner home security system DIY Korner home security system What is Korner security system? This product is meant for home security. It comes with a korner tag (korner stick) and several korner tags. The one to the right is the korner

More information

#define DBG_OUTPUT_PORT Serial. const char* ssid = "**********"; const char* password = "**********"; const char* host = "esp8266sd";

#define DBG_OUTPUT_PORT Serial. const char* ssid = **********; const char* password = **********; const char* host = esp8266sd; /* SDWebServer - Example WebServer with SD Card backend for esp8266 Copyright (c) 2015 Hristo Gochkov. All rights reserved. This file is part of the ESP8266WebServer library for Arduino environment. This

More information

How to use an ESP-01S module

How to use an ESP-01S module How to use an ESP-01S module How Does It Work? The ESP8266 can be controlled from your local Wi-Fi network or from the internet (after port forwarding). The ESP-01 module has GPIO pins that can be programmed

More information

Sten-SLATE ESP. Simple Web Server

Sten-SLATE ESP. Simple Web Server Sten-SLATE ESP Simple Web Server Stensat Group LLC, Copyright 2018 1 References www.arduino.cc https://github.com/esp8266/arduino 2 System Design A web server uses the client/server software model. The

More information

MAC Address Finder. Created by Ron Dear. Last updated on :51:58 PM UTC

MAC Address Finder. Created by Ron Dear. Last updated on :51:58 PM UTC MAC Address Finder Created by Ron Dear Last updated on 2016-11-07 08:51:58 PM UTC Guide Contents Guide Contents Overview Parts and Tools Assembly of the Main Board Preparing the Case Connecting the Battery

More information

#include <ESP8266WiFi.h> #include <DNSServer.h> #include <ESP8266WebServer.h> #include <WiFiManager.h> #include <PubSubClient.

#include <ESP8266WiFi.h> #include <DNSServer.h> #include <ESP8266WebServer.h> #include <WiFiManager.h> #include <PubSubClient. #include #include #include #include #include const char* mqtt_server = "SERVER_ADDRESS"; WiFiClient espclient; PubSubClient

More information

Oled 128x64 blue SSD1306 on PORTB (pins 8-12) French version

Oled 128x64 blue SSD1306 on PORTB (pins 8-12) French version www.didel.com/xbot/oled.pdf Didel and Boxtec support two Oled displays, not only nice, but essential for debugging robotic applications. They use the same minishield adapter (SSD 1331 at the end of this

More information

Programming Language B

Programming Language B Programming Language B Takako Nemoto (JAIST) 28 January Takako Nemoto (JAIST) 28 January 1 / 20 Today s quiz The following are program to print each member of the struct Student type object abe. Fix the

More information

Interacting with Unix

Interacting with Unix Interacting with Unix Synopsis Getting the Process ID #include pid_t getpid(void); Example: #include #include int main(){ pid_t n = getpid(); printf("process id is %d\n",

More information

free ebooks ==>

free ebooks ==> Home Automation With the ESP8266 Build Home Automation Systems Using the Powerful and Cheap ESP8266 WiFi Chip Marco Schwartz, PhD Contents Legal About the author About the companion website Chapter 1 free

More information

FireBeetle ESP8266 IOT Microcontroller SKU: DFR0489

FireBeetle ESP8266 IOT Microcontroller SKU: DFR0489 FireBeetle ESP8266 IOT Microcontroller SKU: DFR0489 Introduction DFRobot FireBeetle is a series of low-power-consumption development hardware designed for Internet of Things (IoT). Firebeetle ESP8266 is

More information

ESP32 WIFI/BLE Board v0.9

ESP32 WIFI/BLE Board v0.9 ESP32 WIFI/BLE Board v0.9 From Elecrow Contents 1 Introduction 2 Feactures 3 Specification 4 Interface Function 5 Usage 5.1 Installing the ESP32 Arduino Core 5.1.1 Download the Core 5.1.2 Install the Xtensa

More information

CHAPTER V IMPLEMENTATION AND TESTING

CHAPTER V IMPLEMENTATION AND TESTING CHAPTER V IMPLEMENTATION AND TESTING 5.1 Implementation 5.1.1 Arduino IDE This project uses the arduino IDE application. This application used to compile and to upload the program. The program can be seen

More information

This manual is for Libffi, a portable foreign-function interface library. Copyright c 2008, 2010, 2011 Red Hat, Inc. Permission is granted to copy,

This manual is for Libffi, a portable foreign-function interface library. Copyright c 2008, 2010, 2011 Red Hat, Inc. Permission is granted to copy, Libffi This manual is for Libffi, a portable foreign-function interface library. Copyright c 2008, 2010, 2011 Red Hat, Inc. Permission is granted to copy, distribute and/or modify this document under the

More information

Structs (1) In data processing, a collection of data that can be treated as a single unit is a record. The components of this collection (fields or

Structs (1) In data processing, a collection of data that can be treated as a single unit is a record. The components of this collection (fields or Structs (1) In data processing, a collection of data that can be treated as a single unit is a record. The components of this collection (fields or members or attributes) are uniquely named and have values.

More information

SYSTEM INFORMATION. UNIX Programming 2015 Fall by Euiseong Seo

SYSTEM INFORMATION. UNIX Programming 2015 Fall by Euiseong Seo SYSTEM INFORMATION UNIX Programming 2015 Fall by Euiseong Seo Host Information POSIX defines host information as follows OS name (Linux) OS release (3.13.0) OS version (#60-Ubuntu SMP Web Aug 13) Node

More information

GoldSTEM_Lesson_18_Time_Month_Date_and_Temperature_to_Terminal tm

GoldSTEM_Lesson_18_Time_Month_Date_and_Temperature_to_Terminal tm GoldSTEM_Lesson_18_Time_Month_Date_and_Temperature_to_Terminal tm 3-29-2016 For this experiment we will be using the same setup in Lesson 17 Wiring the Circuit See lesson 17 Change the code below you can

More information

Appendix B: Master Code

Appendix B: Master Code Appendix B: Master Code Blind Me With SciEEnce 1 Contents: 1. Indoor Blinds.. 2 2. Outdoor Weather Station 6 3. Mobile Application. 11 1. Indoor Blinds Blind Me With SciEEnce 2 /****************************************************************

More information

CCS811/BME280 (Qwiic) Environmental Combo Breakout Hookup Guide

CCS811/BME280 (Qwiic) Environmental Combo Breakout Hookup Guide CCS811/BME280 (Qwiic) Environmental Combo Breakout Hookup Guide Introduction The CCS811/BME280 (Qwiic) Environmental Combo Breakout work together to take care of all of your atmospheric quality sensing

More information

Pointer Arithmetic and Lexical Scoping. CS449 Spring 2016

Pointer Arithmetic and Lexical Scoping. CS449 Spring 2016 Pointer Arithmetic and Lexical Scoping CS449 Spring 2016 Review Pitfall 1 from previous lecture void foo(char *s) { s = "World"; int main() { char *str = "Hello"; foo(str); printf("%s\n", str); return

More information

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C Data Sheet 10 Channel Analog to Digital Converter with output via I 2 C Introduction Many microcontroller projects involve the use of sensors like Accelerometers, Gyroscopes, Temperature, Compass, Barometric,

More information

GoldSTEM.org. Growing the Future

GoldSTEM.org. Growing the Future GoldSTEM.org Growing the Future GoldSTEM_Lesson_ tm 3-24-2016 17_Time_Date_and_Temperature_to_Terminal Lessons should be done in sequence, start off with lesson 4. Each lessons builds on what was learned

More information

Remote Control with the Huzzah + Adafruit.io

Remote Control with the Huzzah + Adafruit.io Remote Control with the Huzzah + Adafruit.io Created by Richard Albritton Last updated on 2017-07-30 03:11:01 PM UTC Guide Contents Guide Contents Overview Adafruit IO Setup Creating the Buttons Feed Adding

More information

The speaker connection is circled in yellow, the button connection in red and the temperature sensor in blue

The speaker connection is circled in yellow, the button connection in red and the temperature sensor in blue Connections While the board can be connected to a number of different Arduino versions I chose to use the Pro Mini as I wanted the completed unit to be fairly small. The Mini and the MP3 board run on 5

More information

QPM Ethernet Protocol

QPM Ethernet Protocol QPM Ethernet Protocol 2002 The Stanley Works, All Rights Reserved Page 1 of 16 General For this document, the term Sigma refers to all Stanley QPM Sigma based systems including the Gamma controller. The

More information

Adafruit OLED FeatherWing

Adafruit OLED FeatherWing Adafruit OLED FeatherWing Created by lady ada Last updated on 2016-09-15 07:13:44 PM UTC Guide Contents Guide Contents Overview Pinouts Power Pins I2C Data Pins Optional Buttons Reset Button Assembly Prepare

More information

Outline. Computer programming. Usage of time and date functions. Date and Time: time.h. Date and Time: time.h. Time functions:

Outline. Computer programming. Usage of time and date functions. Date and Time: time.h. Date and Time: time.h. Time functions: Outline Computer programming "An expert is a man who has made all the mistakes which can be made, in a narrow field." Niels Bohr Working with time I/O redirection Variable length argument lists Command

More information

Computer programming. "An expert is a man who has made all the mistakes which can be made, in a narrow field." Niels Bohr

Computer programming. An expert is a man who has made all the mistakes which can be made, in a narrow field. Niels Bohr Computer programming "An expert is a man who has made all the mistakes which can be made, in a narrow field." Niels Bohr 1 Outline Working with time I/O redirection Variable length argument lists Command

More information

Sten-SLATE ESP. WiFi

Sten-SLATE ESP. WiFi Sten-SLATE ESP WiFi Stensat Group LLC, Copyright 2016 1 References www.arduino.cc http://esp8266.github.io/arduino/versions/2.1.0/doc/reference.html 2 Introduction The wifi integrated in the processor

More information

Inclusions required for the DMD

Inclusions required for the DMD Sketch for Home Alert The sketch is not large in terms of the line count, but it almost exhausts the Uno s available flash memory thanks to all the included libraries. There is lots of room for memory

More information

ESP8266 Thing Development Board Hookup Guide

ESP8266 Thing Development Board Hookup Guide Page 1 of 28 ESP8266 Thing Development Board Hookup Guide Introduction The ESP8266 is a cost-effective, and very capable WiFi-enabled microcontroller. Like any microcontroller, it can be programmed to

More information

Cloud Hoppers Weather Station using Arduino Uno Board and Ethernet Shield

Cloud Hoppers Weather Station using Arduino Uno Board and Ethernet Shield Maplin weather station part numbers: Anemometer 2.49 part number :- N25FR Wind direction sensor 9.99:-N96FY You can build this onto a little strip board for easy connection :) Ardunio with Ethernet Shield

More information

Arduino EEPROM module 512K for Sensor Shield

Arduino EEPROM module 512K for Sensor Shield Arduino EEPROM module 512K for Sensor Shield Experiment Steps This is a new designed for small data size storage. It can help to extend the EEPROM storage of Arduino. This module uses I2C to connect to

More information

Altera DE2 I2C Driver. Daniel Fiske Michael Lam Daniel Tiam

Altera DE2 I2C Driver. Daniel Fiske Michael Lam Daniel Tiam Altera DE2 I2C Driver Daniel Fiske Michael Lam Daniel Tiam Preface This application note is based on the previous application note [1] released by Braedan Jongerius, Michael Jun and Scott Hewson in the

More information

SPARK CORE A DIY guide for KingMakers KANDARP JANI DAN TEBBS

SPARK CORE A DIY guide for KingMakers   KANDARP JANI DAN TEBBS SPARK CORE A DIY guide for KingMakers http://www.spark.io KANDARP JANI (janikd@hotmail.com) DAN TEBBS What is the Spark Core? A Wi-Fi based module for connecting sensors, controllers and other gizmos to

More information

Systems Programming/ C and UNIX

Systems Programming/ C and UNIX Systems Programming/ C and UNIX A. Fischer CSCI 4547/6647 What is Time? November 6, 2017 A. Fischer CSCI 4547/6647[1ex]What is Time? Systems Programming Lecture 8... 1/24 November 6, 2017 1 / 24 Outline

More information

DAFTAR PUSTAKA. [3] Dinata, Yuwono Marta Arduino Itu Mudah. Jakarta: PT.Elex Media Komputindo

DAFTAR PUSTAKA. [3] Dinata, Yuwono Marta Arduino Itu Mudah. Jakarta: PT.Elex Media Komputindo DAFTAR PUSTAKA [1] Masruchi. 2015. Rancang dan Bangun System Pengukuran dan Monitoring Pemakaian Air Rumah PDAM Menggunakan SMS (Short Message Service). Skripsi. FT, Teknik Fisika, Universitas Nasional

More information

Examination C++ Programming

Examination C++ Programming LUND INSTITUTE OF TECHNOLOGY 1(8) Department of Computer Science Examination C++ Programming 2011 08 20, 8.00 13.00 Aid at the exam: one C++ book. The copies of the lecture slides are not allowed. You

More information

Overview of Time Related Data Structures and Functions in Unix/C. It s About Time

Overview of Time Related Data Structures and Functions in Unix/C. It s About Time Overview of Time Related Data Structures and Functions in Unix/C It s About Time 1. time_t Same as an unsigned long. Time in seconds since Midnight GMT Jan 1, 1970. a. char * ctime(time_t x) will return

More information

RS485 Sensor Node V1.0 (SKU:DFR0233)

RS485 Sensor Node V1.0 (SKU:DFR0233) RS485 Sensor Node V1.0 (SKU:DFR0233) Contents 1 Introduction 2 Application 3 Specification 4 Pin Out 4.1 More details 5 Product Directive 6 Connecting Diagram 7 Sample Code Introduction This RS-485 Sensor

More information

Internet of Things. Connecting Thing to the Internet. Clients: WEB/Android Laptops/Smartphones. Thing: Sensors/Actuators + MCU

Internet of Things. Connecting Thing to the Internet. Clients: WEB/Android Laptops/Smartphones. Thing: Sensors/Actuators + MCU Connecting Thing to the Internet Thing: Sensors/Actuators + MCU Concentrator/Gateway SBC Servers: ThingSpeak.com/ BakoBox.fr Clients: WEB/Android Laptops/Smartphones P. Bakowski smartcomputerlab.org 1

More information

Preview. Review. System Data Files (Password File) System Data Files (Password File) System Data Files (Password File)

Preview. Review. System Data Files (Password File) System Data Files (Password File) System Data Files (Password File) Review Preview link(), unlink() System Call remove(), rename() System Call Symbolic Links Symbolic link to directory Symbolic link to a executable file symlink() System Call File Times utime() System Call

More information

WiFiBee MT7681 (Arduino WiFi Wireless Programming) SKU: TEL0107

WiFiBee MT7681 (Arduino WiFi Wireless Programming) SKU: TEL0107 WiFiBee MT7681 (Arduino WiFi Wireless Programming) SKU: TEL0107 Introduction The WiFi Bee MT7681 is an Arduino WiFi XBee module based on the MT7681 serial Wi-Fi module. It is compatible with an XBee slot,

More information

This tutorial will show you how to take temperature readings using the Freetronics temperature sensor and an Arduino Uno.

This tutorial will show you how to take temperature readings using the Freetronics temperature sensor and an Arduino Uno. This tutorial will show you how to take temperature readings using the Freetronics temperature sensor and an Arduino Uno. Note that there are two different module types: the temperature sensor module and

More information

LEDShow Instruction Manual

LEDShow Instruction Manual LEDShow Instruction Manual 0 Table of Content Introduction LEDShow...2-2 Local Area Network Conection Diagram...2-2 LEDShow Software Installation...2-3 Configure the IP address to connect to the Terminal...3-4

More information

1 single digit Nixie clock

1 single digit Nixie clock 1 single digit Nixie clock by Jānis Alnis 2014-2016 Young people are fascinated by Nixies. They have not seen such neon lights in the present solid-state era. IN-18 is the largest neon digit indicator

More information

Gamma sensor module GDK101

Gamma sensor module GDK101 Application Note: Interfacing with Arduino over I 2 C The Arduino makes an ideal platform for prototyping and data collection with the Gamma sensors. Electrical Connections Interfacing with the sensor

More information

Grove - CO2 Sensor. Introduction

Grove - CO2 Sensor. Introduction Grove - CO2 Sensor Introduction 3.3V 5.0V UART The Grove - CO2 Sensor module is infrared CO2 sensor high sensitivity and high resolution. Infrared CO2 sensor MH-Z16 Is a general-purpose, small sensors,

More information

/* This program now switches between Train at holt to train on its way with button press. */ //MD_MAX72xx_Message_Serial7_train

/* This program now switches between Train at holt to train on its way with button press. */ //MD_MAX72xx_Message_Serial7_train /* This program now switches between Train at holt to train on its way with button press. */ //MD_MAX72xx_Message_Serial7_train // Use the MD_MAX72XX library to scroll text on the display // // Demonstrates

More information

ARDUINO. By Kiran Tiwari BCT 2072 CoTS.

ARDUINO. By Kiran Tiwari BCT 2072 CoTS. ARDUINO By Kiran Tiwari BCT 2072 CoTS www.kirantiwari.com.np SO What is an Arduino? WELL!! Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Why Arduino? Simplifies

More information

Chapter 6. System Data Files and Information

Chapter 6. System Data Files and Information Chapter 6. System Data Files and Information System Programming http://www.cs.ccu.edu.tw/~pahsiung/courses/pd 熊博安國立中正大學資訊工程學系 pahsiung@cs.ccu.edu.tw Class: EA-104 (05)2720411 ext. 33119 Office: EA-512

More information

API For Arduino developers

API For Arduino developers API For Arduino developers Main Page Related Pages Classes Files Examples README Generated on Thu Apr 9 2015 13:57:59 for API by 1.8.7 API For Arduino developers Main Page Related Pages Classes Files Examples

More information

PROGMEM ESP8266EX RAM

PROGMEM ESP8266EX RAM PROGMEM ESP8266EX RAM 1.0 2017 Arduino IDE PROGMEM ESP8266EX RAM PROGMEM Flash 1 ESP8266EX PROGMEM 2 PROGMEM PROGMEM Flash 3 PROGMEM V1.0 1.... 1 1.1. ESP8266EX... 1 1.2. PROGMEM... 1 2. PROGMEM... 2 2.1.

More information

WizFi250 Quick Start Guide

WizFi250 Quick Start Guide WizFi250 Quick Start Guide WizFi250 Evaluation Board The WizFi250 EVB is the evaluation board for testing WizFi250 and prototyping development. WizFi250 EVB is composed of a WizFi250 evaluation board and

More information

Web Development and HTML. Shan-Hung Wu CS, NTHU

Web Development and HTML. Shan-Hung Wu CS, NTHU Web Development and HTML Shan-Hung Wu CS, NTHU Outline How does Internet Work? Web Development HTML Block vs. Inline elements Lists Links and Attributes Tables Forms 2 Outline How does Internet Work? Web

More information

In this session we will cover the following sub-topics: 1.Identifiers 2.Variables 3.Keywords 4.Statements 5.Comments 6.Whitespaces 7.Syntax 8.

In this session we will cover the following sub-topics: 1.Identifiers 2.Variables 3.Keywords 4.Statements 5.Comments 6.Whitespaces 7.Syntax 8. In this session we will cover the following sub-topics: 1.Identifiers 2.Variables 3.Keywords 4.Statements 5.Comments 6.Whitespaces 7.Syntax 8.Semantic www.tenouk.com, 1/16 C IDENTIFIERS 1. Is a unique

More information

Software Design Abstract Data Types

Software Design Abstract Data Types Software Design Abstract Data Types 1 Software Design top down, bottom up, object-oriented abstract data types 2 Specifying a ClassClock date and time in a C++ program encapsulating C code public and private

More information

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space. HTML Summary Structure All of the following are containers. Structure Contains the entire web page. Contains information

More information

Sten-SLATE ESP Kit. Description and Programming

Sten-SLATE ESP Kit. Description and Programming Sten-SLATE ESP Kit Description and Programming Stensat Group LLC, Copyright 2016 Overview In this section, you will be introduced to the processor board electronics and the arduino software. At the end

More information

Sten-SLATE ESP. Accelerometer and I2C Bus

Sten-SLATE ESP. Accelerometer and I2C Bus Sten-SLATE ESP Accelerometer and I2C Bus Stensat Group LLC, Copyright 2016 I2C Bus I2C stands for Inter-Integrated Circuit. It is a serial type interface requiring only two signals, a clock signal and

More information

By completing this practical, the students will learn how to accomplish the following tasks:

By completing this practical, the students will learn how to accomplish the following tasks: By completing this practical, the students will learn how to accomplish the following tasks: Learn different ways by which styles that enable you to customize HTML elements and precisely control the formatting

More information

Send commands via bluetooth, e.g. irise app for Android

Send commands via bluetooth, e.g. irise app for Android /** Sunrise alarm clock Waking up with a sunrise simulation Mood light Send commands via bluetooth, e.g. irise app for Android */ command i20:45z s06:10z dz m1..9e r1z y1z zz tz kz lz bz v1e description

More information

#define API_ENDPOINT " #define HEARTBEAT_INTERVAL // 2 Minutes

#define API_ENDPOINT   #define HEARTBEAT_INTERVAL // 2 Minutes // article version 5/6/18 // Compile using Generic 8266 //RCv disabled alolcated as GPIO // 0 button,2 output, 3 HC12 Set, 1 is still TX /* Using this to disable RCV Serial.begin(115200,SERIAL_8N1,SERIAL_TX_ONLY);

More information

Outline for Weather Station

Outline for Weather Station Outline for Weather Station I. Assembly Instructions (Before and After configuration) Materials Needed: Screwdriver with a hexagonal head (2.5 mm), you may also use an allen wrench. An SD card reader.

More information

Wi-Fi Card/Box. User s Manual

Wi-Fi Card/Box. User s Manual Wi-Fi Card/Box User s Manual Table of Content 1 Overview... 1 1.1 Introduction... 1 1.2 Features... 1 1.3 Product overview... 2 2 Preparation... 3 2.1 Prerequisite... 3 2.2 Installation... 3 3 Wi-Fi Card

More information

a = ^ ^ ^ ^ ^ ^ ^ b = c = a^b =

a = ^ ^ ^ ^ ^ ^ ^ b = c = a^b = a = b = ^ ^ ^ ^ ^ ^ ^ ^ c=a^b= & a&b a b ^ a^b &= a &= b = a = b ^= a ^= b >b >>= a >>= b

More information

Adafruit OLED FeatherWing

Adafruit OLED FeatherWing Adafruit OLED FeatherWing Created by lady ada Last updated on 2018-06-05 04:52:24 AM UTC Guide Contents Guide Contents Overview Pinouts Power Pins I2C Data Pins Optional Buttons Reset Button Assembly Prepare

More information

#include "DHT.h" DHT dht(dhtpin, DHTTYPE); // Date and time functions using a DS1307 RTC connected via I2C and Wire lib

#include DHT.h DHT dht(dhtpin, DHTTYPE); // Date and time functions using a DS1307 RTC connected via I2C and Wire lib #include "DHT.h" #define DHTPIN 2 // what pin we're connected to // Uncomment whatever type you're using! #define DHTTYPE DHT11 // DHT 11 //#define DHTTYPE DHT22 // DHT 22 (AM2302) //#define DHTTYPE DHT21

More information

Embedded System Software and IoT(Internet of Things)

Embedded System Software and IoT(Internet of Things) Embedded System Software and IoT(Internet of Things) 2018. 3. 5 ( 월 ) Division of Electrical Engineering Hanyang University, ERICA Campus Contents 2 Embedded Systems Basic Concepts and Overview Embedded

More information

Arduino Package Tracker

Arduino Package Tracker Arduino Package Tracker Created by Vaughn Shinall Last updated on 2016-02-24 04:25:10 PM EST Guide Contents Guide Contents Overview Parts Credentials Generate Your Sketch Parse Your Output Add an Alert

More information

ECE264 Spring 2014 Exam 2, March 11, 2014

ECE264 Spring 2014 Exam 2, March 11, 2014 ECE264 Spring 2014 Exam 2, March 11, 2014 In signing this statement, I hereby certify that the work on this exam is my own and that I have not copied the work of any other student while completing it.

More information

F_Thingspeak INNEN DG Temperatur- und Druckmessung V1_00. F_Thingspeak INNEN DG Temperatur- und Druckmessung V1_00.ino

F_Thingspeak INNEN DG Temperatur- und Druckmessung V1_00. F_Thingspeak INNEN DG Temperatur- und Druckmessung V1_00.ino F_Thingspeak INNEN DG Temperatur- und Druckmessung V1_00 F_Thingspeak INNEN DG Temperatur- und Druckmessung V1_00.ino 1 /* 2 TEMPERATURMESSUNG INNEN über Thingspeak 3 V1.00 23.06.2015 Übernahme des Programms

More information

Grandstream Networks, Inc. Client Isolation Configuration Guide

Grandstream Networks, Inc. Client Isolation Configuration Guide Grandstream Networks, Inc. Table of Contents INTRODUCTION... 3 CLIENT ISOLATION MODES... 4 CLIENT ISOLATION CONFIGURATION... 5 Client Isolation - Internet Mode... 5 Client Isolation - Radio Mode... 7 Client

More information

Cross-Domain Development Kit XDK110 Platform for Application Development

Cross-Domain Development Kit XDK110 Platform for Application Development HTTP Guide Cross-Domain Development Kit Platform for Application Development Bosch Connected Devices and Solutions : HTTP Guide Document revision 2.0 Document release date 17.08.17 Workbench version 3.0.0

More information

Assignment 2 Solution

Assignment 2 Solution Assignment 2 Solution Date.h #ifndef DATE_H #define DATE_H #include class Date time_t date; public: Date(); Date(const Date&) = default; Date(time_t); // Date in time_t format Date(const char*);

More information

Instruction with Screenshot for WEB

Instruction with Screenshot for WEB Instruction with Screenshot for WEB Step 1: Attaching your external USB storage device: You can attach USB flash disk, USB HDD, USB card reader as your NAS. However, attaching a cell-phone or tablet as

More information

X Board V2 (SKU:DFR0162)

X Board V2 (SKU:DFR0162) X Board V2 (SKU:DFR0162) X-Board V2, DFR0162 Contents 1 Introduction 2 Specifications 3 Pinouts 4 Tutorial 4.1 Requirements 4.2 Wiring Diagram 4.3 Sample code Introduction This is Version 2.0 of the X-board.

More information

Programming 2. Object Oriented Programming. Daniel POP

Programming 2. Object Oriented Programming. Daniel POP Programming 2 Object Oriented Programming Daniel POP Week 4 Agenda 1. Self-reference 2. Modifiers: static 3. Modifiers: const 4. Modifiers: mutable 5. Modifiers: friend Wrap-up last week Constructors Definition:

More information

Guide to practical classes in IoT design and integration

Guide to practical classes in IoT design and integration Guide to practical classes in IoT design and integration for students in Computer Science Introduction This experimental teaching module is first of the kind taught in our department. The study is based

More information

Robotics/Electronics Review for the Final Exam

Robotics/Electronics Review for the Final Exam Robotics/Electronics Review for the Final Exam Unit 1 Review. 1. The battery is 12V, R1 is 400 ohms, and the current through R1 is 20 ma. How many ohms is R2? ohms What is the voltage drop across R1? V

More information

Computer Architectures

Computer Architectures Implementing the door lock with Arduino Gábor Horváth 2017. február 24. Budapest associate professor BUTE Dept. Of Networked Systems and Services ghorvath@hit.bme.hu Outline Aim of the lecture: To show

More information

Chapter 4 Advanced Settings and Features

Chapter 4 Advanced Settings and Features Chapter 4 Advanced Settings and Features This chapter describes the features you can configure or view under Advanced in the main menu of your WiFi range extender. Advanced Wireless Settings Note: The

More information

SOFTWARE CONFIGURATION GUIDE

SOFTWARE CONFIGURATION GUIDE SOFTWARE For Veris Aerospond Wireless Sensors and the NWGWA2 Wireless Gateway INTRODUCTION This guide is intended to aid in the configuration of a wireless network that utilizes the Veris Aerospond NWGWA2

More information

Input Shield For Arduino SKU: DFR0008

Input Shield For Arduino SKU: DFR0008 Input Shield For Arduino SKU: DFR0008 Contents 1 Introduction 2 Specification 3 Pin Allocation 4 Sample Code1 5 Sample Code2 6 Version history Introduction The upgraded Arduino Input Shield includes a

More information

Please scan the QR code to download the latest App software.

Please scan the QR code to download the latest App software. Please scan the QR code to download the latest App software. Or download Smart Life-smart home from APP Store or Google Play. The latest App software includes air conditioner, dehumidifier and Portable

More information

Programming in C. What is C?... What is C?

Programming in C. What is C?... What is C? C Programming in C UVic SEng 265 Developed by Brian Kernighan and Dennis Ritchie of Bell Labs Earlier, in 1969, Ritchie and Thompson developed the Unix operating system We will be focusing on a version

More information

Programming in C UVic SEng 265

Programming in C UVic SEng 265 Programming in C UVic SEng 265 Daniel M. German Department of Computer Science University of Victoria 1 SEng 265 dmgerman@uvic.ca C Developed by Brian Kernighan and Dennis Ritchie of Bell Labs Earlier,

More information

PuddlePeeker a system to monitor the water level at the bottom of the vertical cryostat in FREIA

PuddlePeeker a system to monitor the water level at the bottom of the vertical cryostat in FREIA FREIA Report 2018/02 March 22, 2018 Department of Physics and Astronomy Uppsala University PuddlePeeker a system to monitor the water level at the bottom of the vertical cryostat in FREIA V. Ziemann Uppsala

More information

#include "quaternionfilters.h" #include "MPU9250.h" data read #define SerialDebug true // Set to true to get Serial output for debugging

#include quaternionfilters.h #include MPU9250.h data read #define SerialDebug true // Set to true to get Serial output for debugging /*Hardware setup: MPU9250 Breakout --------- Arduino VDD ---------------------- 3.3V VDDI --------------------- 3.3V SDA ----------------------- A4 SCL ----------------------- A5 GND ----------------------

More information

Web-Based Design and Implementation of Smart Home Appliances Control System

Web-Based Design and Implementation of Smart Home Appliances Control System IOP Conference Series: Earth and Environmental Science PAPER OPEN ACCESS Web-Based Design and Implementation of Smart Home Appliances Control System To cite this article: Samuel Bimenyimana et al 2018

More information

Programming in C. What is C?... What is C?

Programming in C. What is C?... What is C? Programming in C UVic SEng 265 C Developed by Brian Kernighan and Dennis Ritchie of Bell Labs Earlier, in 1969, Ritchie and Thompson developed the Unix operating system We will be focusing on a version

More information

ESP8266 Weather Station User Guide V 1.0 Mar 2017

ESP8266 Weather Station User Guide V 1.0 Mar 2017 ESP8266 Weather Station User Guide V 1.0 Mar 2017 Contents 1. Introduction...4 2. Assembly...5 A. ESP8266 Module...5 B. OLED Display...6 C. DHT11 Humidity & Temperature Sensor...7 D. Wires & Cables...8

More information

Adafruit CC3000 WiFi and Xively

Adafruit CC3000 WiFi and Xively Adafruit CC3000 WiFi and Xively Created by Marc-Olivier Schwartz Last updated on 2018-08-22 03:37:52 PM UTC Guide Contents Guide Contents Introduction Setting up your Xively account Connections DHT11 sensor

More information

Chapter 5 Networking and Hacks

Chapter 5 Networking and Hacks Chapter 5 Networking and Hacks Computers, mobile devices, surveillance systems, robots, cameras, smart TVs, thermostats, and many other devices can communicate each other using wired or wireless interfaces.

More information

Computer Science & Engineering Department I. I. T. Kharagpur

Computer Science & Engineering Department I. I. T. Kharagpur Computer Science & Engineering Department I. I. T. Kharagpur Operating System: CS33007 3rd Year CSE: 5th Semester (Autumn 2006-2007) Lecture III (Linux System Calls II) Goutam Biswas Date: 1st-7th August,

More information

File System Storage File System Storage There are times when storing data in a file can be useful. The data can be collected from sensors or can be configuration data. Whatever it is, the FS library provides

More information

LISTING PROGRAM. 1. Bahasa Pemrograman C #include <Servo.h> Servo myservo;

LISTING PROGRAM. 1. Bahasa Pemrograman C #include <Servo.h> Servo myservo; 1 LISTING PROGRAM 1. Bahasa Pemrograman C #include Servo myservo; int pos = 70; int baris1 = A0; int baris2 = A1; int baris3 = A3; int kolom1 = 12; int kolom2 = 7; int kolom3 = 6; int vbaris1

More information

Programming in C++ 4. The lexical basis of C++

Programming in C++ 4. The lexical basis of C++ Programming in C++ 4. The lexical basis of C++! Characters and tokens! Permissible characters! Comments & white spaces! Identifiers! Keywords! Constants! Operators! Summary 1 Characters and tokens A C++

More information

USER MANUAL WI-LIGHT REMOTE APPLICATION

USER MANUAL WI-LIGHT REMOTE APPLICATION USER MANUAL WI-LIGHT REMOTE APPLICATION User Manual - Wi-light remote application 1 SUMMARY Connect to a Stand Alone device with the Wi-light application... 3 Connect the software smartphone server with

More information

Arduino notes IDE. Serial commands. Arduino C language. Program structure. Arduino web site:

Arduino notes IDE. Serial commands. Arduino C language. Program structure. Arduino web site: 1 Arduino notes This is not a tutorial, but a collection of personal notes to remember the essentials of Arduino programming. The program fragments are snippets that represent the essential pieces of code,

More information