Giter Site home page Giter Site logo

schech1 / remoteio Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 215 KB

A Raspberry Pi GPIO remote control based on gpiozero

Home Page: https://pypi.org/project/remoteio/

License: GNU General Public License v3.0

Python 86.64% Shell 13.36%
gpio-pins gpiozero raspberry-pi

remoteio's Introduction

remoteio

A Raspberry Pi GPIO remote control based on gpiozero

https://github.com/gpiozero/gpiozero

Server (remote Raspberry Pi)

Use this all-in-one command to install remoteio as deamon on port 8509. The server can be updated with this command.

bash -c "$(wget -qLO - https://github.com/schech1/remoteio/raw/master/install.sh)"

Using pip

pip install remoteio

When you want to create the server by yourself, you can install the library via pip and use the examples below, for server- and client usage.

Server usage

Start a remote server on port 1234. If no port is specified default port 8509 will be used

from remoteio import run_server

if __name__ == "__main__":
    run_server(port=1234)

Client usage

from remoteio import RemoteServer

if __name__ == "__main__":
    server_ip = "192.168.1.38"
    server_port = 1234

    remote_server = RemoteServer(server_ip, server_port)
    remote_pin = remote_server.pin(7, 'b')
    remote_pin.on(time_ms=2000) # (Optional) Time until switch off
    remote_pin.blink() # Blink LED
    remote_pin.pulse() # Pulse LED
    remote_pin.off()
    remote_server.close()

Use Board numbering

remote_pin = remote_server.pin(7, 'b') # Use physical board numbering

Use GPIO numbering

remote_pin = remote_server.pin(4, 'g') # Use GPIO numbering (e.g. GPIO4)

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.