raspberry-pi

Study device driver source files?

北城余情 提交于 2021-02-06 09:34:04
问题 I want to study the source files of some of the device drivers that are installed and loaded on either a raspberry pi(raspian), beaglebone(debian) or a my laptop(ubuntu). My aim is to learn how to properly implement my own modules by studying the source files of some drivers that actually works. I am particularly interested in drivers that communicates with actual hardware (USB, I2C, SPI, UART etc). Can someone tell me how to find these sources? are they available in some particular folder i

Arm Assembly Rasperry-Pi: Converting a string to Upper case

╄→尐↘猪︶ㄣ 提交于 2021-02-05 06:44:15
问题 I´m working on a program in which the user enters his name, and the program should convert all lower case letters to upper case: I am using the %s format to read the string: .text ldr r0,=msj bl printf ldr r0,=format ldr r1,string bl scanf .data .align 2 msj: .asciz "Enter you name: " format: .asciz "%s" string: .asciz "" I have tried substracting 32 to each character but I think the strings are not in ascii numbers format. Is there any way I can convert the entire word to Upper Case? 回答1:

Is there any example of how to use the digital input or analog input of GPIO on google aiy voice board?

大憨熊 提交于 2021-01-29 20:28:20
问题 I can not read the input from the motion sensor (HC-SR501) which connects to PIN_A of the expansion pins on the voice bonnet of my aiy voice kit. Below are the code and the error message, please shed some light. Code: from gpiozero import MotionSensor from aiy.pins import (PIN_A, PIN_B, PIN_C, PIN_D) pir = MotionSensor(PIN_A) pir.wait_for_motion() print("Motion detected!") Error message: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line

Recording each channel without mixing

巧了我就是萌 提交于 2021-01-29 10:52:16
问题 I am a new in this field, maybe what I ask it's impossible to implement. What I try to do is - recording an audio with n-channels to WAV file with n-channels. I use arecord utility: arecord --format=S16_LE --channels=8 --rate=16000 --file-type=wav myfile.wav In my input I see different channels: But in output of recording I see all channels are mixed: Is it possible to record WAV file without mixing channels? Is it possible to record each channel to separate channel? 来源: https://stackoverflow

PI4 k3s install server currently unable to handle the request

为君一笑 提交于 2021-01-29 10:33:55
问题 I'm trying to install and run a single-node lightweight kubernetes cluster, to play around with on my Raspberry pi4, of which I found k3s. However, from what I've read or seen, I'm probably missing something, but haven't found reference to the exact problem I'm getting (testing with simple kubectl command after installation): $ kubectl get nodes Error from server (ServiceUnavailable): the server is currently unable to handle the request The installations that I've referenced: Turing Pis,

tensoflow-trained ssd model not working after converting to tensorflow-lite for raspi

梦想的初衷 提交于 2021-01-29 09:22:43
问题 System information Laptop: Linux Ubuntu Tensorflow 1.15.0 Raspi: Raspberry Pi 4 tflite-runtime 2.5.0 tensorflow-estimator 1.14.0 Coral Edge TPU Hello everybody, I am stuck at getting my trained model running on raspi. I trained ssd_mobilenet_v2_coco model from tensorflow 1 modelzoo with my own custom dataset on google cloud with this config file where I did few changes: model { ssd { num_classes: 3 image_resizer { fixed_shape_resizer { height: 720 width: 1280 } } feature_extractor { type:

Can't set up port forwarding

谁说胖子不能爱 提交于 2021-01-29 08:19:25
问题 So recently I started making a raspberry pi web server with apache and php, and so far I could change the html file in the default debian site and make my server go online, the only problem is that I don't how to make it public.I set up port forwarding but I'm not sure that which IP should my domain name point to (my local, or my public one) and also I'm not sure i set up port forwarding right, if possible please write down the port forwarding step by step (I'm using a D-Link router). Thanks

Make java understand that swap exists, and encourage him to use it [closed]

喜欢而已 提交于 2021-01-29 07:12:43
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 months ago . Improve this question So, I have a java jar to run on my raspberry pi, and it requires a lot of memory. I have set up 2 gb swap on an external usb flash drive. But when I start the jar with -Xmx2048M, it says that it could not reserve enough space for 2097152KB object heap. I know

How to run a python program(containing tkinter) on startup

房东的猫 提交于 2021-01-29 03:06:34
问题 I want to execute a simple python script that contain tkinter window on start up of raspberry pi. and the tkinter window will appear on the monitor. suppose my simple script is import Tkinter from Tkinter import * root = Tk() root.mainloop() I have tried the following procedure and failed mkdir ./bin cd ./bin sudo nano script_auto_run then wrote the following code #!/bin/bash sudo python /home/pi/projects/test.py to make it executable i ran sudo chmod 755 script_auto_run edited the rc.local

Bottle: BrokenPipeError: [Errno 32] Broken pipe

点点圈 提交于 2021-01-29 02:51:38
问题 I've written a little Python that is supposed to react to some webhooks by doing some stuff with a LED-Strip. I'm running this on a Raspberry Pi running Raspbian using a Xterm window that starts at startup. the program starts and runs fine for a few minutes but then it stops working. I've done some debugging and found that sometimes the program would use 100% on one CPU core, sometimes it spits out the 'BrokenPipeError: [Errno 32] Broken pipe' error and sometimes it just doesn't do anything.