dreadNought.195 / dreadnought_195.py
antitheft159's picture
Upload dreadnought_195.py
32843d6 verified
raw
history blame
480 Bytes
# -*- 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')