Git Product home page Git Product logo

pico-ui-kit's Introduction

Pico-UI-kit

A library to easily work with electronic components using Raspberry Pi Pico

Getting started

You can download uikit.py file and then copy it over to the Pico using e.g. Thonny. After that you can import it in your code.

When everything is defined in your program, you should call the run function, to start the loop which will listen to events in the program, like a buttonpress. This function will block your program until uikit.quit is called, so you should put it to the very end of your code.

import uikit

[...]  # define components and functions here

uikit.run()

Button

You can define a pushbutton with the Button class, that will run a Python function when it's pressed. The first argument is the GPIO pin number to which the button is connected. The second argument is the function to run when the button is pressed. With repeat_interval you can set, how much time to wait before the button can be pressed again.

import uikit as ui

def func():
    print("Hi!")
    
button = ui.Button(0, func)

# modify on_pressed
button.on_pressed = ui.quit  # will stop the program when the button is pressed

ui.run()

PotentioMeter

A potentiometer to input analog data. You can get its value in the 0-100 range, and it can run a function when its value has changed.

LCD_16x2

Class to use a 16 by 2, 5x7 character LCD in 8-bit mode. For example: Displaytech 162B

pico-ui-kit's People

Contributors

rdbende avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.