Objectifs

  • Savoir le fonctionnement d’un tachymètre LASER  Tx/Rx
  • Savoir utiliser une photorésistance
  • Savoir les limites d’une photorésistance
  • Savoir utiliser un LASER comme capteur de vitesse
  • Etc.

Programme Arduino

#define     Seuil   600.0
void setup()
{
// ADC
analogReadResolution(12); // Ajustable <= 12 (4096 Niveaux)

// Affichage
Serial.begin(250000);
}

void loop()
{
// Lecture
float V1=(float)analogRead(A0);
V1=(V1*3.3/4095.0)*1000.0;
float V2=3300.0*(V1<Seuil);

// Affichage
Serial.print(V1); Serial.print("\t");
Serial.println(V2);
delay(10);
}
Click to rate this post!
[Total: 2 Average: 5]

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Retour en haut

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

FPGA | Arduino | Matlab | Cours will use the information you provide on this form to be in touch with you and to provide updates and marketing.