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?
Related
I need to play several videos (with the relative audios) under a python script because I need to insert specific pauses between them and triggers (for a neuropsychological experiment).
I tried many examples on the internet to implement the media player, like this one from here, but I didn`t manage to compile the library MPlayer.
Finally I just need to have videos controlled by python, either using an external program or not. The critical part is to find a way to implement playvideo() in the following code
for pairs in Videos_paired_to_play:
video1,video2 = pairs
send_trigger(triggerType1)
playvideo(video1[1] )
make_a_pause(2)
playvideo(video2[1])
send_trigger(triggerType2)
make_a_pause(20)
Ideally, I would need a way to play videos without destroying the window after having played them.
Thanks!
If you're on windows, you could tie into the windows media player COM object which will have a lot more options available to you
https://msdn.microsoft.com/en-us/library/windows/desktop/dd564035(v=vs.85).aspx
Alternatively, you could find another feature-complete player that exposes it's Interface to COM or python depending on OS. This would probably beat trying to hack your own, and the documentation would be there if you needed to extend or refactor it for other things
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.
I am looking for a way to capture audio from a mic, transform it using a LADSPA/VST plugin, and publish the resulting sound as a stream available in IP network. The type of filter applied and its parameters should be controlled via Python.
I am aware this is pretty many layered question, but the real-time sound processing in Python is terra incognita for me, so I am clutching at straws here, even at how to architect this solution.
I'm trying to make my first Raspberry Pi to run a script that uses files from memory cards. Since my Pi does not have a display I want to write it in a fail safe way where it does not matter if somebody pulls the card at any time. Now I'm just wondering what the best way would be. I'm talking about multiple adds and removes of usb sticks per run. The card will be read only.
How would you solve that?
Would you stick to fstab or rather use python to auto mount after detection over dbus?
What kind of clean up is necessary after a volume has been pulled out of the usb slot?
Jason, if you use a automount, and define a short commit time on automount configuration, the removal of flash card is secure.
I use "usbmount" service.
My especific config (at /etc/usbmount/usbmount.conf) is:
FS_MOUNTOPTIONS="-fstype=vfat,umask=000,commit=1 -fstype=ext4,commit=1,relatime"
with define a time of 1 second to start to write on flash card.
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/