libusb can't find a specific device connected to computer - python

I'm trying to run a python code to control AVR ATmega32u4 and then, turn on and turn off the LEDs connected to it. For that, I got LUFA firmware, compiled the .c files and burnt it to m32u4. The VID is 03EB and PID is 204F, but I can't find it with libusb (is not listed), and so I can't run the python code because it doesn't find the usb device. How can I solve this issue?
OS: Windows 10

Related

How to make new directory to a SD card using a python script

I need to setup a raspberry pi in a SD CARD. That's why, after writing raspberrypi to SD card, I need to create a directory at /Volumes/boot, named ssh. For that I tried
os.mkdir("/Volumes/boot/ssh")
But it is showing /Volumes/boot: No such file or directory But, in stead of python script, if I write the same command in python3's console, it is working perfectly. I also tried:
os.mkdir("/Volumes/boot/ssh")
But it is not working too. So, how can I make /Volumes/boot/ssh this folder in my SD card using python script?

Run OpenCV script on start with imshow

I have an OpenCV/python script running at my Raspberry Pi which reads the camera and shows the stream on the RCA monitor connected to the Pi.
Now I want the script to be loaded on boot. I already tried a cronjob #reboot, the /etc/rc.locale, /etc/profile and ~/.bash_profile.
I see the red light of the camera turning on every time, but the image won't be shown. Is there any solution to run the script? (I have no external input devices connected)
Thank you!
I know its quite an old thread, but I thought you might be still interested in a solution that worked for me. Hopefully, that can help you as well:
Raspberry Pi - Autostart OpenCv-Script - Error with cv::imshow()
In short: You most likely have problems with the DISPLAY / XAUTHORITY environment variable.

How to make my script auto-run when a USB is plugged in?

I have the following python file in my usb:
Game.py
I want to make it run automatically when I plug in the USB.
I wrote the following in notepad:
[autorun]
shellexecute=Game.py
action=MyProgram Open Program
and saved it as autorun.inf.
But it does not run and my computer displays:
There is a problem with this drive. Scan and fix it now?
Whats wrong and how can I fix this?
Note:
I am using Windows 10.
hi i am a beginner myself but this should do the trick
[autorun]
;Open=YOURAPP.exe
ShellExecute=YOURAPP.exe
UseAutoPlay=1
You can't use [autorun] or autorun.inf files on Windows anymore. Microsoft disabled this in Windows 7 so that viruses can't spread easily.

Raspberry Pi, Windows 10 IoT, Visual Studio Update 2, Python won't deploy: Cannot connect to remote debugger

With the following setup I am trying to run a simple "Hello World" program.
Windows IoT
Raspberry Pi 3
Visual Studio 2010 with all of the relevant addons
The error that I'm getting is:
Cannot connect to remote debugger.
I've tried the following solutions:
Use powershell to start msvsmon (file cannot be found)
Followed the guide here: https://ms-iot.github.io/content/en-US/win10/AppDeployment.htm#python
I've been searching and trying to fix this and got nowhere. What new things can I try?
Only Visual Studio 2015 is supported (probably typing mistake by you). I wouldn't waste time on "Stable" release of Windows 10 Core - I had to many problems. Go for Windows 10 IoT Core Insider Preview https://ms-iot.github.io/content/en-US/Downloads.htm
Verify you have the Remote Machine "Authentication Mode" set to Universal (Unencrypted Protocol). This can sometimes cause problems with the debugger.
Check out Step 3 here: https://ms-iot.github.io/content/en-US/win10/AppDeployment.htm

When running a pygame script as root, no sound is output?

I have written a very simple script for my raspberry pi that loads an uncompressed WAV and plays it - however when I run the script as root (to be able to use GPIO and ServoBlaster), there is no sound output.
I have set the default audio device to a USB sound card, and this works - I have tested this using aplay fx.wav.
Running the pygame script without sudo, the sound plays fine.
What is going on here?
The issue was the sudo command changing the directory in which the script was being run - so running python with sudo -s or simply using an absolute path for the sound fixed it.

Categories

Resources