The Black Via A Push Button And Ldr Using C Code Without Libraries

1473 Words6 Pages
Objective The purpose of the experiment is to operate an LED through the BeagleBone Black via a push button and LDR using C code without libraries besides such as . The pins of the BeagleBone Black will be operated by exporting pins so they can be read or written to in the C program. A LDR and push button will be used in conjunction with the exported pins for read and write operations to illuminate the LED when it’s dark and vice versa when it’s not. With the use of exporting pins to read and write, the operation of the LED via the LDR or push button will be determined by opening up the file locations and checking the state of the LED and the value of the push button and LDR. The push button will be used to set the system in manual…show more content…
Use a push button for Manual override. Whenever the push button is pressed, it must allow turning off or turning on the LED regardless of which state the CdS sensor puts the LED in. Your program should keep track of the exact time the LED is either on or off. Must output the date and time the LED was turned on or off. Lab Setup: Figure 1: Lab Setup Conclusion The result of the experiment was a success. The C program used the BBB kernel via paths to operate the LED as specified. The push button set the system to manual mode and turned off the light if it was on and turned the LED on if it was off. The second push of the button switched it back to automatic mode. The turning on and off of the LED also resulted in accurate time stamps of the LED being on or off. The lab was pretty simple, however, the process was a little challenging in the beginning. Unlike the previous labs, we had to configure each pin for our desired functionality, which made it a bit difficult. The majority time on this lab was spent on configuration of the pins, rather than writing the code. Questions and Discussion: What is Rmax and Rmin for your CdS sensor? What is the required resistance, R, for the other half of the CdS voltage divider circuit? The CdS resistance measured in full light was approx. 50 ohms. The resistance measured in a dark lit area was approx. 350k ohms. The range

    More about The Black Via A Push Button And Ldr Using C Code Without Libraries

      Open Document