Outils pour utilisateurs

Outils du site


wiki:projets:polarimetre-materiel-progra
  • *Voici l'ébauche du programme du polarimètre:**

#include <Stepper.h>

int PhotocellPin = ?; int PhotocellReading; Stepper analyzer(# of steps, pin 1-4); Stepper rotar(# of steps, pins 1-4); int echantillon = 1; int AnalyzerSteps = 0; int RotarSteps; int alpha;

void setup () {

 analyzer.setSpeed(rpm);
 rotar.setSpeed(rpm);
 serial.begin(9600);

}

void loop () {
  PhotocellReading = analogRead(photocellPin);
  serial.print("value= photocellReading");

if(echantillon < 4) {

 if(PhotocellReading > ?) {
  analyzer.step(1);
  AnalyzerSteps = AnalyzerSteps + 1;
  PhotocellReading = analogRead(PhotocellPin);
  }
 Else {
  serial.print("total steps= AnalyzerSteps");
  alpha= ((AnalyzerSteps/# of steps)*Y)*360;
  serial.print ("Alpha = alpha");
  analyzer.step(- AnalyzerSteps);
  rotar.step(?);
  AnalyzerSteps = 0;
  echantillon = echantillon + 1;
  }
  }
 echantillon = 1;
 delay
wiki/projets/polarimetre-materiel-progra.txt · Dernière modification: 2020/10/05 16:39 (modification externe)