aboutsummaryrefslogtreecommitdiff
path: root/Digital Photoreactor Controller Firmware/Master_Photoreactor_Controller
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2021-01-19 10:53:07 -0600
committerBlaise Thompson <blaise@untzag.com>2021-01-19 10:53:07 -0600
commit84407fe580156dc12f4792c08ee42d70df6c4427 (patch)
tree14770f62848080c5508346761dc50dec68b4aa32 /Digital Photoreactor Controller Firmware/Master_Photoreactor_Controller
parent132c489782ce84ba676eacdd9903cc26ee5de2cb (diff)
restructure repository
Diffstat (limited to 'Digital Photoreactor Controller Firmware/Master_Photoreactor_Controller')
-rw-r--r--Digital Photoreactor Controller Firmware/Master_Photoreactor_Controller/Master_Photoreactor_Controller.ino40
1 files changed, 0 insertions, 40 deletions
diff --git a/Digital Photoreactor Controller Firmware/Master_Photoreactor_Controller/Master_Photoreactor_Controller.ino b/Digital Photoreactor Controller Firmware/Master_Photoreactor_Controller/Master_Photoreactor_Controller.ino
deleted file mode 100644
index 8c2ffa4..0000000
--- a/Digital Photoreactor Controller Firmware/Master_Photoreactor_Controller/Master_Photoreactor_Controller.ino
+++ /dev/null
@@ -1,40 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////////
-// Digital Photoreactor Controller Slave Program Controlled by I2C //
-// Run this slave program on the Arduino Uno or Rasberry Pi. //
-////////////////////////////////////////////////////////////////////////////////////
-
-#include <Wire.h>
-
-#define I2C_SLAVE_ADDR 0x26 // I2C slave address (38, 0x26)
-
-void setup()
-{
- // init the Wire object
- Wire.begin();
-
- // wait for slave to finish any init sequence
- delay(2000);
-}
-
-void loop()
-{
-
- //generate buffer containing data to send via I2C
- uint8_t buf[1];
- buf[0] = 25; // adjusting this byte changes fan speed. Can be adjusted from 0 to 256.
- buf[1] = 1; // adjusting this byte changes LED intensity. Can be adjusted from 0 to 256.
-
- // send buffer
- Wire.beginTransmission(I2C_SLAVE_ADDR);
- Wire.write( buf, 2);
- Wire.endTransmission();
-
- // delay 20 milliseconds to accomodate slave onReceive()
- delay(20);
-
- /////////////////////// WHY DO I NEED THIS PART?//////////////////////////
- Wire.requestFrom(I2C_SLAVE_ADDR, 1);
-
- // delay 1 second so user can watch results
- delay(1000);
-}