เมื่อทำการเซต forward port เรียบร้อย ไม่จำเป็นต้อง restart router ก็ได้
ตอนนี้ จะสามารถเข้าถึง server ของเราในเครือข่ายได้ จากที่ไหนก็ตามผ่าน internet โดยใช้ public ip ดูจาก myipaddress
Specification
-Set Date and Time manualy with the date/time menu page.
-The data is not lost when there is no power supply.
-Set up 2 periods for each relays. (Increase the number of relays later with just only copy code.)
( 1 periods = timer on and timer off, the timer can be canceled. )
PS. this project will demonstrate with 2 relays.
-Relays can be added with inferface on pcf8574 io pin.
-Setting timer from a menu page,easily.
-Can control each of relay by directly and independently with working of aruduino code .
(Relays connected on the pcf8574 pin)
-Show Temparature in C degree.
-Can be applied with other project.
Wiring diagrams for PCF8574 and 4x3 keypad can be found under
* examples directory. Library runs correctly without cols pull-up
* resistors but it's better to use it
R1, R2 and R3 are 10K
Note: Add a 220Ohm resistor in series with each column to avoid possible shorts between a HIGH and a LOW line when pushing multiple keys at a time.
/// Your problem should be solved if you look up this solution at https://sites.google.com/site/kingauswebpage/my-projects/cannot-find-wconstants-h "When compile an Arduino Library, it fails to compile with the message:
/////
I just find the solution.
First, Wire has some new wording...
Wire.send is now Wire.write
Wire.receive is now Wire.read
You must change it on the .cpp file.
Then for the millis error you just need to:
#include <Arduino.h> in the header of the .cpp file again.
And as I'm working with the Arduino UNO the SDA and SCL port are different in the examples here it says:
SCL to port A0
SDA to port A1
And the correct ones (for the UNO) are:
SCL 5
SDA 4
I hope you find this info useful!
Saludos from Chile!
What is SDA and SCL? SDA = TX Data SCL = RX Data (Clock) nodeMCU
martinayotte wrote:The default pins are defined in variants/nodemcu/pins_arduino.h as SDA=4 and SCL=5, but those are not pins number but GPIO number, so since the pins are D1=5 and D2=4. Anyway, you can also choose the pins yourself using the I2C constructor Wire.begin(int sda, int scl); - See more at: http://www.esp8266.com/viewtopic.php?f=13&t=10374#sthash.Ahy4UbNy.dpuf