Hello,
I am a newbie in Micropython. I am working on STM32F407Discovery board. I wanted to display character on LCD (16x2) display. I tried to use the module given by you, but its not displaying any character on LCD.
Below is code ..
from pyb import Pin, delay, millis
from pyb_gpio_lcd import GpioLcd
#Configuring LCD Pins
rs = pyb.Pin('PB1',Pin.OUT_PP,Pin.PULL_UP)
rw = pyb.Pin('PB4', Pin.OUT_PP,Pin.PULL_UP)
en = pyb.Pin('PB5', Pin.OUT_PP,Pin.PULL_UP)
d0 = pyb.Pin('PE8', Pin.OUT_PP,Pin.PULL_DOWN)
d1 = pyb.Pin('PE9', Pin.OUT_PP,Pin.PULL_DOWN)
d2 = pyb.Pin('PE10', Pin.OUT_PP,Pin.PULL_DOWN)
d3 = pyb.Pin('PE11', Pin.OUT_PP,Pin.PULL_DOWN)
d4 = pyb.Pin('PE12', Pin.OUT_PP,Pin.PULL_DOWN)
d5 = pyb.Pin('PE13', Pin.OUT_PP,Pin.PULL_DOWN)
d6 = pyb.Pin('PE14', Pin.OUT_PP,Pin.PULL_DOWN)
d7 = pyb.Pin('PE15', Pin.OUT_PP,Pin.PULL_DOWN)
def test_main():
"""Test function for verifying basic functionality."""
print("Running test_main")
lcd = GpioLcd(rs,en,d0,d1,d2,d3,d4,d5,d6,d7,2,16)
lcd.putstr("It Works!\nSecond Line")
delay(3000)
lcd.clear()
count = 0
while True:
lcd.move_to(0, 0)
lcd.putstr("%7d" % (millis() // 1000))
delay(1000)
count += 1
I have initalised the LCD pins correctly and the code is getting executed properly, still i am unable to understand why nothing gets printed on LCD. Can anyone help me in the above code and how to implement on STM32F407disc board.
Hoping for some quick help..
Hello,
I am a newbie in Micropython. I am working on STM32F407Discovery board. I wanted to display character on LCD (16x2) display. I tried to use the module given by you, but its not displaying any character on LCD.
Below is code ..
I have initalised the LCD pins correctly and the code is getting executed properly, still i am unable to understand why nothing gets printed on LCD. Can anyone help me in the above code and how to implement on STM32F407disc board.
Hoping for some quick help..