This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from network import WLAN, STA_IF | |
from time import sleep | |
import socket | |
from machine import Pin | |
import uasyncio as asyncio | |
SSID = 'devicemart' | |
PASSWORD = 'devicemart1' | |
HTML = '''<!DOCTYPE html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from network import WLAN, STA_IF | |
from time import sleep | |
import socket | |
from machine import Pin | |
led = Pin(18, Pin.OUT) | |
led.value(0) | |
SSID = 'devicemart' | |
PASSWORD = 'devicemart1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from network import WLAN, STA_IF | |
from time import sleep | |
import socket | |
SSID = 'devicemart' | |
PASSWORD = 'devicemart1' | |
HTML = '''<!DOCTYPE html> | |
<html> | |
<head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from network import WLAN, STA_IF | |
from time import sleep | |
import socket | |
SSID = 'devicemart' | |
PASSWORD = 'devicemart1' | |
wlan = WLAN(STA_IF) | |
wlan.active(True) | |
wlan.connect(SSID, PASSWORD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from network import WLAN, STA_IF | |
from time import sleep | |
SSID = 'devicemart' | |
PASSWORD = 'devicemart1' | |
wlan = WLAN(STA_IF) | |
wlan.active(True) | |
wlan.connect(SSID, PASSWORD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, SoftI2C, ADC, Timer | |
from ssd1306 import SSD1306_I2C | |
i2c = SoftI2C(sda=Pin(13), scl=Pin(14)) | |
display = SSD1306_I2C(128, 64, i2c, addr=0x3C) | |
adc = ADC(Pin(36)) | |
def on_timeout(_): | |
display.fill(0) | |
display.text('DeviceMart', 0, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, SoftI2C, RTC, Timer | |
from ssd1306 import SSD1306_I2C | |
WEEK = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] | |
# Mon ~ Sun : 0 ~ 6 | |
# ex) 01:20:05 | |
pads = ['', '', ''] | |
i2c = SoftI2C(sda=Pin(13), scl=Pin(14)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 6 | |
#define NUMPIXELS 16 | |
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cm1106_i2c.h> | |
CM1106_I2C cm1106_i2c; | |
void setup() { | |
cm1106_i2c.begin(); | |
delay(1000); | |
} | |
void loop() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import SoftI2C, Pin | |
from ssd1306 import SSD1306_I2C | |
i2c = SoftI2C(sda=Pin(13), scl=Pin(14)) | |
display = SSD1306_I2C(128, 64, i2c, addr=0x3C) | |
# 0 : OFF/BLACK, 1 : ON/WHITE | |
display.fill(0) | |
display.show() |
NewerOlder