Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Algorithim_Rev6.pdf
Binary file not shown.
Binary file removed __pycache__/controller.cpython-37.pyc
Binary file not shown.
30 changes: 30 additions & 0 deletions adc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/python3

# sudo pip3 install adafruit-circuitpython-ads1x15

import time
import board
import busio
import adafruit_ads1x15.ads1115 as ADS
from adafruit_ads1x15.analog_in import AnalogIn

resistor = 0.00075

# Create the I2C bus
i2c = busio.I2C(board.SCL, board.SDA)

# Create the ADC object using the I2C bus
ads = ADS.ADS1115(i2c)

# Create single-ended input on channel 0
#chan = AnalogIn(ads, ADS.P0)

# Create differential input between channel 0 and 1
chan1 = AnalogIn(ads, ADS.P0, ADS.P1)
#chan2 = AnalogIn(ads, ADS.P2, ADS.P3)

print("{:>5}\t{:>5}".format('raw', 'v', 'current'))

while True:
print("{:>5}\t{:>5.3f}".format(chan1.value, chan1.voltage, chan1.voltage/resistor))
time.sleep(0.5)
104 changes: 0 additions & 104 deletions caiso_api.py

This file was deleted.

92 changes: 0 additions & 92 deletions controller.py

This file was deleted.

1 change: 0 additions & 1 deletion data.json

This file was deleted.

40 changes: 40 additions & 0 deletions gpio_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)

GPIO.setup(16, GPIO.OUT)
GPIO.setup(20, GPIO.OUT)
GPIO.setup(21, GPIO.OUT)
GPIO.setup(26, GPIO.OUT)
time.sleep(2)

GPIO.output(16, GPIO.HIGH)
print("Pin 16 HIGH")
time.sleep(2)
GPIO.output(16, GPIO.LOW)
print("Pin 16 LOW")
time.sleep(2)

GPIO.output(20, GPIO.HIGH)
print("Pin 20 HIGH")
time.sleep(2)
GPIO.output(20, GPIO.LOW)
print("Pin 20 LOW")
time.sleep(2)

GPIO.output(21, GPIO.HIGH)
print("Pin 21 HIGH")
time.sleep(2)
GPIO.output(21, GPIO.LOW)
print("Pin 21 LOW")
time.sleep(2)

GPIO.output(26, GPIO.HIGH)
print("Pin 26 HIGH")
time.sleep(2)
GPIO.output(26, GPIO.LOW)
print("Pin 26 LOW")
time.sleep(2)

GPIO.cleanup()
Loading