Giter VIP home page Giter VIP logo

wiringbp's Introduction

wiringBP README

This is a modified WiringPi for Banana Pro/Pi. We call it WiringBP. It is based on the original WiringPi for Raspberry Pi created by Drogon. The modification is done by LeMaker. The WiringBP API usage are the same to the original wiringPi. You can donwload the WiringBP from: https://github.com/LeMaker/WiringBP.git.

Download

For Banana Pro

git clone https://github.com/LeMaker/WiringBP.git -b bananapro

For Banana Pi

git clone https://github.com/LeMaker/WiringBP.git -b bananapi

Installation

cd WiringBP
chmod +x ./build
sudo ./build

Examples

You can go to LeMaker wiki to see the basic examples: http://wiki.lemaker.org/WiringPi

You can also use the examples and instructions provided by http://wiringpi.com/

And the source directory examples also has many demo.

Thanks!

LeMaker Team

wiringbp's People

Contributors

evolutionclip avatar hunanchenxingyu avatar motom001 avatar pctj101 avatar savageautomate avatar tony-hit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wiringbp's Issues

What cretin wrote this?

This code is riddled with incorrect indentation, along with mixed spaces and tabs. What is WRONG with you??

It's bad enough that the code doesn't work, and that I have to fork it and FIX the damn thing - without having to correct the indentation of EVERY SINGLE DAMN LINE OF CODE.

You suck.

WiringPi internal Pull Up/Down Reversing

Hello,
i try to compile the source wiringpi for banana pi branch in github, the result was incorect status for pull up/down control. Next trial using the banana pro branch in banana pi board, The pull up/down issue has gone, but the pin definition become un sorted as the boad definition di docs.

Does not work on Lubuntu 3.1.1

Steps to reproduce:

  1. Flash latest Lubuntu 3.1.1 (2014-08-07, kernel 3.4.90)
  2. Get WiringBPI sources, build and install wiringpi: ./build
  3. Connect DHT11
  4. Sensor does not work

Initial discussion: http://forum.lemaker.org/forum.php?mod=redirect&goto=findpost&ptid=353&pid=40497&fromuid=17962

To workaround you can take the library from working image - Raspbian 3.1. Compile against that library - and sensor will work:

# gcc -o dht11 mydht11.c -L/home/bananapi -lwiringPi
# LD_PRELOAD=/home/bananapi/libwiringPi.so ./dht11

So Raspbian 3.1 delivers working binary, while library built from sources does not work

WiringBP on Banana pro set mode as pull-down

I have an issue with the gpio utility. Everything works fine except the command to enable the pull-down resistor for a pin. If I execute the following command:

gpio mode 7 down

nothing happens, an the pin is still floating. (The pull-up command works fine, btw.)

If I take a look in the correspondig pin-file, after executing the set pull-down command, under

/sys/class/gpio/gpio4/pull

it says "unkown", if I set it manually to "down" everything is working as it should, so I guess there is an issue in the WiringBP lib or is it just me?

How can I use it in python?

I installed wiringBP but how can I use it in python? (using bananian)

root@bananapipro / # python
Python 2.7.3 (default, Mar 14 2014, 17:55:54)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wiringBP
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named wiringBP
>>> import wiringPi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named wiringPi
>>> import wiringbp2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named wiringbp2
>>> import wiringpi2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named wiringpi2
>>>

Banana Pro Build

At the end of the build there is a "Note" that states to use some sort of option for V2 will be required. I can only assume the first build I did will only support 26 GPIO pins rather than the 40 pins on the GPIO header? I have successfully tested with the current build but only with in the 26 pins.

So is there something that needs to be done differently for V2?

no sudo under bananian

There is no sudo in bananian:

root@bananapipro ~/tmp/WiringBP (git)-[bananapro] # ./build
wiringPi Build script
=====================


WiringPi Library
./build: 53: ./build: sudo: not found
./build: 59: ./build: make: not found

Make Failed...
Please check the messages and fix any problems. If you're still stuck,
then please email all the output and as many details as you can to
  [email protected]

duplicated pins

im just confused when i do gpio readall then there are 2 pins dupliated listed with 2 different gpio and wiringpi numbers

im talking about this lines:
| 8 | 2 | 3 | SDA | IN | High |
| 9 | 3 | 5 | SCL | IN | High |

| 17 | 28 | 3 | GPIO 8 | IN | Low |
| 19 | 30 | 5 | GPIO10 | IN | Low |

how is it possible to have 2 times the same physical pin with different modes?

edit: im using an banana pi

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.