Skip to content

Instantly share code, notes, and snippets.

import Adafruit_BBIO.GPIO as GPIO
def main():
GPIO.setup("P8_7", GPIO.IN)
if GPIO.input("P8_7"):
print("Dry, water me!")
else:
print("Moist, no need for water")
if __name__ == '__main__':
### Keybase proof
I hereby claim:
* I am smoriarty21 on github.
* I am atarimaster001 (https://keybase.io/atarimaster001) on keybase.
* I have a public key ASC9lds1QRl3QjqOQh595h3DlOLEBBdwrq5qnajaKYe-OQo
To claim this, I am signing this object:
# Name agent components
a1.sources = r1
a1.sinks = k1 hb1
a1.channels = c1 c2
# Source Information
a1.sources.r1.type = avro
a1.sources.r1.bind = x.x.x.x #IP of web server or 0.0.0.0 to allow connection from all
a1.sources.r1.port = xx # Port to listen on
# Name agent componnents
source.sources = r1
source.sinks = avro-f-sink
source.channels = c1
# Source information
source.sources.r1.type = exec
source.sources.r1.command = tail -F /log/apache/access_log
source.sources.r1.channels = c1