-
Notifications
You must be signed in to change notification settings - Fork 1
Samples_SNTP
Ko-ichiro Sugiyama edited this page Mar 3, 2023
·
8 revisions
SNTP クラスのメソッドについては,Class_SNTP を参照されたい.
sleep 0.1
wlan = WLAN.new('STA', WLAN::ACTIVE)
# connect
wlan.connect("essid", "pass")
# SNTP
time = SNTP.new()
# 表示
puts "現在時刻:"
puts sprintf("%04d-%02d-%02d %02d:%02d:%02d", time.year, time.mon, time.mday, time.hour, time.min, time.sec)