Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Programming manual, turn off, turn on the light, English

Programming manual, turn off, turn on the light, English

Description: Programming manual, turn off, turn on the light, English โดยจำรัส เจริญเขตต์ ขอสงวนสิทธิทุกกรณี

Keywords: Programming manual, turn off, turn on the light,จำรัส เจริญเขตต์,หนังสือ

Search

Read the Text Version

Programming manual to control the lights on and off professionally by yourself. There are 3 types of polarity selection: 1.Digital 2.Analog 3. Virtual. Which one to choose depends on the usage, but different. In each system, there is a device pin letter that will be used to match the CODE or program. We write it must match. Here we use Virtual mode, set the pin to the letter V meaning Virtual. It is a signal that looks like a pin of the micros. But will send the value over the internet instead By Chamrat charoenkhet reserve the right page ๕๑

Programming manual to control the lights on and off professionally by yourself. 2.4 Settings to choose as V 4 by choosing according to the picture 2.5 Setting V 5 by choosing according to the picture By Chamrat charoenkhet reserve the right page ๕๒

Programming manual to control the lights on and off professionally by yourself. 2.6 Setting V 10 by choosing according to the picture 2.7 Setting V 9 by choosing according to the picture By Chamrat charoenkhet reserve the right page ๕๓

Programming manual to control the lights on and off professionally by yourself. 2.8 Setting V 8 by choosing according to the picture 2.9 Setting V 7 by choosing according to the picture By Chamrat charoenkhet reserve the right page ๕๔

Programming manual to control the lights on and off professionally by yourself. 2.10 Setting V 3 by choosing according to the picture 2.11 Setting V 2 by choosing according to the picture By Chamrat charoenkhet reserve the right page ๕๕

Programming manual to control the lights on and off professionally by yourself. 2.12 Setting V 1 by choosing according to the picture 2.13 Setting V 0 by choosing according to the picture By Chamrat charoenkhet reserve the right page ๕๖

Programming manual to control the lights on and off professionally by yourself. 2.1 Setting V 5 by choosing according to the picture 2.15 Set the system name and check the information. By Chamrat charoenkhet reserve the right page ๕๗

Programming manual to control the lights on and off professionally by yourself. 2.16 Define and verify information 2.17 This picture is tested and ordered to open. Can turn off each lamp By Chamrat charoenkhet reserve the right page ๕๘

Programming manual to control the lights on and off professionally by yourself. 2.18 This picture Test, test, order to turn on all lamps at the same time 2.19 This picture can be tested to turn off all lights at the same time. By Chamrat charoenkhet reserve the right page ๕๙

Programming manual to control the lights on and off professionally by yourself. 2.20 This picture test order to open can turn off each lamp 2.21 This picture test order to open can turn off each lamp By Chamrat charoenkhet reserve the right page ๖๐

Programming manual to control the lights on and off professionally by yourself. 2.22 This picture test order to open can turn off each lamp 2.23 This picture test order to open can turn off each lamp By Chamrat charoenkhet reserve the right page ๖๑

Programming manual to control the lights on and off professionally by yourself. 2.24 This picture is tested and ordered to open. Turn off the light at a single bulb or a single point to be controlled. 2.25 Test to order to turn on and off 2 lamps or 2 points at a time. By Chamrat charoenkhet reserve the right page ๖๒

Programming manual to control the lights on and off professionally by yourself. 2.26 Adjusting the color as you watch . By Chamrat charoenkhet reserve the right page ๖๓

Programming manual to control the lights on and off professionally by yourself. 2.27 Press View to adjust the color perspective. 2.28 Naming the adaptation we use By Chamrat charoenkhet reserve the right page ๖๔

Programming manual to control the lights on and off professionally by yourself. 2.29 Settings to be displayed on the screen By Chamrat charoenkhet reserve the right page ๖๕

Programming manual to control the lights on and off professionally by yourself. By Chamrat charoenkhet reserve the right page ๖๖

Programming manual to control the lights on and off professionally by yourself. 2.30 Program operation menu Operation when pressing the button on the screen. Commanding the System App Send commands to the app Blynk to get what you want. By Chamrat charoenkhet reserve the right page ๖๗

