Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use webiopi to control the GPIO pin level of raspberry pie

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use webiopi to control the GPIO pin level of raspberry pie, which has a certain reference value. Interested friends can refer to it. I hope you can learn a lot after reading this article.

1, you must install the python development version, that is, python-dev, otherwise many of the software will not be installed successfully, prompting the directory can not be found and so on.

one

Sudoapt-getinstallpython-dev

Under normal circumstances, the above online installation commands can be installed successfully, but unfortunately, the author in the installation, the online command to install resource pack 404.

Python2.7-dev_2.7.3~rc2-2.1_armhf.deb can not be found, and then can only manually find the following package installation.

one

two

Wget http://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-dev_2.7.3-6_armhf.deb

Sudodpkg-I python2.7-dev_2.7.3-6_armhf.deb

2. Install the GPIO module of python

Google Code project address: http://raspberry-gpio-python.googlecode.com

one

two

three

four

Wget http://raspberry-gpio-python.googlecode.com/files/RPi.GPIO-0.4.1a.tar.gz

Tar-xvzf RPi.GPIO-0.4.1a.tar.gz

CdRPi.GPIO-0.4.1a

Sudopython setup.pyinstall

3. Install webopio

Google Code project address: http://code.google.com/p/webiopi/

one

two

three

four

Wget http://webiopi.googlecode.com/files/WebIOPi-0.5.3.tar.gz

Tarxvzf WebIOPi-0.5.3.tar.gz

CdWebIOPi-0.5.3

Sudo./setup.sh

4. First set or modify the password of webopio

one

Sudowebiopi-passwd

The user name is: webiopi

If you do not change the password, the default password is: raspberry

5. Start webopio

one

Sudopython-m webiopi 8000

Port can be modified by itself. Default is 8000.

6. Let webopio run in the background, otherwise pressing ctarl+c will break it.

one

two

three

Sudo/etc/init.d/webiopistart

And

Sudo/etc/init.d/webiopistop

7. Set webopio to start with the system

one

Sudoupdate-rc.d webiopi defaults

8. Open the IP address to access the management interface with a browser

Http://192.168.1.106:8000/webiopi/

Control method:

a. Click "IN/OUT" on the outside to switch the working mode of GPIO, input / output

b. In output mode, click the number on the inside to switch the output level, high / low

c. In input mode, the internal test numbers represent the input status of GPIO

Thank you for reading this article carefully. I hope the article "how to use webiopi to control the GPIO pin level of raspberry pie" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report