initialer commit
This commit is contained in:
9
temp_sensor.py
Normal file
9
temp_sensor.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import RPi.GPIO as GPIO
|
||||
|
||||
class TempSensor:
|
||||
def __init__(self, pin):
|
||||
self.pin = pin
|
||||
GPIO.setup(pin, GPIO.IN)
|
||||
|
||||
def read_data(self):
|
||||
return GPIO.input(self.pin)
|
||||
Reference in New Issue
Block a user