Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!

PicoFeedback_Hub

Meet PicoFeedback Hub : A compact feedback machine with a 16x2 LCD, 3 buttons, and a Raspberry Pi Pico—simple, portable, and efficient!"

BeginnerFull instructions provided1 hour129
PicoFeedback_Hub

Things used in this project

Hardware components

Raspberry Pi Pico
Raspberry Pi Pico
×1
RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Wokwi
Application use to make a virtual prototype
Thonny
Application use to interface with pico physically

Story

Read more

Code

CODE

MicroPython
Kindly Visit GitHub Repo for Including the LCD libraries and then apply this code with those libraries
from machine import Pin
from gpio_lcd import GpioLcd
import time 
RS = 0
En = 1
D4 = 2
D5 = 3
D6 = 4
D7 = 5
Button1 = machine.Pin(6 , machine.Pin.IN , machine.Pin.PULL_UP)
Button2 = machine.Pin(7 , machine.Pin.IN , machine.Pin.PULL_UP)
Button3 = machine.Pin(8 , machine.Pin.IN , machine.Pin.PULL_UP)
BJP = 0
CONG = 0
AAP = 0
lcd = GpioLcd(rs_pin=Pin(RS),
              enable_pin=Pin(En),
              d4_pin=Pin(D4),
              d5_pin=Pin(D5),
              d6_pin=Pin(D6),
              d7_pin=Pin(D7),
              num_lines=2,
              num_columns=16)
lcd.move_to(0,0)
lcd.putstr("Good")
lcd.move_to(6 , 0)
lcd.putstr("Modr")
lcd.move_to(13,0)
lcd.putstr("Bad")
while True :
    if Button1.value() == 0:
        BJP += 1
        bjp = str(BJP)
        lcd.move_to(0,1)
        lcd.putstr(bjp)

    elif Button2.value() == 0:
        CONG += 1
        cong = str(CONG)
        lcd.move_to(7,1)
        lcd.putstr(cong)

    elif Button3.value() == 0:
        AAP += 1
        aap = str(AAP)
        lcd.move_to(14 ,1)
        lcd.putstr(aap)
    time.cleep(0.20)

GITHUB

Kindly Visit GitHub to Access the Library

Credits

Prince Singh
2 projects • 2 followers
Contact
Harsh Parashar
2 projects • 3 followers
Contact
Vikas Sharma
4 projects • 6 followers
Contact
Dr. Umesh Dutta
42 projects • 60 followers
Working as Director of Innovation Centre at Manav Rachna, India. I am into development for the last 12 years.
Contact

Comments

Please log in or sign up to comment.