start:arduino:74hc595:programmes
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
start:arduino:74hc595:programmes [2022/03/08 11:52] – [Programme pour 74HC595 sans librairie] gerardadmin | start:arduino:74hc595:programmes [2023/01/27 16:08] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 69: | Ligne 69: | ||
</ | </ | ||
+ | |||
+ | ==== Programmation d un 74HC595 avec la librairie Shifty ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | Un gestionnaire 74HC595 flexible pour Arduino | ||
+ | |||
+ | La bibliothèque Shifty pour Arduino est un moyen très flexible de gérer les registres à décalage 74HC595. Il vous permet d' | ||
+ | |||
+ | <code c Prog_Test_Shifty> | ||
+ | #include < | ||
+ | |||
+ | // Declare the shift register | ||
+ | Shifty shift; | ||
+ | |||
+ | void setup() { | ||
+ | // Set the number of bits you have (multiples of 8) | ||
+ | shift.setBitCount(8); | ||
+ | |||
+ | // Set the clock, data, and latch pins you are using | ||
+ | // This also sets the pinMode for these pins | ||
+ | shift.setPins(11, | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | // writeBit works just like digitalWrite | ||
+ | shift.writeBit(1, | ||
+ | delay(500); | ||
+ | shift.writeBit(3, | ||
+ | delay(500); | ||
+ | shift.writeBit(1, | ||
+ | delay(500); | ||
+ | shift.writeBit(3, | ||
+ | |||
+ | delay(500); | ||
+ | } | ||
+ | </ | ||
==== Programme pour 74HC595 sans librairie ===== | ==== Programme pour 74HC595 sans librairie ===== | ||
/home/chanteri/www/fablab37110/data/attic/start/arduino/74hc595/programmes.1646736750.txt.gz · Dernière modification : 2023/01/27 16:08 (modification externe)