raspberry-pi

segmentation fault at every assembly code

社会主义新天地 提交于 2021-02-17 07:10:03
问题 I'am trying to learn assemly on raspberry pi.But I couldn't get started, every code i write gets "Segmentation Fault". .text .global _start _start: MOV R0, #2 SWI 0 This code gets segmentation fault. Even if I delete the MOV line it gets segmentation fault. 回答1: Try: bx lr @ Exit if use gcc as linker or mov r7, #1 @ Exit if use ld as linker svc #0 @ Exit if use ld as linker Some version use swi , I have success with svc using ld as the linker. If you use gcc as the linker, the lr register has

segmentation fault at every assembly code

梦想与她 提交于 2021-02-17 07:09:05
问题 I'am trying to learn assemly on raspberry pi.But I couldn't get started, every code i write gets "Segmentation Fault". .text .global _start _start: MOV R0, #2 SWI 0 This code gets segmentation fault. Even if I delete the MOV line it gets segmentation fault. 回答1: Try: bx lr @ Exit if use gcc as linker or mov r7, #1 @ Exit if use ld as linker svc #0 @ Exit if use ld as linker Some version use swi , I have success with svc using ld as the linker. If you use gcc as the linker, the lr register has

Manage serial port from two processes simultaneosly

半世苍凉 提交于 2021-02-17 05:28:25
问题 I have the following scenario: Rasperry pi connected to a device via Serial port 3g Dongle connected to the raspberry (with the ability to make/recieve calls) One process reading the data from the serial port and redirecting it to a server (using 3g) Another process waiting for a incoming call, and when someone calls the program takes the data from the serial port and redirect it via the 3g dongle using AT commands ( like fax-call). When someone calls, the call is made using AT commands and

Raspberry pi with pygame.mixer audio produces only static

爷,独闯天下 提交于 2021-02-16 21:14:05
问题 I'm quite new with raspberry pi and am very new but I am trying to play an audio file through a python file on a pi B. I played the audio from the command line using omxplayer and it worked fine but when i run the following code it plays only static. from pygame import mixer mixer.init() wow = mixer.Sound('Wow.mp3') wow.play() time.sleep(5) I tried using mixer.load('Wow.mp3') and other variations but still only get static. I tried putting things in the init like mixer.init(4800, -16, 1, 1024)

File Transfer PC to Raspberry Pi (with xBee)

限于喜欢 提交于 2021-02-15 05:29:56
问题 I've two xBee Pro S2C module. I'm trying to send a image from Windows PC to Raspberry Pi with xBee modules. I configured my xBees for API mode and i can receive/send AT text messages with Python codes. I want to send a image from my PC to Raspberry Pi Model 3 B+ I also checked this subject: http://cms.digi.com/support/forum/70518/transfer-image-between-xbee-modules-connected-raspberry-each I made some changes and tried codes below. PC side(sender) ########################### ser = serial

pygame midi read PC (program change) messages

◇◆丶佛笑我妖孽 提交于 2021-02-11 17:11:48
问题 My goal is to listen to a MIDI to USB adapter that is connected to my guitar pedalboard switcher. When a program change, (PC) message is received, play the appropriate mp2 file. I've tried a number of different Python MIDI modules and pygame has got me the closest. Below is the code I have been tinkering with and it is printing messages when I send program messages for the pedal switcher. I just do not know how to extract and interpret what I need. For instance, the pedal switcher sends a PC

Having trouble accessing /dev/serial0 on a Raspi from within a Module in Azure IoT Edge

試著忘記壹切 提交于 2021-02-11 15:31:34
问题 I'm trying to set up a Module which will interact with /dev/serial0 on a Raspberry Pi B+ running Raspian Stretch. I've used dtoverlay=pi3-miniuart-bt in /boot/config.txt to restore UART0/ttyAMA0 to GPIOs 14 and 15 (which is what my Raspi-based HW needs me to do). I have attempted to make that device accessible to the Module using the following Container Create Options: { "HostConfig": { "PortBindings": { "1880/tcp": [ { "HostPort": "1880" } ] }, "Privileged": true, "Devices": [ { "PathOnHost"

Methods and parameters declaration problem in a class with header

夙愿已清 提交于 2021-02-11 14:46:55
问题 Helo everyone, I'm having big trouble with the declaration of some parameters in a class I defined in a header file I'm using a raspberry pi with C++ and trying to implement some objects through a class. Therefore, I have : my main cpp file where I call the object (it works, I'm sure of that, you'll see) the class cpp file called "Motorcontrol01.cpp" the header file called "Motorcontrol01.h" My code is more complex than what I show here, but I simplified it for tests purpose and it don't work

Is it possible to change bluetooth profile on RPi4?

老子叫甜甜 提交于 2021-02-11 13:00:50
问题 I have a camera connected to a RPi4 and I want to stream its feed via bluetooth. BLE max speed is 2 Mbps, which is a little too slow. I'd like to switch to bluetooth classic, to reach 24 Mbps. Is it possible? 回答1: There is example code for how to switch profiles in BlueZ at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/test-profile I am assuming you are interested in the VDP profile which is documented at: https://www.bluetooth.com/specifications/profiles-overview/) However, I

(Adafruit_Python_DHT - Raspberry Pi) in get_platform RuntimeError: Unknown platform

一个人想着一个人 提交于 2021-02-11 12:44:35
问题 I have a Raspberry Pi 4 connected with a DHT22 sensor, and I want to read data from my sensor. So I installed the library Adafruit_DHT sudo pip3 install Adafruit_DHT then, I navigate to the directory Adafruit_Python_DHT/examples/ , and then, since I have a DHT 22 sensor connected to GPIO pi n° 4 , I run python AdafruitDHT.py 22 4 and I get (lab_app) root@Raspberry100:/var/www/lab_app/Adafruit_Python_DHT/examples# python AdafruitDHT.py 2302 4 Traceback (most recent call last): File