raspberry-pi3

QT5 Bluetooth - scanning at regular intervals freezes the program

落爺英雄遲暮 提交于 2021-02-08 07:32:05
问题 I am currently using QT5 (c++) for implementing a bluetooth scanner which searches for all available devices in detection range. The program is running on a Raspberry PI 3, without a GUI (command line only). The routine seems to work fine at first (3+ hours without issues). Then, after a seemingly random amount of repetitions, the bluetooth search doesn't find any device, even if they are physically there. After this happens, the program doesn't respond to system signals anymore, the program

External ip always <none> or <pending> in kubernetes

大城市里の小女人 提交于 2021-02-08 06:33:23
问题 Recently i started building my very own kubernetes cluster using a few Raspberry pi's. I have gotten to the point where i have a cluster up and running! Some background info on how i setup the cluster, i used this guide But now, when i want to deploy and expose an application i encounter some issues... Following the kubernetes tutorials i have made an deployment of nginx, this is running fine. when i do a port-forward i can see the default nginx page on my localhost. Now the tricky part,

Audio through Cron Job

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-04 20:59:19
问题 Does anyone know why audio wouldn't run through a cron job even though it runs perfectly fine when run through the command line. I have a python script that plays audio through a bluetooth speaker and when I run it on the command line (python helper.py) it plays fine, but running it through cron doesn't seem to work. Extra details: I am doing this on a Raspberry Pi that I have connected to a bluetooth speaker. I have a display connected to the raspberry pi (not doing it headless but that is

rfid-rc522 Tag is not read

◇◆丶佛笑我妖孽 提交于 2021-01-29 10:43:21
问题 I am using the instructions of https://pimylifeup.com/raspberry-pi-rfid-rc522/ to learn how to read my rfid-rc522. I installed all the things needed, and cloned from git all the files. I connected accordingly and double checked the wire. The code in Write.py is #!/usr/bin/env python import RPi.GPIO as GPIO import SimpleMFRC522 reader = SimpleMFRC522.SimpleMFRC522() try: text = raw_input('New data:') print("Now place your tag to write") reader.write(text) print("Written") finally: GPIO.cleanup

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

scheme.activate returns status1

試著忘記壹切 提交于 2021-01-29 08:11:35
问题 I want to get the SSID and Password from the user und connect it to WIFI. I'm using Raspbian and Python3 for that. My Code: #!/user/bin/python3.5 #!/user/bin/env python from wifi import Cell, Scheme def WirelessConnection(): userSSID = input("Enter the SSID: ") userPass = input("Enter the Password: ") cells = Cell.all('wlan0') schemes = list(Scheme.all()) for cell in cells: if cell.ssid == userSSID: print('Connecting to %s' % userSSID) passKey = userPass scheme = Scheme.for_cell('wlan0',

Run Terminal Commands on Raspberry Startup

*爱你&永不变心* 提交于 2021-01-29 07:20:17
问题 I am working on a project in which I am using curses and pygame librarie, my python program/script can only be run through using terminal otherwise this error occurs fd=_sys.__stdout__.fileno()) _curses.error: setupterm: could not find terminal I want to run my program on startup of Raspberry pi by using these two commands cd Desktop python test.py I am aware of rc.local but unable to run this....(first open terminal and then run these 2 commands in order to run my script) 回答1: Running on

QT Bluetooth Peripheral and Central role possible?

只愿长相守 提交于 2021-01-29 05:17:45
问题 I'm running a programm on a Raspberry Pie which is based on QT and uses a bluetooth adapter to connect to some peripheral devices as a central role. I also have another device, which only can act as a Central bluetooth device and needs to be connected to my Raspberry. Is it possible with QT to first build a connection to my second device by advertising itself and acting as a peripheral, and afterwards swaping to central mode, to connect to the other devices? I didn't find any evidence for or

PN532 Unable to open NFC device

本秂侑毒 提交于 2021-01-29 05:09:50
问题 Hi I'm trying to setup a PN532 reader with libnfc on Ubuntu on my RPi3. I am getting the error: ERROR:: Unable to open NFC device preceded by Invalid serial port: /dev/ttyACM0 I've tried using ttyS0 and ttyAMA0 since I saw those suggested to people who have had the same issue, but nweither of them work. Any help is appreciated. 回答1: I'm wrestling with a similar problem on RPi3 using Raspbian. Note that in version three, /dev/ttyACM0 has been redirected to a Bluetooth port, so you probably don

Counting Characters in a String in armV7

风流意气都作罢 提交于 2021-01-28 19:44:23
问题 My program is supposed to ask for a single line of user input and then print out the number of characters in the string. As of now it is telling me there are 104 characters when I input hello followed by a segmentation fault. Here is my code: userInput: .asciz "\nEnter a string: " TemptRet: .word 10 inputBuffer: .skip 11 countMessage: .STRING "There are %d characters in: \"%s\".\n" .text .global main main: LDR R0, =courseStr BL puts countString: LDR R0, =userInput BL printf LDR R0, =TemptRet