In the end of setup():
pinMode(D5, INPUT_PULLUP); // enable button pin
pinMode(D4, OUTPUT); // enable LED pin
In the beginning of loop():
if(digitalRead(D5)){
if(!attack.isRunning()){
| /* | |
| Bismilla, percobaan RTC dan relay untuk my students. | |
| */ | |
| #include <DS3231.h> | |
| //init rtc | |
| DS3231 rtc(SDA, SCL); |
| # -*- coding: utf-8 -*- | |
| """ | |
| Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic | |
| Made available under GNU GENERAL PUBLIC LICENSE | |
| # Modified Python I2C library for Raspberry Pi | |
| # as found on http://www.recantha.co.uk/blog/?p=4849 | |
| # Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library | |
| # added bits and pieces from various sources | |
| # By DenisFromHR (Denis Pleic) |
| #!/usr/bin/python3 | |
| ''' | |
| jadwal_lampu.py | |
| rev. 2 17/03/2017 | |
| program untuk on/off lampu secara realtime sesuai jam yang ditentukan. | |
| menggunakan library RPi.GPIO. | |
| PIN nomor 40 digunakan untuk trigger relay (Gunakan driver relay seperti transistor) | |
| ''' |
| #! /bin/sh | |
| # /etc/init.d/ngrok | |
| case "$1" in | |
| start) | |
| echo "Ngrok service is starting" | |
| screen -d m /etc/init.d/ngrok start -all -config /home/pi/.ngrok2/ngrok.yml | |
| echo "Ngrok service was started" | |
| ;; | |
| stop) |
| 2018-03-14 08:48:29 1144 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: Using mutexes to ref count buffer pool pages | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: The InnoDB memory heap is disabled | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: Compressed tables use zlib 1.2.3 | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: Using generic crc32 instructions | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: Initializing buffer pool, size = 256.0M | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: Completed initialization of buffer pool | |
| 2018-03-14 8:48:29 4420 [Note] InnoDB: Highest supported file format is Barracuda. |
In the end of setup():
pinMode(D5, INPUT_PULLUP); // enable button pin
pinMode(D4, OUTPUT); // enable LED pin
In the beginning of loop():
if(digitalRead(D5)){
if(!attack.isRunning()){
| import machine | |
| import usocket as socket | |
| import ure | |
| import utime as time | |
| from network import WLAN, STA_IF | |
| led = machine.Pin(2, machine.Pin.OUT) | |
| lamp = machine.Pin(12, machine.Pin.OUT) | |
| fan = machine.Pin(13, machine.Pin.OUT) |
| # /etc/nginx/conf.d/blog.sumarsono.com.conf | |
| server { | |
| server_name blog.sumarsono.com; | |
| root /var/www/html/blog; | |
| index index.php index.html index.htm; | |
| client_max_body_size 100M; | |
| include /etc/nginx/default.d/global_wordpress.conf; |
| server { | |
| listen 80; | |
| server_name yourdomain.com; | |
| root /etc/tomcat7/webapps/apple; | |
| proxy_cache one; | |
| location / { | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; |
| Sep 27 09:45:11 Sailfish systemd[1]: Starting Myriad Alien Dalvik... | |
| Sep 27 09:45:11 Sailfish apkd[4319]: Alien Dalvik is activating (start-pre) | |
| Sep 27 09:45:11 Sailfish apkd[4319]: Alien Dalvik is activating (start) | |
| Sep 27 09:45:11 Sailfish start_alien.sh[6006]: ln: creating symbolic link `/data/misc/camera/camera': File exists | |
| Sep 27 09:45:11 Sailfish start_alien.sh[6006]: /data exists already | |
| Sep 27 09:45:11 Sailfish start_alien.sh[6006]: /data/dalvik-cache exists already | |
| Sep 27 09:45:11 Sailfish start_alien.sh[6006]: /data/app-private exists already | |
| Sep 27 09:45:11 Sailfish start_alien.sh[6006]: /data/app exists already | |
| Sep 27 09:45:11 Sailfish start_alien.sh[6006]: /data/data exists already | |
| Sep 27 09:45:11 Sailfish start_alien.sh[6006]: /data/misc exists already |