File size: 480 Bytes
32843d6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# -*- coding: utf-8 -*-
"""DreadNought.195
Automatically generated by Colab.
Original file is located at
https://colab.research.google.com/drive/1mw3Ux6AQwJJzl9ZBnCVlfHtkExsAEZrr
"""
import RPi.GPIO as GPIO
import ADC0834
from time import sleep
GPIO.setmode(GPIO.BCM)
ADC0834.setup()
try:
while True:
lightVal=ADC0834.getResult(0)
print('Light Value:',lightVal)
sleep(.2)
except KeyboardInterrupt:
sleep(.1)
GPIO.cleanup()
print('GPIO Ready To Perform') |