raspberry-pi2

Can't access USB device in Universal App

此生再无相见时 提交于 2020-01-17 05:39:07
问题 I have a USB device that I have successfully set to use the WinUSB driver, and it shows up on the Raspberry Pi 2 startup screen as a connected device. I have added it as a capability to the manifest: <Capabilities> <Capability Name="internetClient" /> <DeviceCapability Name="usb"> <Device Id="vidpid:1234 abcd"> <Function Type="classId:ff * *"/> </Device> </DeviceCapability> </Capabilities> Now I try to access it from my Universal App using the following code I found on MSDN: string aqs =

Automate Bluetooth Pairing/Trusting in Bluez5

痴心易碎 提交于 2020-01-16 03:29:04
问题 I've been working on making my RPi 2 function like a car bluetooth receiver and all is well, except I have no idea how I could automate the pairing of bluetooth devices in Bluez5. In the past I would've used the bluetooth agent and a simple script, but that seems to have gone out the window with the move from 4 -> 5. The nature of the setup means I have no kb/mouse on the RPi once its in the car, so it needs to be a fully automated setup where anyone can scan for the RPi, and if the probably

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

最后都变了- 提交于 2020-01-12 06:15:31
问题 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

Platform Invoke F# callback functions

╄→尐↘猪︶ㄣ 提交于 2020-01-03 17:25:44
问题 I am using F# on a Raspberry Pi 2 (ARM 7 & thus mono). I am currently trying to use the WiringPi library, written in C. I have successfully managed to use some of the functions using P/Invoke. Now I am trying to use interrupts (see http://wiringpi.com/reference/priority-interrupts-and-threads/) but I am stumped by this function with the following C signature int wiringPiISR (int pin, int edgeType, void (*function)(void)); Which has been translated (see https://github.com/danriches/WiringPi

python face detection raspberry pi with picamera

守給你的承諾、 提交于 2020-01-03 03:19:10
问题 I am a newbie with python and opencv i am trying to build a face detection project with raspberry pi. i am getting this error and here is my code Traceback (most recent call last): File "/home/pi/Desktop/picamera-code/FaceDetection1.0", line 19, in <module> for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True): Code: import numpy as np import cv2 from picamera.array import PiRGBArray from picamera import PiCamera import time camera = PiCamera() camera

Sending and receiving images via a socket

笑着哭i 提交于 2020-01-02 19:14:54
问题 I have a C# desktop app. It connects to another PC on my network which is a UWP C# app. I am trying to send an image or 2 to my listening socket and to test this I get the listening socket to send me the image back. The trouble is that even though my server recieves all the bytes that were orginally sent the recieved image back to the client is not of the same size. To make this even more weird is sometimes the returned bytes are correct and I get the whole image and when I attempt to send 2

Windows universal app Rest API Raspberry Pi

笑着哭i 提交于 2019-12-25 14:23:53
问题 I have Windows Core running on a Raspberry PI. How do I create a rest API in a Windows universal app to run on it? I want to be able send remote commands to the Raspberry PI from a mobile device. I did several search and couldn't find much information. Thanks. 回答1: As noted here there's a Restup open source project for this and NuGet package for it There's also some experimental (ie fun side project) from Damian on the ASP.NET team about hosting DNX (the host process for your ASP.NET Core

Android & iOS scan network for Raspberry Pi?

别等时光非礼了梦想. 提交于 2019-12-25 06:49:29
问题 I want my Android and iOS (Swift to be specific) apps to connect to the Raspberry Pi in the network. Of course I can set a fix IP for the Pi and hardcode the IP to the apps, but I would like to know how to do it more dynamically. What do I need to do on both sides to allow the apps to discover the Pi? 回答1: If you are connected over Wifi(Access Point) then you can discover devices using SSDP protocol.which does multicast at 1900 port and whoever has joined to particular group will receive and

[Nginx][Gogs] Serving gogs through nginx

时间秒杀一切 提交于 2019-12-25 06:41:29
问题 I'm running through an issue setting up Gogs through Nginx on my raspberry. I just want to be able to redirect http://raspberry-ip-address:3000 to http://raspberry-ip-address/gogs. Below my nginx virtualhost conf : server { listen 80; server_name localhost; location /gogs/ { proxy_pass http://localhost:3000; } } When I go on http:// raspberry-ip-address:3000, I get the installation page from gogs -> so Gogs is runnning well. When I go on http:// raspberry-ip-address/gogs, I got a 404 Not

I want to toggle a real pushbutton and display it on tkinter GUI

北城余情 提交于 2019-12-25 04:26:59
问题 I want to toggle a pushbutton and show its changes on a label using tkinter. If I press the button it shows "on" on the label and when I press again it shows "off" on the label So I try these codes and If I'm trying the wrong code please help me write the correct using tkinter. I have a problem in combining this code import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setup(22,GPIO.IN,up_down=GPIO.PUD_UP) while(1): if GPIO.input(22)==1: if bs == False : x.set("on") bs=True sleep