Hi All.
I'm coding a program to gather the data of a flow sensor on my computer.
I have written the code for the Arduino to output from pin 2 and I get the error “unable to find numeric literal operator 'operator”"pin’
Am i doing something wrong?
Cheers,
Emile
int NbTopsFan;
int Calc;
int hallsensor = 2pin; //signal raccordé sur le pin digital 2
void rpm() //fonction vide déclenchée à chaque interruption
{
NbTopsFan++
}
void setup()
{
pinMode(hallsensor, INPUT);
Serial.begin(9600);
attachInterrupt(digitalPinToInterrupt(2pin), rpm, RISING);
}
void loop()
{
NbTopsFan = 0;
sei();
delay (1000);
cli();
Calc = (NbTopsFan * 7.5);
Serial.print (Calc, DEC);
Serial.prinln();
}