Hi! Hope you are all safe in these crazy times!
So I am following this tutorial https://blog.littlevgl.com/2019-01-08/hardware-button and https://docs.littlevgl.com/en/html/porting/indev.html#types-of-input-devices to get 3 physical buttons to work but I am using micropython.
I already can work with 1 button but I can’t figure out how to set an array to use 3.
Here is a snip of my code:
class ButtonsInputDriver:
def __init__(self, button, group=None):
def input_callback(drv, data):
if button.pressed_left:
data.state = lv.INDEV_STATE.PR
else:
data.state = lv.INDEV_STATE.REL
gc.collect()
return False
self.drv = lv.indev_drv_t()
lv.indev_drv_init(self.drv)
self.drv.type = lv.INDEV_TYPE.BUTTON
self.drv.read_cb = input_callback
self.win_drv = lv.indev_drv_register(self.drv)
self.points = lv.point_t()
self.points.x=20
self.points.y=240
lv.indev_set_button_points(self.win_drv, self.points)
Any idea on how to solve this? My problem right now is in the 4 last lines of code. I want to set multiple points (3 different buttons)
Thank you!!