我正在我的 Raspberry Pi 上运行 retropie,我想找出一种使用 GPIO 来模拟击键的方法。Xdotool 似乎是我最好的选择,但它不能在本地或通过 ssh 运行。当我输入时,xdotool key 'd'我收到错误:
Error: Can't open display: (null)
Failed creating new xdo instance
到目前为止,每个答案都声称要解决这个问题,我必须做一些变体,export DISPLAY=":0" xdotool key 'd'但这并没有做任何事情,它只是转到下一行。我对 linux 很陌生,所以提前致谢。
在计算机上,您可以使用 waitKey() 功能从键盘获取命令,而在 raspberry pi 上没有键盘,我不想使用 ssh 来终止进程而只操作 raspberry pi。如何仅关闭 pi 上的窗口?
下图包含更改文件夹权限的命令:
我想将 Raspberry Pi 中的权限文件夹更改为r权限,它是/var/www. 它失败并说"chmod: invalid mode: '-R' try chmod :--help to more information"。
我正在尝试在树莓派上的 kubernetes 集群上运行 gitlab-runner。
gitlab 管道生成以下输出:
Running with gitlab-runner 10.4.0 (857480b6) on hello-world-gitlab-runner-6548-tq4mr (123)
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image arm32v7/node ...
Waiting for pod gitlab/runner-123-project-456-concurrent-789 to be running, status is Pending
Waiting for pod gitlab/runner-123-project-456-concurrent-789 to be running, status is Pending
Waiting for pod gitlab/runner-123-project-456-concurrent-789 to be running, status is Pending
ERROR: Job failed (system failure): unable to upgrade connection: container not found ("helper")
Run Code Online (Sandbox Code Playgroud)
gitlab-runner pod 记录以下输出:
+ cp /scripts/config.toml /etc/gitlab-runner/
+ /entrypoint register --non-interactive --executor …Run Code Online (Sandbox Code Playgroud) 我正在 Raspberry Pi 上拍摄视频,并希望将原始 h264 文件转换为 mp4 文件,或者像使用命令行/Python 那样将其包装在 mp4 中。但是,我希望在 NodeJS 中做到这一点。似乎有很多 node JS 库在 npm 上使用了 Raspberry Pi 的 mp4-box 库。但是,它们都没有适当的文档或似乎适合我的项目的需要。我不知道我是否遗漏了什么或者这是不可能的。
我正在尝试安装dockers基于Raspberry pi哪个arm设备。最初我曾经运行以下命令来安装 docker:
curl -sSL get.docker.com | sh
Run Code Online (Sandbox Code Playgroud)
这将安装最新版本的 docker,但我想安装旧版本,我应该使用哪个命令。这个链接有一些有用的答案,但他们不工作Raspberry pi。请帮忙。谢谢
我在python3中使用opencv、imutils和其他库编写了一段代码来识别我的脸。当我将该代码放在 Raspberry Pi 3b 上并对其进行编译时,会出现以下错误:
File "detect_drowsiness.py", line 7, in <module>
from imutils.video import VideoStream
File "/home/pi/.local/lib/python3.5/site-packages/imutils/__init__.py", line 8, in <module>
from .convenience import translate
File "/home/pi/.local/lib/python3.5/site-packages/imutils/convenience.py", line 6, in <module>
import cv2
File "/home/pi/.local/lib/python3.5/site-packages/cv2/__init__.py", line 3, in <module>
from .cv2 import *
ImportError: libwebp.so.6: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)
这些是我正在使用的导入:
from scipy.spatial import distance as dist
from imutils.video import VideoStream
from imutils import face_utils
from threading import Thread
import numpy as np
import playsound …Run Code Online (Sandbox Code Playgroud) 由于 python 2 很快就要结束了,我正在寻找一种方法来在我的 raspberry pi(使用 Raspbian buster)上获得带有 python 3 的可用 IDE。我设法安装了与 python 3 捆绑在一起的 Miniconda,但由于无法解决的包冲突,似乎无法在任何环境中安装 spyder。我可以使用 安装 spyder apt-get,它指向带有 python 2.7 的旧版本。我最后的手段是安装spyder-kernels在我的 conda 环境中,但由于与jupyter-client. 有没有人设法在树莓上使用 python 3 获得 spyder?
所以我有一个 raspberry pi Model 3 B+,我需要在上面安装 NodeJS。它实际上已经安装了一段时间(2-3 周),从那时起我一直在其上构建服务器。直到昨天,NPM 已经运行并安装了软件包。
昨天,我已经安装了 restify-clients 包,我回来看到 NPM/Node 有一个增量更新(我认为从 6.10.1 到 6.10.2 或类似的东西)。所以我复制了它给我的命令并运行它,我认为它会更新包。我选择相信这些行为是 NPM 不再起作用的原因。
运行任何 npm 命令都不会挂起,它只是像什么都没运行一样返回。运行which npm返回/usr/local/bin/npm,运行sudo which npm返回相同。跑步npm -v一无所获,跑步/usr/local/bin/npm -v一无所获。/usr/bin/npm指向/usr/lib/node_modules/npm/bin/npm-cli.js,/usr/local/bin/npm指向/usr/local/lib/node_modules/npm/bin/npm-cli.js。
运行任何像npm init或npm install一样的命令也不做任何事情。
我曾尝试从 nodesources 重新安装 NodeJS 两次,两次 NPM 都安装到目录中,但运行任何 NPM 都会返回。
有关额外信息,请运行nodejs -v并node -v运行并返回版本号。有什么建议?
raspberry-pi ×10
linux ×2
node.js ×2
opencv ×2
arduino ×1
arm ×1
docker ×1
gitlab ×1
h.264 ×1
i2c ×1
installation ×1
javascript ×1
keystroke ×1
kubernetes ×1
linux-kernel ×1
mp4 ×1
npm ×1
python ×1
python-3.x ×1
raspbian ×1
simulate ×1
spyder ×1
version ×1
xdotool ×1