write a C program that interface together via a LabJack U3-HV.
Purpose of this Design: Optical Sensor Alarm with Buzzer
The purpose of your project is for a piezoelectric buzzer to sound on and an LED to turn on optical sensor circuit is interrupted. When the sensor is not interrupted, the green LED output will be off and the buzzer will be silent. When the sensor is blocked, the green LED output will turn on and the buzzer will sound on. The sensor state must be read and displayed to the user every 0.25 s, regardless of its value.
Method 2: Exit program after 15 seconds of continuous running and monitoring.
To test your project, run the code and trigger the alarm several times while the code is running to see the two outputs change states. The interface should conform to the specs listed.
Schematic Diagram
From the LabJack U3-HV: Select your own input and output channels; use one VS and one GND.