Programming manual to control the lights on and off professionally by yourself. Lesson 9 Programming Symbols Meanings or symbols in programming Knowledge required to read and write programs. Understanding symbols required to write basic programming. Language Reference The Arduino programming language can be divided into three main parts: functions, values (variables and constants), and structures that need to be studied. All of these may not be necessary to attend all of the training, but should know the basics to continue to develop and develop. of the program as follows: https://www.arduino.cc/reference/en/ 1 Functions 2.Variables 3.Structure 1. What are the functions? digital I/O page ๖๘ digitalRead() digitalWrite() pinMode() Analog I/O analogRead() analogReference() analogWrite() Zero, Due & MKR Family analogReadResolution() analogWriteResolution() Advanced I/O noTone() pulseIn() pulseInLong() shiftIn() shiftOut() tone() Time By Chamrat charoenkhet reserve the right

Programming manual to control the lights on and off professionally by yourself. delay() page ๖๙ delayMicroseconds() micros() millis() Math abs() constrain() map() max() min() pow() sq() sqrt() Trigonometry cos() sin() tan() Characters isAlpha() isAlphaNumeric() isAscii() isControl() isDigit() isGraph() isHexadecimalDigit() isLowerCase() isPrintable() isPunct() isSpace() isUpperCase() isWhitespace() Random Numbers random() randomSeed() Bits and Bytes bit() bitClear() bitRead() bitSet() bitWrite() highByte() lowByte() By Chamrat charoenkhet reserve the right

Programming manual to control the lights on and off professionally by yourself. External Interrupts attachInterrupt() detachInterrupt() Interrupts interrupts() noInterrupts() Communication Serial Stream USB Keyboard Mouse 2. What are the variables? page ๗๐ constants HIGH | LOW INPUT | OUTPUT | INPUT_PULLUP LED_BUILTIN true | false Floating Point Constants Integer Constants Conversion (unsigned int) (unsigned long) byte() char() float() int() long() word() Data Types array bool boolean byte char double float int By Chamrat charoenkhet reserve the right

Programming manual to control the lights on and off professionally by yourself. long short size_t string String() unsigned char unsigned int unsigned long void word Variable Scope & Qualifiers const scope static volatile Utilities PROGMEM sizeof() 3. What is the structure? page ๗๑ Sketch loop() setup() Control Structure break continue do...while else for goto if return switch...case while Further Syntax #define (define) #include (include) /* */ (block comment) // (single line comment) By Chamrat charoenkhet reserve the right

