diff options
author | Blaise Thompson <blaise@untzag.com> | 2021-03-05 10:08:24 -0600 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2021-03-05 10:08:24 -0600 |
commit | f3fab3b2e0c5d02cc18abab27c27055bb23d4def (patch) | |
tree | 112811c57e5633b0f85007727febe0d3331960d8 /digital-controller/firmware | |
parent | c638cb47f8a4c173f8f226ea4ba85c6ec08bdec1 (diff) |
analog-driver revision B
Diffstat (limited to 'digital-controller/firmware')
-rw-r--r-- | digital-controller/firmware/firmware.ino | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/digital-controller/firmware/firmware.ino b/digital-controller/firmware/firmware.ino index 86e4bb0..e87db8d 100644 --- a/digital-controller/firmware/firmware.ino +++ b/digital-controller/firmware/firmware.ino @@ -4,11 +4,15 @@ void setup() { + pinMode(A4, OUTPUT); + pinMode(A5, OUTPUT); // init the Wire object Wire.begin(); // wait for slave to finish any init sequence delay(2000); + + Serial.begin(9600); } void loop() @@ -18,6 +22,7 @@ void loop() uint8_t buf[1]; buf[0] = 255-a; // adjusting this byte changes fan speed. Can be adjusted from 0 to 256. buf[1] = a; // adjusting this byte changes LED intensity. Can be adjusted from 0 to 256. + Serial.println(int(buf)); // send buffer Wire.beginTransmission(I2C_SLAVE_ADDR); |