当前位置:网站首页>The problem of wirengpi program running permission
The problem of wirengpi program running permission
2022-06-25 09:35:00 【silno】
Recently, with c wiringPi Learning control led, The routine is compiled in linux The command interface can run normally .
Later, I tried to apache Environmental Science , adopt web control led, Never light up ,
It turned out In this function wiringPiSetup(); It's stuck .
Repeat the test , It is found that it is compiled led Insufficient permissions for the program ,
chmod 4755 led
Grant permission and then pass web Call to control led 了 .
because apache Is set up in linux In the system , many linux The operation of , Permission is required to execute .
therefore , If the program debugged separately can execute normally , If you change the environment, you will make mistakes , It is necessary to consider the issue of the execution authority of the program
Add :
There is a blog saying ,https://blog.csdn.net/qq_31669419/article/details/53339770
Run in raspberry pie opencv And GPIO Combined procedures , If you use wiringPiSetup() Set function initialization wiringPi System , When running the program, you must obtain root jurisdiction , But at this point, if you call a function imshow An error occurred when
Actually , stay wiringPi It is also provided wiringPiSetupSys(void) Initialization function , It can be non root The user calls , Provided GPIO Pins must be used in advance gpio Command export . The pin number in this mode is native Broadcom GPIO Pin number (BCM).
wiringPiSetupSys();
pinMode(17,OUTPUT);//BCM The first 17 The foot is wringPI The first 0 foot
Before running the program , First, input the command in the terminal
gpio export 17 out
------------------------------------
It's a little bit of a hassle , Give me permission
边栏推荐
- 【mysql学习笔记22】索引
- Fcpx quickly add subtitles | Final Cut Pro import fcpxml subtitle file does not match the video time? I got it in code
- Wechat official account can reply messages normally, but it still prompts that the service provided by the official account has failed. Please try again later
- Is it safe to open an account on the compass?
- [wechat applet full stack development course] course directory (mpvue+koa2+mysql)
- Notes on key vocabulary of the original English work biography of jobs (I) [introduction]
- 203 postgraduate entrance examination Japanese self-study postgraduate entrance examination experience post; Can I learn Japanese by myself?
- PMP考试多少分算通过?
- When unity released webgl, jsonconvert Serializeobject() conversion failed
- Voiceprint Technology (VI): other applications of voiceprint Technology
猜你喜欢

C program termination problem clr20r3 solution

Lvs-dr mode single network segment case

2021mathorcupc topic optimal design of heat dissipation for submarine data center

How can games copied from other people's libraries be displayed in their own libraries
![[opencv] - input and output XML and yaml files](/img/4e/7944e205c71246d0b0e3747eefca37.png)
[opencv] - input and output XML and yaml files
![[final review notes] digital logic](/img/57/4431208b1c8b653f5c3f4ff4212cc3.png)
[final review notes] digital logic

Oracle-单行函数大全

vscode试图过程写入管道不存在

Numpy numpy中的meshgrid()函数

Matplotlib axvline() and axhline() functions in Matplotlib
随机推荐
Analysis on the bottom calling process of micro service calling component ribbon
[opencv] - Discrete Fourier transform
股票在线开户安全吗?找谁可以办理?
The meshgrid() function in numpy
通过客户经理的开户二维码开股票账户安全吗?
22 mathematical modeling contest 22 contest C
How much money have I made by sticking to fixed investment for 3 years?
Title B of the certification cup of the pistar cluster in the Ibagu catalog
Voiceprint Technology (V): voiceprint segmentation and clustering technology
Neo4jdesktop (neo4j desktop version) configures auto start (boot auto start)
203 postgraduate entrance examination Japanese self-study postgraduate entrance examination experience post; Can I learn Japanese by myself?
【mysql学习笔记22】索引
华泰证券在上面开户安全吗?靠谱吗?
Mapping mode of cache
Matplotlib decision boundary drawing function plot in Matplotlib_ decision_ Boundary and plt Detailed explanation of contour function
Oracle one line function Encyclopedia
Work of the 15th week
Data-driven anomaly detection and early warning of item C in the May 1st mathematical modeling competition in 2021
手机办理长城证券开户靠谱安全吗?
Nodejs using the express framework demo