Society of Robots - Robot Forum
Software => Software => Topic started by: alm1909 on November 24, 2011, 01:50:50 PM
-
Hi as part of my university project i am required to use the arduino board and the IR sensor to start video that would be projected when someone walks into a room. I was wondering if anyone knows how i can set the IR sensor and Arduino up so that the program on the mac could tell if there was motion through the sensor, kind of like an infra red switch that would start a video program on the mac. If anyone could help me it would be greatly appreciated.
Equipment i currently have:
• Sharp 2YOA21 IR Distance Sensor
• IR Distance Adaptor
• Arduino Board
• USB Connector
• Wires
If i require any other parts please tell me :)
-
Hi there.
You will need to write code for Arduino so that it keeps reading IR Sensor output, and if distance falls below threshold value, signal is sent via UART to USB (or Ethernet, or WiFi, or Bluetooth) port of Mac. Now, there will have to be second part of software, this time in Your Mac. That one should be waiting for signal from Arduino and start playing video when signal is received.
-
Hi as part of my university project i am required to use the arduino board and the IR sensor to start video that would be projected when someone walks into a room.
Just curious, but was that particular IR sensor specified? If not it might be easier to use a passive IR sensor instead, such as http://www.sparkfun.com/products/8630 (http://www.sparkfun.com/products/8630)
You can set the arduino up to to generate an external interrupt when the sensor alerts, and then put the arduino to sleep. When the sensor fires the arduino will wake up and do it's thing. Makes for longer battery life.
If it was specified then NIB's solution is the way to go.
Joe