Programming manual to control the lights on and off professionally by yourself. ; (semicolon) page ๗๒ {} (curly braces) Arithmetic Operators % (remainder) * (multiplication) + (addition) - (subtraction) / (division) = (assignment operator) Comparison Operators != (not equal to) < (less than) <= (less than or equal to) == (equal to) > (greater than) >= (greater than or equal to) Boolean Operators ! (logical not) && (logical and) || (logical or) Pointer Access Operators & (reference operator) * (dereference operator) Bitwise Operators & (bitwise and) << (bitshift left) >> (bitshift right) ^ (bitwise xor) | (bitwise or) ~ (bitwise not) Compound Operators %= (compound remainder) &= (compound bitwise and) *= (compound multiplication) ++ (increment) += (compound addition) -- (decrement) -= (compound subtraction) /= (compound division) ^= (compound bitwise xor) |= (compound By Chamrat charoenkhet reserve the right

Programming manual to control the lights on and off professionally by yourself. applying for Memorized code or individual code 1. Must have email or use the mobile system to get the code or code of Auth to use 2. ssid and pass from Wi-Fi of each house or organization Information from the mail this information from the settings from the mobile press send to. Your own mail will get the Auth token For………………the name of the system that is set..................and the name that is used that What's your name? (Example) Auth token : “………………………the code or code of each person…………………………………….” Note the link to study further. http://docs.blynk.cc/ หรอื http://docs.blynk.cc/#blynk- server By Chamrat charoenkhet reserve the right page ๗๓

Programming manual to control the lights on and off professionally by yourself. Do you have to use your own Blynk because it will be your own ” Blynk server ” that people create a system that stores the code. The system works for free. The word press means pressing twice quickly on the right mouse or left mouse to open the program or press to save. which is called another name “Double Click” By Chamrat charoenkhet reserve the right page ๗๔

Programming manual to control the lights on and off professionally by yourself. Training Lesson 10 Implementation 1. Control to turn on/off the street light 2. Control to turn on and off the headlights of the house 3. Control to turn on and off the garden light 4. Control the on-off goose light 5. Control the on/off of the water pump 6. Control the on/off of the kitchen light 7. Control the on/off of the basement light. 8. Control to turn on and off the fence lights Vocabulary you need to know 1. SSID refers to the Wi-Fi name code. It is a wireless network. Can be used by multiple people Use the same set code when we order to turn on the light via mobile can connect to Wi-Fi all over the world through mobile system 2. Pass means the password field of the Wi-Fi used. 3. VCC power positive terminal for raising the circuit 4. VIN power supply 5 volts. 5. Analog 6. Ground to the ground or the ground wire. 7. Loop after creating setup () function which will initialize and initialize the loop () function, exactly as its name suggests. And iterate continuously Make your program changeable and responsive. Used to actively control the Arduino board. By Chamrat charoenkhet reserve the right page ๗๕

Programming manual to control the lights on and off professionally by yourself. 8. Setup The setup () function is called when the sketch is initialized. Used to initialize a variable. Pin mode starts the library. etc. setup() function will run only once. After each power-on or reset of the Arduino board 9. DigitalRead () Reads the value from either the specified digital pin or HIGHLOW. 10. digitalWrite () Write a HIGH or LOW value to the digital pin if the pin is configured as OUTPUT with. pinMode() voltage will be set to the corresponding values: 5V (or 3.3V on the 3.3V board) for HIGH, 0V (Ground) for LOW. If the pin is set to INPUT, digitalWrite() is on. Active ( HIGH) or disabled ( LOW)Retrieves the internals of the input pins. It is recommended to set pinMode() to INPUT_PULLUP to enable internal pull-up resistors. Watch Digital Tutorials Pins For more information, if you don't set pinMode() to OUTPUT and connect to the LED pin, when calling digitalWrite(HIGH), the LED may appear dim, without explicitly setting pinMode(), digitalWrite() would have been enabled. Internal pull-up resistor which acts like a large current limiting resistor. 11. pinMode() Configures the specified pin to work as input or output. See the Digital page. Pins For details about the pin operation, as of Arduino 1.0.1, it is possible to enable the internal INPUT_PULLUP pull-up resistor with the \"INPUT_PULLUP\" mode. Additionally, INPUT mode explicitly disables internal retrieval. 12. Analog Write () Writes an analog value (PWM wave) to the pin. It can be used to light an LED at various brightness. Or drive the motor at various speeds After calling analog Write () at The pin generates a fixed square wave of the specified duty cycle until the By Chamrat charoenkhet reserve the right page ๗๖

Programming manual to control the lights on and off professionally by yourself. next analog Write () (or call to digitalRead() or digitalWrite()) is called on the same pin. 13. Pin level assignments: HIGH and LOW, HIGH and LOW. When reading or writing to a digital pin, there are only two possible pin values that can be used/received to be set: HIGH and LOW. HIGH  The meaning of HIGH (in reference to legs) is quite different depending on whether the leg is defined as INPUT. OUTPUT when the pin is set to INPUTwith pinMode() and read with digitalRead()Arduino (ATmega) will report HIGH if: There is a voltage greater than 3.0V at the pin (board 5V). • There is a voltage greater than 2.0V at the pin (3.3V board).  A pin may be configured as INPUT with pinMode () and subsequently created HIGH with digitalWrite (). This will enable an internal 20K pull-up resistor which will pull the input pin up to a HIGH reading unless it is pulled LOW by an external circuit. This can be done another way by passing the INPUT_PULLUP argument to the pinMode () function. As described in more detail in the section \"Digital Pins mode assignments: INPUT, INPUT_PULLUP and OUTPUT\" below.  When pin is configured to OUTPUT with pinMode() and set to HIGH with digitalWrite() pins are located at: • 5 volts (board 5V) • 3.3 Volts (3.3V board) By Chamrat charoenkhet reserve the right page ๗๗

Programming manual to control the lights on and off professionally by yourself. In this state, power can be supplied, for example, an LED connected through a resistor in series to ground. LOW The meaning of LOW also has a different meaning depending on whether the pin is set or INPUT. OUTPUT when the pin is set to INPUT with pinMode () and read with digitalRead () The Arduino (ATmega) will report LOW if: • The voltage is less than 1.5V at the pin (board 5V). • There is voltage less than 1.0V (approximately) on the pin (3.3V board). When the pin is configured as OUTPUT with pinMode () and set to LOW with The digitalWrite () pin is at 0 volts (both the 5V and 3.3V boards). In this state it can sink current, for example, lighting an LED connected through a series resistor to +5V (or +3.3V). LD.) By Chamrat charoenkhet reserve the right page ๗๘

