WiringPi 下载与安装

转载 2018年04月17日 10:13:05

原文地址:http://wiringpi.com/download-and-install/

Download and Install

WiringPi is maintained under GIT for ease of change tracking, however there is a Plan B if you’re unable to use GIT for whatever reasons (usually your firewall will be blocking you, so do check that first!)

Note: wiringPi is NOT hosted on Github. There are many forks that you may find there, but they are not the original version maintained by myself.

To view the wiringPi sources, then go to:

https://git.drogon.net/

and select the wiringPi link.

To install…

First check that wiringPi is not already installed. In a terminal, run:

$ gpio -v

If you get something, then you have it already installed. The next step is to work out if it’s installed via a standard package or from source. If you installed it from source, then you know what you’re doing – carry on – but if it’s installed as a package, you will need to remove the package first. To do this:

$ sudo apt-get purge wiringpi
$ hash -r

Then carry on.

If you do not have GIT installed, then under any of the Debian releases (e.g. Raspbian), you can install it with:

$ sudo apt-get install git-core

If you get any errors here, make sure your Pi is up to date with the latest versions of Raspbian: (this is a good idea to do regularly, anyway)

$ sudo apt-get update
$ sudo apt-get upgrade

To obtain WiringPi using GIT:

$ cd
$ git clone git://git.drogon.net/wiringPi

If you have already used the clone operation for the first time, then

$ cd ~/wiringPi
$ git pull origin

Will fetch an updated version then you can re-run the build script below.

To build/install there is a new simplified script:

$ cd ~/wiringPi
$ ./build

The new build script will compile and install it all for you – it does use the sudo command at one point, so you may wish to inspect the script before running it.


Plan B

Click on this URL: (it should open in a new page)

https://git.drogon.net/?p=wiringPi;a=summary

Then look for the link marked snapshot at the right-hand side. You want to click on the top one.

This will download a tar.gz file with a name like wiringPi-98bcb20.tar.gz. Note that the numbers and letters after wiringPi (98bcb20 in this case) will probably be different – they’re a unique identifier for each release.

You then need to do this to install:

$ cd
$ tar xfz wiringPi-98bcb20.tar.gz
$ cd wiringPi-98bcb20
$ ./build

Note that the actual filename will be different – you will have to check the name and adjust accordingly.


Test wiringPi’s installation

run the gpio command to check the installation:

$ gpio -v
$ gpio readall

That should give you some confidence that it’s working OK.

WiringPi is released under the GNU Lesser Public License version 3.

WiringPi介绍及安装方法

WiringPi介绍及安装方法 1.WiringPi简介     WiringPi是应用于树莓派平台的GPIO控制库函数,WiringPi遵守GUN Lv3。wiringPi使用C或者C++开发并且...
  • qintaiwu
  • qintaiwu
  • 2017-06-26 16:51:00
  • 2574

树莓派学习笔记——wiringPi简介、安装和管脚说明

1.WiringPi简介 WiringPi是应用于树莓派平台的GPIO控制库函数,WiringPi遵守GUN Lv3。wiringPi使用C或者C++开发并且可以被其他语言包转,例如python、ru...
  • xukai871105
  • xukai871105
  • 2014-01-01 19:52:46
  • 67892

树莓派安装wiringPi开发库

wiringpi是通过C语言控制树莓派GPIO口的头文件。在C语言中包含这个头文件之后可以很简单的调用已经封装好的方法来控制树莓派GPIO口。1.安装Git 如果你的系统还没有安装Git版本控制工具...
  • u013151320
  • u013151320
  • 2015-12-15 16:00:47
  • 1946

树莓派2安装wiringPi问题

下载安装包,解压,编译,安装: mkdir temp cd temp wget http://project-downloads.drogon.net/files/wiringPi.tgz...
  • u010925447
  • u010925447
  • 2017-05-04 19:51:34
  • 800

树莓派3wiringPi安装以及串口相关调试和配置

刚刚入手了一个树莓派3,其中的资源当然很丰富了,树莓派3有一个IIC,一个Uart,以及一个SPI,这些接口都是我们以后需要连接外围设备的通讯接口,今天就和大家聊一下树莓派相关串口Uart的配置和使用...
  • xiaolintyd
  • xiaolintyd
  • 2016-11-07 15:36:41
  • 4476

树莓派3B 安装wiringPi

WiringPi是应用于树莓派平台的GPIO控制库函数.安装步骤如下:git clone git://git.drogon.net/wiringPi cd wiringPi ./build三个命令行就...
  • Leo_Luo1
  • Leo_Luo1
  • 2017-12-15 22:24:38
  • 153

wiringpi安装编译问题解决

想用一下树莓派的硬件输出功能,发现我用的系统版本并没有安装PRi。找了半天也没有找到可以用的安装包,倒是又找到了一个WiringPi的一个驱动包。        Pip安装失败了,使用git又怕出现...
  • grey_csdn
  • grey_csdn
  • 2017-11-13 21:51:38
  • 125

树莓派体验10 - wiringPi for Python(wiringPi2)

RPi.GPIO目前还不支持I2C、SPI等接口,且缺乏高精度定时功能。wiringpi除了提供C语言接口之外,目前已经支持Python等语言的扩展。对于GPIO的操作非常强大。 源码地址:http...
  • messidona11
  • messidona11
  • 2017-05-10 09:31:56
  • 2206

树莓派学习笔记-GPIO接口编程-WiringPi

一. 两种编号方式: 1. WiringPi 编号方式 2. Broadcom 编号方式fritzin电子设计软件采用Broadcom编号方式二. 常用API WiringPi初始化函数:wi...
  • Miaoxiaoqi95
  • Miaoxiaoqi95
  • 2016-09-26 15:46:30
  • 432

树莓派_GPIO引脚操作_wiringPi的安装与使用

安装wiringPI GPIO测试编译时出现了这个问题 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../libwiringPi.so:undefined r...
  • scottly1
  • scottly1
  • 2014-05-26 13:15:45
  • 3340
收藏助手
不良信息举报
您举报文章:WiringPi 下载与安装
举报原因:
原因补充:

(最多只允许输入30个字)