Modifications

Sauter à la navigation Sauter à la recherche
Ligne 2 : Ligne 2 :     
== Question - Réponse ==
 
== Question - Réponse ==
===  Help! My Arduino servo code stops working when combined with NeoPixels! ===
+
===  Mo code servo sur Arduino arrête de fonctionner lorsqu'il est combiné avec NeoPixels! ===
{{bloc-etroit|text=Unfortunately the NeoPixel and Servo libraries don’t play nice together; one is dependent on periodically disabling interrupts, the other absolutely requires interrupts. There are a couple of options here:
+
{{bloc-etroit|text=Malheureusement, les bibliothèques NéoPixel et servo ne fonctionne pas très bien ensemble; La première ayant besoin de désactiver les interruptions de façon périodique et la deuxième en a absolument besoin pour fonctionner. Vous avez néanmoins quelques alternative:
   −
* Use a dedicated servo control shield or {{pl|89|breakout board}}, offloading that task from the processor so interrupts are a non-issue.
+
* Utiliser un shield controleur servo ou un {{pl|89|breakout controleur PWM/Servo}}, déchargeant le processeur de la tâche et libérant ainsi les interruptions.
* Use a hardware-PWM-based servo library rather than the stock Arduino Servo library. This can provide rock-steady servo timing without interrupts, but can only control a very limited number of servos (2-3), and only on very specific pins. [http://arduiniana.org/libraries/pwmservo/ PWMServo] appears to handle this…download “Paul’s version 2 library” from that page.}}
+
* Utiliser une bibliothèque servo hardware-PWM-based (signal PWM contrôlé matériellement) plutôt que la librairie Servo Arduino (d'origine). Cela peut offrir un contrôle du temps vraiment très stable sans utiliser d'interruption, mais peut seulement contrôler but un nombre très limité de servo (2-3) et uniquement sur des broches très spécifiques. [http://arduiniana.org/libraries/pwmservo/ PWMServo] semble pouvoir gérer cela... téléchargezz la "bibliothèque de Paul (v2)” depuis cette page.}}
   −
=== How fast can I refresh a string of (N) pixels? ===
+
=== A quelle vitesse puis-je rafraichir une chaine de (N) pixels? ===
{{bloc-etroit|text=NeoPixels receive data from a fixed-frequency 800 KHz datastream (except for “V1” Flora pixels, which use 400 KHz). One bit therefore requires 1/800,000 sec — 1.25 microseconds. One pixel requires 24 bits (8 bits each for red, green blue) — 30 microseconds. After the last pixel’s worth of data is issued, the stream must stop for at least 50 microseconds for the new colors to “latch.”
+
{{bloc-etroit|text=Les NéoPixels reçoivent le flux de donnée à la fréquence fixée de 800 KHz (excepté pour les pixels Flora “V1” qui utilisait un fréquence de 400 KHz). One bit therefore requires 1/800,000 sec — 1.25 microseconds. One pixel requires 24 bits (8 bits each for red, green blue) — 30 microseconds. After the last pixel’s worth of data is issued, the stream must stop for at least 50 microseconds for the new colors to “latch.”
    
For a strip of 100 pixels, that’s (100 * 30) + 50, or 3,050 microseconds. 1,000,000 / 3,050 = 328 updates per second, approximately.}}
 
For a strip of 100 pixels, that’s (100 * 30) + 50, or 3,050 microseconds. 1,000,000 / 3,050 = 328 updates per second, approximately.}}
29 917

modifications

Menu de navigation