This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Portions Copyright Chromium Project. | |
import base64 | |
import hashlib | |
import hmac | |
import json | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define I2CAddress 0x42 | |
void setup() { | |
Wire.begin(I2CAddress); | |
// Remember to keep those handlers as time-critical as possible: | |
// no interrupts will be happening while these are running. | |
// Also the other end of i2c communication might just | |
// give up waiting. So keep the logic in loop() and let i2c | |
// handlers only operate on ready data. | |
Wire.onReceive(i2cReceive); |
OlderNewer