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/slave_sender/slave_sender.ino | |
parent | c13cf02651e178ea7941a82bee364d82c6b19b9c (diff) |
Examples: mass code format. See example_formatter.conf
Diffstat (limited to 'libraries/Wire/examples/slave_sender/slave_sender.ino')
-rw-r--r-- | libraries/Wire/examples/slave_sender/slave_sender.ino | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libraries/Wire/examples/slave_sender/slave_sender.ino b/libraries/Wire/examples/slave_sender/slave_sender.ino index 26b9e52..d2e72bb 100644 --- a/libraries/Wire/examples/slave_sender/slave_sender.ino +++ b/libraries/Wire/examples/slave_sender/slave_sender.ino @@ -12,21 +12,18 @@ #include <Wire.h> -void setup() -{ +void setup() { Wire.begin(8); // join i2c bus with address #8 Wire.onRequest(requestEvent); // register event } -void loop() -{ +void loop() { delay(100); } // function that executes whenever data is requested by master // this function is registered as an event, see setup() -void requestEvent() -{ +void requestEvent() { Wire.write("hello "); // respond with message of 6 bytes // as expected by master } |