Projet

Général

Profil

Code Informatique programme principal » main.cpp

Quentin Becarie, 21/07/2020 14:12

 
#include <Arduino.h>
#include "FS.h"
#include "SD.h"
#include "SPI.h"
#include "DHTesp.h"
#include "RTClib.h"
#include <Wire.h>
#include "initialisationMoteur.h"
//#include "DemarrageMoteur.h"


volatile boolean gachette = HIGH;
volatile float comptageImpuls = 0;
long timeRef = 0;
long delai = 10000;
void demarrageMoteur(){
servo.writeMicroseconds(2000);
}

void ISR()
{
comptageImpuls=comptageImpuls+1;
}

void declencheGachette()
{
gachette = LOW;
}






void setup(){
initialisationMoteur();
Serial.begin(9600);
attachInterrupt(digitalPinToInterrupt(5),declencheGachette,FALLING);
timeRef=millis();
}

void loop(){
demarrageMoteur();
Serial.println("test");
}
(3-3/3)