Implement I2C support into firmware

This commit is contained in:
bzi 2019-02-21 21:04:55 +01:00
parent 05ada31f0e
commit c4edb43af6
1 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
dht.begin();
Wire.begin(8); // join i2c bus with address #8
Wire.onRequest(requestEvent); // register event
}
void requestEvent() {
Wire.write("he1234");
}
void loop() {