diff options
author | Federico Fissore <f.fissore@arduino.cc> | 2015-07-06 15:18:33 +0200 |
---|---|---|
committer | Federico Fissore <f.fissore@arduino.cc> | 2015-07-06 15:19:05 +0200 |
commit | b5a130afb51c971fd7ceca8834b6055f1eada253 (patch) | |
tree | d1e964f67822e9b3f10382573a9579c85b9c3e3f /libraries/Wire/examples/master_reader/master_reader.ino | |
parent | c13cf02651e178ea7941a82bee364d82c6b19b9c (diff) |
Examples: mass code format. See example_formatter.conf
Diffstat (limited to 'libraries/Wire/examples/master_reader/master_reader.ino')
-rw-r--r-- | libraries/Wire/examples/master_reader/master_reader.ino | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libraries/Wire/examples/master_reader/master_reader.ino b/libraries/Wire/examples/master_reader/master_reader.ino index 2d2419b..ecab72a 100644 --- a/libraries/Wire/examples/master_reader/master_reader.ino +++ b/libraries/Wire/examples/master_reader/master_reader.ino @@ -12,18 +12,15 @@ #include <Wire.h> -void setup() -{ +void setup() { Wire.begin(); // join i2c bus (address optional for master) Serial.begin(9600); // start serial for output } -void loop() -{ +void loop() { Wire.requestFrom(8, 6); // request 6 bytes from slave device #8 - while (Wire.available()) // slave may send less than requested - { + while (Wire.available()) { // slave may send less than requested char c = Wire.read(); // receive a byte as character Serial.print(c); // print the character } |