Giter Club home page Giter Club logo

simple-raspi-rc's Introduction

simple-raspi-rc

This is simple script written for remote control of raspberry pi's GPIO over UDP (within local subnet, eg. wifi)

It's intent is to control the raspberrypi GPIO from computer on same subnet, by your keyboard.

Installation

On remote (your computer):

  • Download python3.6
  • Execute in command line: pip install keyboard
  • Run python remote.py <IP_address_of_your_RaspberryPi> with root/admin privileges. ( keyboard module needs admin priv.)

On server (RaspberryPi):

  • Setup what should the Raspberry do for each instruction in Instructions definitions in server.py
  • Just run it (with python2.7) python server.py

For simple demonstration you can use files in turtle-example/ these are slightly edited to control python turtle, run both files on local machine and run remote.py with 127.0.0.1 as IP address.

You can also pass some arguments if you want: python server.py <IP_address> <port> <execution_delay>

Notes

You should be able to run the files on both python2 and 3 but I have had to run server.py with python2.7 on RaspberryPi as the gpiozero wasn't working with python3, remote.py is intended to run on python3.6. Instructions are sent as numbers (starting with 1). Sending the actions could be done better (to not send numbers but bytes, have own UDP datagram..)

simple-raspi-rc's People

Watchers

 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.