Create display.py
This commit is contained in:
22
display.py
Normal file
22
display.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
from machine import Pin
|
||||||
|
import time
|
||||||
|
import display
|
||||||
|
from display import oled
|
||||||
|
|
||||||
|
tipka=Pin(12, Pin.IN)
|
||||||
|
display.init()
|
||||||
|
oled.fill(1)
|
||||||
|
oled.show()
|
||||||
|
time.sleep(1)
|
||||||
|
oled.fill(0)
|
||||||
|
oled.show()
|
||||||
|
i=0
|
||||||
|
|
||||||
|
while tipka.value():
|
||||||
|
if i==60:
|
||||||
|
i=0
|
||||||
|
oled.fill(0)
|
||||||
|
var = input()
|
||||||
|
oled.text(var,0,i)
|
||||||
|
oled.show()
|
||||||
|
i=i+10
|
||||||
Reference in New Issue
Block a user