Modifications

Sauter à la navigation Sauter à la recherche
735 octets supprimés ,  11 mars 2013 à 19:59
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{Arduino-I2C-Intro-NAV}}
 
{{Arduino-I2C-Intro-NAV}}
  −
{{traduction}}
  −
  −
http://arduino.cc/en/Tutorial/MasterWriter
  −
  −
<nowiki>Reading data from the DS1307 should be easy for you now, reset the register pointed, then request seven bytes of data and receive them into seven variables. The device address is 0×68.  For example:
  −
  −
Wire.beginTransmission(0x68);
  −
  −
Wire.write(0);
  −
  −
Wire.endTransmission();
  −
  −
Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
  −
  −
*second    = bcdToDec(Wire.read();
  −
  −
*minute    = bcdToDec(Wire.read();
  −
  −
*hour      = bcdToDec(Wire.read();
  −
  −
*dayOfWeek  = bcdToDec(Wire.read());
  −
  −
*dayOfMonth = bcdToDec(Wire.read());
  −
  −
*month      = bcdToDec(Wire.read());
  −
  −
*year      = bcdToDec(Wire.read());
  −
</nowiki>
  −
http://tronixstuff.wordpress.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/
      
== Broches I2C pour Arduino ==
 
== Broches I2C pour Arduino ==
29 836

modifications

Menu de navigation