raspberry-pi3

pyaudio OSError: [Errno - 9999] Unanticipated host error

让人想犯罪 __ 提交于 2019-12-02 17:52:09
问题 I'm trying to use the microphone of my webcam logitech to listen with sr.Microphone(sample_rate=32000) as source: ... This error occurs : File "/home/pi/project2/interface.py", line 226, in listen with sr.Microphone(sample_rate = 32000) as source: File "/usr/local/lib/python3.4/dist-packages/speech_recognition/ init .py", line 140, in enter input=True, # stream is an input stream File "/usr/local/lib/python3.4/dist-packages/PyAudio-0.2.10-py3.4-linux-armv7l.egg/pyaudio.py", line 750, in open

How to do GPIO on Android Things bypassing Java

被刻印的时光 ゝ 提交于 2019-12-02 00:31:08
问题 I've been trying to access GPIO on Raspberry Pi with Android things using NDK, but after trying several approaches I always find some kind of security wall preventing me from accessing it. The motivation is the sluggish speed I'm getting from GPIO using the Java API. As a basic reference I was able to toggle it on and off at about 2KHz, which happens to be the poorest among this list. See also What is Android Things Raspberry Pi GPIO max frequency?, where so far there's no answer and where I

How to change the date on Android Things device?

谁说我不能喝 提交于 2019-12-01 21:22:41
I'm using Android Things Developer Preview on Raspberry Pi 3 Model B. Is there any way to set the correct date/time/timezone? The easiest way to do this is probably using the date shell command over ADB. It requires root, but all the preview images should allow root access. Here's an example that checks the date, sets it, and then verifies that the date change stuck: $ adb root restarting adbd as root $ adb shell date Sat Jan 1 00:02:40 GMT 2000 $ adb shell date 1227120016 Tue Dec 27 12:00:00 GMT 2016 $ adb shell date Tue Dec 27 12:00:02 GMT 2016 You can determine the format of the date

How to do GPIO on Android Things bypassing Java

和自甴很熟 提交于 2019-12-01 21:21:31
I've been trying to access GPIO on Raspberry Pi with Android things using NDK, but after trying several approaches I always find some kind of security wall preventing me from accessing it. The motivation is the sluggish speed I'm getting from GPIO using the Java API. As a basic reference I was able to toggle it on and off at about 2KHz, which happens to be the poorest among this list . See also What is Android Things Raspberry Pi GPIO max frequency? , where so far there's no answer and where I added a comment about java speed. In fact this work was motivated by the results I got when checking

Google Assistant SDK on Raspberry Pi 3: Audio setup does not work

强颜欢笑 提交于 2019-12-01 12:45:15
I have been trying to install G assistant in to a Raspberry Pi3. I have question in the following link https://developers.google.com/assistant/sdk/prototype/getting-started-pi-python/configure-audio A partial text from above link # Record a short audio clip. If you get an error, go to step 2. $ arecord --format=S16_LE --duration=5 --rate=16k --file-type=raw out.raw As expected I got error in this step. So I tried the Step2 created a new file (.asoundrc) with all the hardware info. Then I tried following speaker-test -t wav But I got following error ( If I rename .asoundrc I don't see this

Windows IoT Raspberry Pi 3 c# Create .txt file

两盒软妹~` 提交于 2019-12-01 12:15:29
I am using Rasp Pi 3 with Win IoT. I am trying to create a .txt file with Data & time as file name. However, it seems that I can't create .txt file. I am testing out by pressing a button to generate a log.txt file. After pressing the button, there is no error message. When I read the USB drive, the Log folder was created but there is not Log.txt file. private async void Btn_Click(object sender, RoutedEventArgs e) { var removableDevices = KnownFolders.RemovableDevices; var externalDrives = await removableDevices.GetFoldersAsync(); var drive0 = externalDrives[0]; var logFolder = await drive0

Windows IoT Raspberry Pi 3 c# Create .txt file

爱⌒轻易说出口 提交于 2019-12-01 11:36:41
问题 I am using Rasp Pi 3 with Win IoT. I am trying to create a .txt file with Data & time as file name. However, it seems that I can't create .txt file. I am testing out by pressing a button to generate a log.txt file. After pressing the button, there is no error message. When I read the USB drive, the Log folder was created but there is not Log.txt file. private async void Btn_Click(object sender, RoutedEventArgs e) { var removableDevices = KnownFolders.RemovableDevices; var externalDrives =

How do I connect my Raspberry Pi 3 running Android Things to a wifi network?

一世执手 提交于 2019-12-01 10:28:30
I have flashed my Raspberry Pi 3 with the Android Things image, I have not been able to connect it to my wifi network. I have run adb devices but I get no response. Justin Giorgi Take a look at this question: connect to Raspberry Pi 3 using adb The Raspberry Pi isn't a USB device, the USB connection is just for power, so it won't show up in adb devices . You have to connect it to a network first then use adb connect . In short, you have to connect it to network using Ethernet and then follow the instructions using adb command to connect it to Wifi. Yeah, I know it is dumb but it is just the

Project ERROR: Unknown module(s) in QT: charts

人盡茶涼 提交于 2019-12-01 08:51:56
I am building a QT app using QTwidgets to run in a RaspberyPi3 with an image inside the SDcard built with buildroot. I suppose that charts are supported since they are based in QtWidgets and widgets are supported. My problem is, when i integrate Charts in my project and run the project in the computer, there is no problem, however when I try to deploy this to the Raspberry the files and libraries are not included and errors show up. In my .pro file I have: QT += charts But this gives the following error: error: Unknown module(s) in QT: charts However, if I remove this, some errors come saying

how to save sensor data output into excel using python

情到浓时终转凉″ 提交于 2019-12-01 07:48:58
问题 I'm currently working with raspberry pi and using DHT11 to read temperature and humidity values every second. I have to save these values into a database in real time. here's my code that showing sensor data every second, I don't know how to save the data/result in excel. import RPi.GPIO as GPIO import dht11 import time import datetime import os # initialize GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.cleanup() instance = dht11.DHT11(pin=dht11_pin) while True: cnt += 1 if cnt