From dbb0b6feae91e90ccc9d7d02409b56c173a2e43b Mon Sep 17 00:00:00 2001 From: Cole Deck <1-shark@users.noreply.192.168.86.189> Date: Thu, 8 Aug 2019 06:10:06 -0700 Subject: [PATCH] add the Pi's I2C python script --- power.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 power.py diff --git a/power.py b/power.py new file mode 100644 index 0000000..97848be --- /dev/null +++ b/power.py @@ -0,0 +1,6 @@ +from smbus import SMBus + +addr = 0x8 # bus address +bus = SMBus(1) # indicates /dev/ic2-1 +bus.write_byte(addr, 0x78) # switch it on +print("Message sent to Arduino.") \ No newline at end of file