Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

I2C LCD display with bug to print the LDR value???

2 posters

Go down  Message [Page 1 of 1]

Maiza

Maiza

I am simulating the values in an LDR to be presented on the LCD Display. I used Serial Monitor for the Debugger. It turns out that on the serial monitor, the real value is correct, but on the LCD, it is adding an extra character, "2", which in this case, the LDR value on the serial monitor, does not have. I checked the code, it's correct too. Is it a bug? Below is the simulation. Sometimes it goes back to normal and crashes again.

I2C LCD display with bug to print the LDR value??? Simuli17

https://maizavitoria.com.br

Defran

Defran

We are not magicians to know what is happening to you, without having your program and your scheme, I suspect that "2" is from a previous data that has not been deleted, but the best thing is that you add the program here in a zip and the diagram, it is also useful to know the operating system and the version of simulide.

Do this whenever you make a query. please.

Defran

Defran

If we do not have these diagrams, you force us to create the diagram in some way and write the program based on your graph.

The graphics you send here must have a maximum of 688 pixels horizontally so that they fit completely on the screen.

When you want to share your work in another simulide, all the subcircuits you use must be included in the "data" directory. Look at any of my examples in the "Made in Simulide" section for inspiration.

Defran

Defran

For this particular case try this:

lcd.setCursor(0,1);
lcd.print("......"); // delete the previous value (5 spaces, minimum).
lcd.print(value);

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum