Giter Site home page Giter Site logo

thenetstriker / bulldog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datenheld/bulldog

0.0 3.0 0.0 21.78 MB

Bulldog is a GPIO API for the Beaglebone Black written in Java

License: Apache License 2.0

Java 74.39% Batchfile 0.04% C 25.57%

bulldog's Introduction

Bulldog

Bulldog is a Java library for the Beaglebone Black and the Raspberry PI.

Visit its website: http://www.libbulldog.org

It is currently under development, but many features are already usable and stable.

Intention :

Bulldog provides GPIO and low-level IO capabilities for embedded linux systems. It currently only supports the BeagleBone Black but is written with portability in mind.

It's major concept for GPIO is the PinFeature API.

  DigitalOutput output = board.getPin("P8_12").as(DigitalOutput.class);
  DigitalInput input = board.getPin("P8_11").as(DigitalInput.class);

See the bulldog.examples project to get an idea.

That way, the responsibilities are encapsulated and we don't have a Pin-Class that takes too many responsibilities. It is also easily extensible.

Supports :

Bulldog currently supports the following features on the BeagleBoneBlack:

  1. Digital Input/Output on Pins
  2. Native Interrupts via epoll (easily usable on DigitalInputs)
  3. Native PWM
  4. Native ADC
  5. I2C
  6. All UARTs (including dynamic setup via capemgr on request)
  7. SPI
  8. A few devices: Simple button API, Incremental Rotary Encoder, Servos

Build :

You'll need gradle installed and a cross compiler for arm. You'll have to adjust the toolchain path in bulldog.build/gradle.properties Afterwards, just run this command to build all the distributions and javadocs

   gradle -x test --daemon clean build docs distribution archiveDistributions

It will produce a single jar called bulldog.<boardname>.jar and a native library called libbulldog-linux.so. The latter can be found in the bulldog.linux.native build directory. Alternatively, you can find them prebuilt in the dist directory.

Usage :

You can just reference the jar in your classpath. Make sure the native library libbulldog-linux.so is in the same directory as bulldog.<boardname>.jar. You can find the most recent binaries in the dist directory.

For API usage see the bulldog.examples project.

External reference :

To achieve high pin toggling speeds and maximum performance, it uses VegetableAvenger's excellent BBIOlib: https://github.com/VegetableAvenger/BBBIOlib The only working lib that was found for the 3.8 kernel!

Thanks VegetableAvenger!

bulldog's People

Contributors

datenheld avatar eschava avatar thenetstriker avatar

Watchers

 avatar  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.