Programming manual to control the lights on and off professionally by yourself. List of devices used number list quantity picture 1 Computers with Windows operating 1 unit system from Windows 7 or higher. Ready to install program Arduino IDE 2 Android phone with App Blynk 1 unit installed 3 NodeMCU ESP8622 v.3 1 board 4 NodeMCU ESP8622 Base 1 board 5 Relay board type 8 channel 5V 1 board By Chamrat charoenkhet reserve the right page ๗๙

Programming manual to control the lights on and off professionally by yourself. 6 USB cable 1 line 7 Circuit connection cable (female- 12 lines female jump cable) 8 Power supply or mobile charger 1 plug character 9 220 volt light bulb 8 sets 10 with wires and terminals 8 sets 11 Control panel kit transparent box 1 box 12 fastening nut By Chamrat charoenkhet reserve the right page ๘๐

Programming manual to control the lights on and off professionally by yourself. If you want to test the circuit, may use LED lamps instead of 220 volt lamps. The rest is still necessary to use. Just don't use 220 volts of electricity. number list quantity picture 1 test board 1 2 colorful LED bulbs 8 tubes 3 Resistor Size 220-330 ohm 8 Resistor Resistance 1/4 Watt characters Resistance mistake 5% By Chamrat charoenkhet reserve the right page ๘๑

Programming manual to control the lights on and off professionally by yourself. Training Lesson 11 Applying it to use study the cycle Additional provided Try this link https://www.cybertice.com/article Such as 1. Measure temperature and humidity with Sensor DHT22 AM2302 2. Use to connect Bluetooth Module HC05 to turn on and off the house lights. 3. Use Arduino to measure temperature with Sensor DS18B20. 4. Use the Arduino PIR Sensor HC-SR501 to detect the heat of living things, control the LED lights on and off. By Chamrat charoenkhet reserve the right page ๘๒

Programming manual to control the lights on and off professionally by yourself. 5. Example of automatic watering system 6. LED lamp dimming system to reduce light and save energy. By Chamrat charoenkhet reserve the right page ๘๓

Programming manual to control the lights on and off professionally by yourself. Appendix By Chamrat charoenkhet reserve the right page ๘๔

Programming manual to control the lights on and off professionally by yourself. Usage example 8 point device control How to use Experimental equipment 1. Board mounting bracket ESP8266 V3 2. Board ESP8266 V3 Wi-Fi By Chamrat charoenkhet reserve the right page ๘๕

Programming manual to control the lights on and off professionally by yourself. 3. Set of 8 relays and 2 pieces 4. Electric bulb By Chamrat charoenkhet reserve the right page ๘๖

Programming manual to control the lights on and off professionally by yourself. 5. Jump type power branch, male and female 6. Tube LED 7. Resistor By Chamrat charoenkhet reserve the right page ๘๗

Programming manual to control the lights on and off professionally by yourself. 9. Mobile charger 10. Multi-purpose printed sheet 11. Dry head with lead solder page ๘๘ By Chamrat charoenkhet reserve the right

