Advertisement
KRITSADA

microbit Excercise for VEC 2020 #1

Jan 27th, 2020
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. # เฉลยโจทย์การแข่งขัน ที่ใช้จอแสดงผล OLED แสดงตัวอักษรทีละตัว โดยมีจำนวนบรรทัดน้อยที่สุด
  2. #3. แสดงข้อความ โดยแสดงทีละตัวอักษร (จำกัดบรรทัดการเขียนโค้ด)
  3. from microbit import *
  4. from ssd1306 import *
  5. from ssd1306_text import *
  6.  
  7. a = ["Innovative", "Experiment", "02-747-7001", "inex.co.th"]
  8. initialize()
  9. clear_oled()
  10. for j in range(0, 4):
  11.     x = a[j]
  12.     for i in range(0, len(x)):
  13.         add_text(i, j, x[i])
  14.         sleep(300)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement