From 2ad3620908caca9c6405a54aa872d474cb43fffc Mon Sep 17 00:00:00 2001 From: LazyAssassin445 Date: Sat, 11 Mar 2017 13:46:58 +0000 Subject: [PATCH] Updated fetchprogram, ignores pycache, created ledtest with npn --- fetchprogram | 2 +- modules/.gitignore | 2 ++ testprograms/ledtest | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 modules/.gitignore create mode 100755 testprograms/ledtest diff --git a/fetchprogram b/fetchprogram index e84dc27..34ac9bb 100755 --- a/fetchprogram +++ b/fetchprogram @@ -1,7 +1,7 @@ #!/usr/bin/python3 import os, sys -lib_path = os.path.abspath(os.path.join('..', 'modules')) +lib_path = os.path.abspath(os.path.join('.', 'modules')) sys.path.append(lib_path) import hdc1000 import weight diff --git a/modules/.gitignore b/modules/.gitignore new file mode 100644 index 0000000..c20c2ab --- /dev/null +++ b/modules/.gitignore @@ -0,0 +1,2 @@ +__pycache__ + diff --git a/testprograms/ledtest b/testprograms/ledtest new file mode 100755 index 0000000..045c317 --- /dev/null +++ b/testprograms/ledtest @@ -0,0 +1,17 @@ +#!/usr/bin/python3 + +import RPi.GPIO as GPIO +import time +import sys + +GPIO.setmode(GPIO.BCM) +GPIO.setup(23, GPIO.OUT) + +GPIO.output(23, 0) + +while True: + time.sleep(1) + GPIO.output(23, 1) + time.sleep(1) + GPIO.output(23, 0) +