From f3fab3b2e0c5d02cc18abab27c27055bb23d4def Mon Sep 17 00:00:00 2001 From: Blaise Thompson Date: Fri, 5 Mar 2021 10:08:24 -0600 Subject: analog-driver revision B --- digital-controller/firmware/firmware.ino | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'digital-controller') 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); -- cgit v1.2.3