Use PsychPy to activate MS Kinect (or other IR devices) - usb

Is there a way to activate the MS Kinect out of PsychoPy?
I am using PsychoPy for an experiment and I am using infrared (IR) cameras to capture participants movements. I want to automatically send a marker that is visible to the IR cameras out of the PsychPy environment. The idea is to use the Kinect or another USB IR device (e.g., asus Primesence, or a simple USB mounted IR LED) to send markers for certain events in my experiments (meaning whenever event X is happening in PsychoPy, and IR signal should be emitted from the kinect or another IR Device).
(I cannot use the sound jack to trigger an IR LED since I need the audio exit for the experiment.)
Thanks!

PsychoPy can send signals over the serial or parallel ports or connect to specific equipment like LabJack. See the API docs here: http://www.psychopy.org/api/serial.html, http://www.psychopy.org/api/parallel.html, http://www.psychopy.org/api/hardware.html.
If you can find or build a piece of hardware with LEDs that can respond to one of the ways in which PsychoPy can communicate, then yes, you could control LED IR pulses as required.

Related

Kinect IR Emitter Continuous or Pulsed?

I'm a student intern and have a work project using Kinect cameras. Unfortunately I can't go into project details due to confidentiality, but need to know if the IR dot array that is emitted from the IR blasters within the Kinect is a continuous stream or pulsed? Just the emitted IR light, not the reception from the IR camera. It would be shining on some other IR light sensors within the environment that detect when something passes through their IR field of view, but I have been told that it would not interfere as long as the stream is continuous.
I would appreciate any help/ information you guys could give.
The kinect 360 cameras has a static pattern of points that are unevenly distributed. The pattern is continuous and not pulsed as far as I know.

Directly Control USB Output?? (any language)

So I know that for a USB port type A there is 2 ouputs/inputs. I'm working on a simple electronic circuit and I would like to ouput datas on to my computer so a program could work with it. How (without it getting too complicated on the circuit side) can I just choose the output of the USB port and read the input just on the on/off level?
Thanks
What you want is the www.Nusbio.net device.
it is an USB device that give any .NET programming languages access to 8 gpios and also SPI and I2c bus.
USB is more complicated than what you are describing. It sounds like what you really want is a serial port, where you can use the TX and RX lines as your output and input to the PC, or manually control the modem control or GPIO pins. You can still do this with USB via a USB to UART Bridge device.
If you are simply looking to toggle an I/O pin, some of these devices also have general purpose I/O pins for this type of thing. You can set it to low/high from the PC if it is set to be an output and read the I/O value if it is an input.
You can talk to it as a serial device from your computer using normal serial communications such as POSIX method for Linux or OSX or the Commuincations API for Windows. In this case you can also set the flow control to manual and use the RTS/CTS pins as GPIOs.
You cannot directly control the USB inputs and outputs like you want to do. However, there are various solutions that involve connecting a USB device to your computer and sending commands to it that use its inputs and outputs. One such solution is called Firmata.

Turning off the Kinect IR emitter

I'd like to use two XBOX Kinect cameras simultaneously, but their IR signals interfere.
Therefore, I'd like to be able to switch their IR emitters in an alternating fashion. I read that if using the Microsoft SDK, there was a ForceInfraredEmitterOff flag that can be set, but would not work with XBOS Kinects.
Other sources on the web say that the IR emitter stops when you stop the depth buffer stream. However, that does not seem to work.
I'm using the openni2 python bindings provided by PrimeSense. Is there any way I can shut the IR emitters off with that?

How can the GP 635T GPS module attached to an Arduino send coordinates to the laptop?

I am trying to create a space balloon. I need a way to track the balloon. I found a GPS Module with built-in antenna which is the GP-635T. However, after I set it up with the arduino, what is the code or what should I upload to the arduino so that it sends coordinates to the laptop without being connected via USB.
Here is the GPS Module:
https://www.sparkfun.com/products/11571
What you want to do doesn't involve merely programming the arduino. It will require you a radio or satellite transmitter to send out the coordinates to a matching receiver that can be connected to your PC to demodulate the radio signal and present the coordinate data through USB or serial interfaces. I'm sorry to say that, but unfortunately it seems to be a very expensive proposition and a bit hard for you to implement considering you seem not to know how to program the arduino yet or are aware of the additional hardware requirements and technical difficulties involved.
If you do happen to get a radio or satellite transmitter to go on the ballon and supply it with an adequate battery, the arduino part will be the easiest, just read the coordinate data from the serial port connected to your GPS module and relay it to the other serial port connected to your transmitter. Since you only have one hardware serial port on the arduino you'll have to use a software serial library for the other one.
A common hobbyist method to balloon tracking is to use the cellular phone system. Get a cellular module and have the Arduino text its location to your phone.
This obviously won't work in near-space but it's a cheap, long range system for balloon recovery once it gets closer to the ground. (Provided you are in an area with adequate cell phone service and not in the middle of a desert)

Arduino project using infrared sensor and usb communication

I am planning on doing a small arduino project and would like to know if what I'm thinking would work with a regular arduino board. I'm thinking of buying an Arduino Uno for my project, along with an IR LED and an IR sensor. So here's what I want to go with this:
I want to point the LED towards the sensor, so that the sensor is always detecting light. Then', I'll start "cutting" that light (say, with with my hand) several times. I want the arduino program to time the intervals between the times the light is "cut" and send these times to my computer via USB, so I can process this data.
I've seen many people talk about serial communication between an arduino board and a computer, but I'm not sure how that works. Will it use the same usb connector I use to upload programs to the board, or do I have to buy anything else?
EDIT: tl;dr: I guess my question, in the end, is twofold:
1) Am I able to "talk" to my computer using the built-in USB connector on the board, or is that used solely for uploading programs and I need to buy another one? and
2) Is this project feasible with an Arduino Uno board?
Thanks for the help!
Yes, your project is very feasible.
You use the built in USB connector to both program the device and communicate with it. Check out some examples on the Serial Reference Page
For reading the sensor, you'll want to use either a digital or analog input. For a digital input, you'll likely have to external components to control the light threshold, but it will provide a simple yes or no if something is in front of it. With an analog input, you can use a threshold in code to determine when your hand passes.
Timing can either be done on device with the Millis() function or on the connected computer.