raspberry-pi2

Adjust audio volume level with CLI omxplayer - Raspberry Pi

为君一笑 提交于 2019-12-04 10:30:00
问题 I have a bash script that plays .mp3 files on my Raspberry Pi via omxplayer. But can not control the local (earphone) audio volume with the GUI . Is there a command for the CLI that I can implement in the bash script? I have searched quite a bit, but can not find such a command. Code: omxplayer Song_Title.mp3 Set audio for local (earphone) output: sudo modprobe snd_bcm2835 sudo amixer cset numid=3 1 omxplayer -o local Thanks! 回答1: to provide more precise information for playing through

Raspberry Pi2 running Windows 10: No PWM

*爱你&永不变心* 提交于 2019-12-04 10:01:07
I have a Raspberry Pi2 running Windows 10. I want to control a servo using PWM (porting some netduino code). There does not appear to be a PWM pin at all on the Pi-> with the possible exception of 12 (GPIO 18). Can someone confirm this? Thanks Hardware PWM and ADC are not supported right now on RPi2 (Windows IoT). You need some extra circuitry which can generate PWM or record ADC on demand. There some project works available for that. How you can achieve PWM & ADC on RPi2 + Windows IoT? RPi2 will be connected to a gateway device via I2C/SPI Bus. A gateway device is nothing more than a

Google Assistant SDK on Raspberry Pi 2

微笑、不失礼 提交于 2019-12-04 07:47:50
Does the Google Assistant SDK also work on a "Pi 2 Model B" (ARM Cortex-A7, a 32bit processor), or is a "Pi 3 Model B" ( ARM Cortex-A53, 64bit processor) essential to get the SDK up and running ? It's working properly on a Raspberry Pi 2. I'm using it with my Logitech c920's mic. I am running the Voice Kit that was in the MagPi Magazine on a Raspberry PI Zero W, so it should run fine on almost all the Pi's https://aiyprojects.withgoogle.com/voice/ 来源: https://stackoverflow.com/questions/43682056/google-assistant-sdk-on-raspberry-pi-2

How GPIO is mapped in memory?

妖精的绣舞 提交于 2019-12-04 06:50:11
I am recently browsing GPIO driver for pi2, I found user space pi2 GPIO lib (like RPi.GPIO 0.5.11 of python) use /dev/mem for BCM2708 (begins at 0x20000000,and GPIO begins at 0x200000 relatively) to mmap a user space memory region in order to handler GPIO. But I found drivers/gpio in linux source tree is designed to be handled by /sys/class/gpio/* . I found nothing like I/O ports mapping like request_io_region and __io_remap . My question is How GPIO for BCM2708 mapped in memory ? Is there another driver? And can I handle GPIO just by R&W to /sys/class/gpio/* ? I found nothing like I/O ports

OpenCV Multi Core Support

僤鯓⒐⒋嵵緔 提交于 2019-12-04 06:35:54
I was wondering if there is multi core support for the OpenCV library. I am experimenting with Haar cascading and it's pretty slow on my Raspberry 2 which would have four cores, but my application is currently running only on a single one. Any ideas? CascadedDetect has multi core support. Recompile OpenCV with the WITH_TBB or WITH_OPENMP (or any other threading framework supported by OpenCV) flag on to enable it. I've had a brief look at the class CascadeClassifier in modules\objdetect\src\cascadedetect.cpp , and there seems to be a reasonable amount of implementation done with parallel_for_ ,

JAVA - Raspberry-pi - Application as a service who start then stop immediately

家住魔仙堡 提交于 2019-12-04 05:34:43
问题 I need to start a Java app on raspberry's startup, but i can't figure how?! I've retreive the PbxMan's script to run it as a service : https://stackoverflow.com/a/21283530/5066919 I've made a simple script that launch the app in background I've pushed it in a crontab at reboot... I play a sound on the first line of the main and in the addShutdownHook(). So i can hear that each time, the app start then stop immediately... Of course i don't have this problem when I launch it in CLI! :@ 回答1:

GHCi on raspberry pi 2?

◇◆丶佛笑我妖孽 提交于 2019-12-04 04:55:08
I'm working on a few haskell projects that run on a raspberry pi 2 and the version of ghc that you can install with apt-get from raspbian (7.4.1). It has no GHCi though, which prevents some vital packages (like Vector) from compiling. I've seen a few rumors about being able to get later versions of ghc (with ghci) onto the pi, but nothing recent. The entry on the haskell wiki looks a couple years out of date. Has anyone had any luck with this? I have had some luck with this! sagemuej@sagemuej-Aspire-5742G:~$ ssh pi-loc Linux raspberrypi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l

start node app from python script

眉间皱痕 提交于 2019-12-03 16:04:48
Is it possible to start a node.js app from within a python script on a raspberry pi? On the command line I run sudo node myscript.js could I use a library like os? Andriy Ivaneyko The first line of file shall be: #!/usr/bin/python You can call command with subprocess.call : from subprocess import call # Note that you have to specify path to script call(["node", "path_to_script.js"]) Then you have to set +x permissions for file to be executable: chmod +x filename.py Know you are ready to go: ./filename.py Note: checkout Raspberry Pi Stack Exchange , you can find a lot of use full info there. As

How to Deploy a jar onto Raspberry Pi 2 using Maven Plugin

痴心易碎 提交于 2019-12-03 08:44:10
I have a simple java class using Pi4J that contains a main method. I want to build and deploy it to a Raspberry Pi. I'm using java 8 on a windows 10 and my IDE is NetBeans 8.1. If the project is set up to be a normal (non-Maven) Java Application and set up to deploy to the Raspberry Pi via the NetBeans build configurations as shown here , the project will build normal and FTP over the jar and then run it with no issues. I would like to do the same but using Maven. The problem is that the code that is being ran has C code native to the ARM's architecture of the Pi and the Maven plugin I'm using

Adjust audio volume level with CLI omxplayer - Raspberry Pi

℡╲_俬逩灬. 提交于 2019-12-03 05:56:42
I have a bash script that plays .mp3 files on my Raspberry Pi via omxplayer. But can not control the local (earphone) audio volume with the GUI . Is there a command for the CLI that I can implement in the bash script? I have searched quite a bit, but can not find such a command. Code: omxplayer Song_Title.mp3 Set audio for local (earphone) output: sudo modprobe snd_bcm2835 sudo amixer cset numid=3 1 omxplayer -o local Thanks! to provide more precise information for playing through scripts, there are 3 ways to change sound volume in current version of omxplayer, and values are not so intuitive: