I have two sensors, DHT11 and SW-420, I want them to display readings simultaneously or one after another. I have an LCD, I want the DHT11 sensor to display it's readings first, fade out and then display the vibration amplitude on the same 16x2 LCD. How is that possible?
Yah, you put both parts in the same loop and use a variable to control which part runs at any time.
---- untested pseudocode to show logic only
byte state = 0;
void setup()
{
----- whatever
}
void loop()
{
if ( state == 0 )
{
-------- first task
if ( task is done )
{
state = 1;
}
}
if ( state == 1 )
{
-------- second task
if ( task is done )
{
state = 0;
}
}
}
[code]
A led can be faded and a 1602 can do the same, both are magnitudes faster than the human eye.
When making a project with possibly fast changing data like a speedometer, one of the pains is only showing 4 or 5 different values per second to keep the LCD from blurring.
GoForSmoke:
A led can be faded and a 1602 can do the same, both are magnitudes faster than the human eye.
Technically - sure, it will be possible.
Practically - I don't think the 1602 (or its control IC) has the functionality to do this, and a quick Google search doesn't show anything useful either.
I've had all kinds of unwanted effects on the display indeed Never quite got to something that I would call fading, it was mostly flicker.
This kind of timing may work when connected over the parallel interface. Gonna be tricky to pull off with an I2C port extender, which I always use with these displays.