Skip to content

Commit

Permalink
Update current_temporature.py
Browse files Browse the repository at this point in the history
  • Loading branch information
inunosinsi authored May 19, 2023
1 parent 9260730 commit c65122c
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions current_temporature.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,31 @@
ADDS_COM = 0x3C #60
ADDS_DATA = 0x3D #61

DSPNUM_WB = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] # black
DSPNUM_WW = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] # white

numbers = [
[0xbf, 0x1f], # 0
[0x1f, 0x00], # 1
[0xfd, 0x17], # 2
[0xf5, 0x1f], # 3
[0x47, 0x1f], # 4
[0xf7, 0x1d], # 5
[0xff, 0x1d], # 6
[0x21, 0x1f], # 7
[0xff, 0x1f], # 8
[0xf7, 0x1f] # 9
]

radix_point = 0x20
degree_centigrad = 0x05
Fahrenheit_degree = 0x06
BLE = 0x08
POW = 0x10
First_black = 0x1f
First_white = 0x00


class EPD:
def reset(self):
RST_PIN.write_digital(1)
Expand Down Expand Up @@ -167,32 +192,7 @@ def sleep(self):
sleep(2000)
RST_PIN.write_digital(0)

DSPNUM_WB = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] # black
DSPNUM_WW = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] # white

numbers = [
[0xbf, 0x1f], # 0
[0x1f, 0x00], # 1
[0xfd, 0x17], # 2
[0xf5, 0x1f], # 3
[0x47, 0x1f], # 4
[0xf7, 0x1d], # 5
[0xff, 0x1d], # 6
[0x21, 0x1f], # 7
[0xff, 0x1f], # 8
[0xf7, 0x1f] # 9
]

radix_point = 0x20
degree_centigrad = 0x05
Fahrenheit_degree = 0x06
BLE = 0x08
POW = 0x10
First_black = 0x1f
First_white = 0x00

counter = 0

# Split a two-digit number.
def divide_number(i):
l = []
tens = ""
Expand Down

0 comments on commit c65122c

Please sign in to comment.