Skip to content

Commit 6ff4c9e

Browse files
Got LCD Methods in
1 parent fbc98e4 commit 6ff4c9e

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

electroblocks/core.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,29 @@ def set_rgb(self, r, g, b):
5050
def config_lcd(self, rows=2, cols=16):
5151
self._send(f"config:lcd={rows},{cols}")
5252

53+
54+
# LCD Methods
55+
5356
def lcd_print(self, row, col, message):
5457
self._send(f"l:{row}:{col}:{message}")
5558

5659
def lcd_clear(self):
5760
self._send("l:clear")
5861

62+
def lcd_toggle_backlight(self, on):
63+
if on:
64+
self._send("l:backlighton")
65+
else:
66+
self._send("l:backlightoff")
67+
68+
def lcd_blink_curor(self, row, col, on):
69+
if on == True:
70+
self._send(f"l:cursor_on:{row}:{col}")
71+
else:
72+
self._send(f"l:cursor_off:{row}:{col}")
73+
74+
# LCD Methods
75+
5976
def digital_write(self, pin, value):
6077
self._send(f"dw:{pin}:{value}")
6178

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "electroblocks"
7-
version = "0.1.5"
7+
version = "0.1.6"
88
description = "Python client library to interact with ElectroBlocks Arduino firmware"
99
authors = [
1010
{ name = "Noah Glaser", email = "your.email@example.com" }

0 commit comments

Comments
 (0)