Code Monkey home page Code Monkey logo

pigpio.jl's Introduction

PiGPIO

Control GPIO pins on the Raspberry Pi from Julia

PiGPIO

PiGPIO.jl is a Julia package for the Raspberry which communicates with the pigpio daemon to allow control of the general purpose input outputs (GPIO).

This package is an effective translation of the python package for the same. Which can be found here

Features

  • OS independent. Only Julia 1.0+ required.
  • Controls one or more Pi's.
  • Hardware timed pulse width modulation.
  • Hardware timed servo pulse.
  • Callbacks when any of GPIO change state.
  • Create and transmit precise waveforms.
  • Read/Write GPIO and set their modes.
  • Wrappers for I2C, SPI, and serial links.

Once a pigpio daemon is launched on the pi this package can connect to it and communicate with it to manipulate the GPIO pins of the pi. The actual work is done by the daemon. One benefit of working this way is that you can remotely access the pi over a network and multiple instances can be connected to the daemon simultaneously.

Launching the daemon requires sudo privileges. Launch by typing sudo pigpiod in the terminal.

Installation and Usage

using Pkg
Pkg.add("https://github.com/JuliaBerry/PiGPIO.jl")

using PiGPIO

pi=Pi() #connect to pigpiod daemon on localhost

Reference

set_mode(p::Pi, pin::Int, mode)
get_mode(p::Pi, pin::Int)
# mode can be INPUT or OUTPUT

read(p, pin)
write(p, pin, state)
#state can be HIGH, LOW, ON, OFF

set_PWM_dutycycle(p, pin, dutycyle)
#dutycyle defaults to a range 0-255

pigpio.jl's People

Contributors

aviks avatar kescobo avatar ellipse0934 avatar akshayhiregoudar avatar scls19fr avatar

Watchers

James Cloos 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.