Ceci est une ancienne révision du document !
Horloge QI
- Porteur du projet : Kylian Z
- Fichiers utiles : mettre un lien vers un code ou un fichier
Note d'intention
Références et liens
- Notez ici les références artistiques et techniques, ou autres influences
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 stepsPerRev=200; int pulseWidthMicros = 200; // microseconds int millisBtwnSteps = 2000; int speedo = 300; // vitesse du moteur.... void setup() { Serial.begin(9600); pinMode(enPin, OUTPUT); digitalWrite(enPin, LOW); Serial.println(F("CNC Shield Initialized")); } void loop() { //Serial.println(F("Running clockwise")); digitalWrite(dirYPin, HIGH); // Enables the motor to move in a particular direction // Makes 200 pulses for making one full cycle rotation for (int i = 0; i < stepsPerRev; i++) { digitalWrite(stepYPin, HIGH); delayMicroseconds(speedo); digitalWrite(stepYPin, LOW); delayMicroseconds(speedo*10); } }