hello arduino forum
i complete noob arduino. want print data serial monitor lcd.
i have 16x2 lcd (gleichmann ge-c1602b-tmi-jt/r). using arduino due. here code , wiring.
i complete noob arduino. want print data serial monitor lcd.
i have 16x2 lcd (gleichmann ge-c1602b-tmi-jt/r). using arduino due. here code , wiring.
code: [select]
int fanpulse = 0;
unsigned long pulseduration;
void setup()
{
int pwmpin = 9;
serial.begin(9600);
pinmode(fanpulse, input);
digitalwrite(fanpulse,high);
}
void readpulse() {
pulseduration = pulsein(fanpulse, low);
double frequency = 1000000/pulseduration;
serial.print("pulse duration:");
serial.println(pulseduration);
serial.print("time full rev. (microsec.):");
serial.println(pulseduration*2);
serial.print("freq. (hz):");
serial.println(frequency/2);
serial.print("rpm:");
serial.println(frequency/2*60);
}
void loop()
{
analogwrite(3,20);
delay(5000);
readpulse();
analogwrite(3,50);
delay(5000);
readpulse();
analogwrite(3,100);
delay(5000);
readpulse();
analogwrite(3,200);
delay(5000);
readpulse();
analogwrite(3,255);
delay(5000);
readpulse();
}
use lcd.print instead of serial.print.
Arduino Forum > Using Arduino > Displays > Print serial monitor on lcd
arduino
Comments
Post a Comment