I am an Electrical Engineer student and I am currently doing a Final Year Project on setting up a simulation platform for driving to test my drowsiness detecting device. I am currently looking for methods that can retrieve racing wheel's input data such as steering wheel angle because I need those data to operate my device effectively. I have tried to look up on the internet and I only found these documents:
https://learn.microsoft.com/en-us/uwp/api/windows.gaming.input.racingwheelreading
https://learn.microsoft.com/en-us/windows/uwp/gaming/racing-wheel-and-force-feedback
It seems like windows only support device that is compatible with xbox one or xbox 360 steering wheel. Due to our limiting allowed budget, we could only find some cheap steering wheels that are compatible with PS4/PS3 and PC. Is there any other way that can read input data like steering angle from any pc compatible racing wheel? By the way, I am using windows operating system.
I would really appreciate any help.
Most likely, if your steering wheels are marked as PC compatible, they appear in Windows as joysticks. These devices can be read using the Multimedia Joystick API or DirectInput.
The Multimedia Joystick API docs are here: https://msdn.microsoft.com/en-us/library/windows/desktop/dd757116(v=vs.85).aspx. You use this API by calling a series of C functions, like joyGetPosEx(), which are all available in Windows.h.
DirectInput is more complicated to set up, and works using COM. DirectInput docs are here: https://msdn.microsoft.com/en-us/library/windows/desktop/ee416842(v=vs.85).aspx
XInput is supposed to be the next generation API for input devices, but it only supports input devices that have the layout (joysticks, buttons, etc.) of an Xbox 360 controller.
The documents that you found work with Microsoft's newer "Universal Windows Platform," which is used in the Microsoft store. UWP apps are not able to use DirectInput, and are probably not able to use the old joystick API either.
Related
I am trying to capture images from a Mightex cmos usb camera (SCE-B013-U) with Python 3.6.5 and opencv-python 3.4.3.18. The software came along confirms the camera works fine. But, cv2.VideoCapture(0).isOpened() is false. I am sure I am missing something, but I do not know what. Please help. Thanks a lot in advance.
For testing I have 1 camera installed on my setup that I know is opencv compatible with the command below:
print(cv2.VideoCapture(0).isOpened())
returns True for me, but if I unplug the camera, it returns False. False can imply that there is no camera available....
If the other answer (above) yields no result, perhaps the installed driver may not be compatible with opencv?
From the product description:
In addition, a user-friendly GUI based application software and an SDK
are provided for custom software development. A USB command set
protocol is also provided for non-Windows based application
Cannot help but to think that this company may be following a different standard to the one opencv typically uses. For example, many USB3Vision cameras will not work out of the box in the way you are attempting and require additional programming to return a NumPy style array image.
Additional support for my thinking is in the "EXAMPLE OF GRAPHICAL USER INTERFACE"
Many of the options I've seen in the GeniCam standard (USB3Vision).
Camera Mode (Continuous / Trigger), Exposure Control, Autoexposure Enable, etc
This is not to say that the camera is definitely is or is not one or the other, but the symptoms suggest the camera is not compliant to run out of the box using opencv in the way you want to.
You could try this 3rd party SDK instead to help verify.
I have no affiliation with them, but the ability to use their program for a (free) trial is very useful for helping to troubleshoot this issue.
Best of luck with getting your camera to work.
Maybe this will help, the official documentation states:
Sometimes, cap may not have initialized the capture. In that case,
this code shows error. You can check whether it is initialized or not
by the method cap.isOpened(). If it is True, OK. Otherwise open it
using cap.open().
I'm making an IOT project for home automation, including a dozen of Rpi Zero-W using Strech-Lite operating syste, to control and report its Sensor and/ or relay's status.
I believe a ESP32 Ebay link would be much more reliable since it is a controller running code rather that a whole operating system as my current solution ( By the way micro:bit does not qualify since it lacks wifi ).
My question is - can I use gpiozero library ? since my code is based on it
classes supported in MicroPython here
I've got a Brother ADS-1000W receipt scanner and using the ControlCenter4 software it works great. However I would like to be able automate the scanning process and I can't find any pointers/clues on where to get access to the ADS-1000W specific features. With the ControlCenter4 software, I can have the scanner deskew images. It also scans to an arbitrary length and width (matching the scanned receipt). I'm assuming this is being handled by the scanner, but it may be happening in the ControlCenter4 software. These features specifically don't seem to be accessible in the TWAIN interface. I tried using TWAINCommander 3 and it doesn't show the deskew and arbitrary size features in the TWAIN interface.
I've got both Linux and Windows machines available and I'm cool with a commandline solution or an SDK that I have to write software to implement. If it's an SDK, I prefer Python.
I know this is somewhat open-ended, but hoping someone can point in a direction for further research.
Just in case anyone else stumbles across this question: The ADS-1000W supports scanning to FTP. If PDF is selected, then the scanner supports the de-skew option, so I installed vsftpd on my linux box and used Python to process the files as their uploaded.
Scenario:
I've got a TTL-JPEG Camera, SD Card Holder Board, and a Synapse RF Module to play with. Trying to combine these 3 devices to create a wireless camera that can shoot videos, store them on the SD card using SPI, and then retrieve them as needed over a wireless link to a Windows PC. I am confident that I wired everything correctly.
Problem:
The problem lies in the software. Synapse RF Modules use SNAPpy, which is a subset of Python. And I believe SDFatLib is written in C/C++. So there is a conflict in language. This is a problem because SDFatLib holds all of the secrets to managing files on SD Cards.
Question:
I see a few different pathways to travel. One is trying to recreate SDFatLib in Python; another is to change microcontrollers. A third option is to maybe create my own simple file system on the SD card that can only store video (series of images) and pictures (single image) rather than using FAT32. If none of these approaches work, what would anyone suggest?
I would like to know if there are any API's for python to programmatically control a phone, like starting and ending calls, but also to record conversations.
I would also like to use the Headphones and Mic of the computer to talk over the phone.
Any info would be great, I tried googling for something, but nothing useful came up.
Be careful when using PyBluez! The results will actually depend on the BT-USB dongle you are using. Depending on the hardware(the BT chip in there), PyBluez will use one or another BT stack - for example there was one from WIDCOMM. Results will vary, as PyBluez is actually wrapping around those stacks - all of which are far from complete.
So, when you have a working project, be sure to know what actual BT stack you were using :)
For Python audio stuff, you could try this.
PyBluez is an effort to create python wrappers around system Bluetooth resources to allow Python developers to easily and quickly create Bluetooth applications.
Unfortunately I've not found a page dedicated to its features, but it could be a good starting point, whether everything you need is in its feature set, or if you could build your application upon it by extending it.
http://code.google.com/p/pybluez/