projets:horloge_qi:start

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

Horloge avec 2 plateau tournant en sens inversé.

Horloge QI

  • Notez ici les références artistiques et techniques, ou autres influences

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);
  }
}

Code pour afficher les images du projet :

  • projets/horloge_qi/start.1677507211.txt.gz
  • Dernière modification: 2023/02/27 15:13
  • de admin