mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Migrate from astyle to clang-format (#8464)
This commit is contained in:
committed by
Max Prokhorov
parent
46190b61f1
commit
19b7a29720
@ -18,8 +18,8 @@ const int16_t I2C_MASTER = 0x42;
|
||||
const int16_t I2C_SLAVE = 0x08;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200); // start serial for output
|
||||
Wire.begin(SDA_PIN, SCL_PIN, I2C_MASTER); // join i2c bus (address optional for master)
|
||||
Serial.begin(115200); // start serial for output
|
||||
Wire.begin(SDA_PIN, SCL_PIN, I2C_MASTER); // join i2c bus (address optional for master)
|
||||
}
|
||||
|
||||
void loop() {
|
||||
@ -27,11 +27,11 @@ void loop() {
|
||||
static periodic nextPing(1000);
|
||||
|
||||
if (nextPing) {
|
||||
Wire.requestFrom(I2C_SLAVE, 6); // request 6 bytes from slave device #8
|
||||
Wire.requestFrom(I2C_SLAVE, 6); // request 6 bytes from slave device #8
|
||||
|
||||
while (Wire.available()) { // slave may send less than requested
|
||||
char c = Wire.read(); // receive a byte as character
|
||||
Serial.print(c); // print the character
|
||||
while (Wire.available()) { // slave may send less than requested
|
||||
char c = Wire.read(); // receive a byte as character
|
||||
Serial.print(c); // print the character
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user