Programming manual to control the lights on and off professionally by yourself. Electrical circuit for use Relay1 connector GPIO 16 Do Relay2 connector GPIO 05 D1 Relay3 connector GPIO 04 D2 Relay4 connector GPIO 15 D8 Relay7 connector GPIO 13 D7 Relay6 connector GPIO 03 D9 Relay7 connector GPIO 01 D10 Relay8 connector GPIO 12 D4 By Chamrat charoenkhet reserve the right page ๘๙

Programming manual to control the lights on and off professionally by yourself. Relay1 connector GPIO 16 Do page ๙๐ Relay2 connector GPIO 05 D1 Relay3 connector GPIO 04 D2 Relay4 connector GPIO 15 D8 Relay7 connector GPIO 13 D7 Relay6 connector GPIO 03 D9 Relay7 connector GPIO 01 D10 Relay8 connector GPIO 12 D4 By Chamrat charoenkhet reserve the right

Programming manual to control the lights on and off professionally by yourself. Note the relay's terminal board. The board type has 8 relays. Pin terminal IN8 IN7 In6 IN5 IN4 IN3 IN2 IN1 Com GND VCC By Chamrat charoenkhet reserve the right page ๙๑

Programming manual to control the lights on and off professionally by yourself. Note the relay's terminal board. The board type has 2 relays. Pin terminal VCC VCC GND Pin terminal GND IN1 IN2 VCC By Chamrat charoenkhet reserve the right page ๙๒

Programming manual to control the lights on and off professionally by yourself. Wired to use as designed in the program. Relay1 connector GPIO 16 Do Relay2 connector GPIO 05 D1 Relay3 connector GPIO 04 D2 Relay4 connector GPIO 15 D8 Relay7 connector GPIO 13 D7 Relay6 connector GPIO 03 D9 Relay7 connector PIO 01 D10 Relay8 connector GPIO 12 D4 By Chamrat charoenkhet reserve the right page ๙๓

Programming manual to control the lights on and off professionally by yourself. Test exercises after training Let the trainees modify the work order program. To match the App BLYNK screen as Shown in the picture, to be able to turn on-off the light, give 30 minutes with 100 Points, divide the App Blynk score by 50 points, can be turned on-off, normally 50 Points, a total of 100 points, to be considered through training By Chamrat charoenkhet reserve the right page ๙๔

Programming manual to control the lights on and off professionally by yourself. Additional references Information link for more study information at this link. 1. Data link https://shopee.co.th/ 2. Data link https://www.cybertice.com/article 3. Data link http://docs.blynk.cc/ หรือ http://docs.blynk.cc/#blynk-server 4. Data link https://netpie.gitbooks.io/nodemcu-esp8266-on- netpie/content/chapter1.html 5. Data link https://www.arduino.cc/en/software 6. Data link https://www.arduino.cc 7. Data link http://arduino.esp8266.com/stable/package_esp8266com_index.json 8. Data link http://www.mediafire.com/file/c9pyi2u7g93iqt6/CH341SER.ZIP/file 9. Data link https://www.arduino.cc/reference/en/ 10. Data link https://www.lazada.co.th/ By Chamrat charoenkhet reserve the right page ๙๕

Programming manual to control the lights on and off professionally by yourself. Author bio Academic works 1. Prepare documents for training the tractor braking system. 2. Prepare industrial machine technology manuals and sewing aids 3. Prepare a manual for sewing equipment technology. 4. Prepare a manual on how to adjust the comparison for the tractor. 5. Prepare documents for training of motorcycle repair technician’s small engine 6. Prepare a handbook for the test takers of the National Skills Standards bus air conditioner 7. Prepare a handbook for the national skill standard test takers. Small car air conditioner 8. Prepare a manual on the preparation of labor skill standards under section 26 9. Organize a small electric vehicle assembly technician course 10. Prepare a course for technicians in sewing equipment technology. 11. Translation of academic documents 12. Curriculum Drafting Committee for Vocational Certificate in Motorcycle Mechanic 13. Automotive technology training in Germany 14. Techniques for repairing industrial machines and cooling aids in Japan 14. AQRF education system training in Singapore 15. Study trip to the United States, China, Germany, Hong Kong, Philippines, Taiwan, Korea, France, and Japan By Chamrat charoenkhet reserve the right page ๙๖