====== Horloge QI ====== * Porteur du projet : Kylian Z * Fichiers utiles : //mettre un lien vers un code ou un fichier// {{tag>arduino, cnc, shield}} ===== Note d'intention ===== Horloge avec 2 plateau tournant en sens inversé. {{projets:horloge_qi:start:3rose.jpg?800|Horloge QI}} ==== Références et liens ==== * https://www.tommycoolman.com/2021/07/31/control-two-independent-stepper-motors-with-an-arduino/ * * ===== Notes techniques et matériaux ===== Arduino Shield CNC Stepper motor Engrenage courroie et mecanique diverse const int enPin=8; const int stepXPin = 2; //X.STEP const int dirXPin = 5; // X.DIR const int stepYPin = 3; //Y.STEP const int dirYPin = 6; // Y.DIR const int stepZPin = 4; //Z.STEP const int dirZPin = 7; // Z.DIR const int nombredepasH=120; // rapport 60 heure const int nombredepasM=2; int speedoH = 100; //micro s entre les pas... int speedoM = 100; void setup() { pinMode(enPin, OUTPUT); digitalWrite(enPin, LOW); digitalWrite(dirYPin, HIGH); // Enables the motor to move in a particular direction digitalWrite(dirXPin, LOW); // Enables the motor to move in a particular direction } void loop() { for (int i = 0; i < nombredepasM; i++) { digitalWrite(stepYPin, HIGH); delayMicroseconds(speedoM); digitalWrite(stepYPin, LOW); delayMicroseconds(speedoM*10); } for (int i = 0; i < nombredepasH; i++) { digitalWrite(stepXPin, HIGH); delayMicroseconds(speedoH); digitalWrite(stepXPin, LOW); delayMicroseconds(speedoH*10); } } ===== Photos et médias===== Code pour afficher les images du projet : {{gallery>?&crop&lightbox }}