
Metealp97
Turkey
Asked
— Edited
hi i am new to ez-b and whole robotics world but i would like to add a lcd screen to ez-b i have no idea how to do it can someone explain how to do it from start and how enter scripts on lcd thanks
OK, I have sorted it out. I just needed to step back, have a coffee and then have another go (see how easy it is to blame the device when it was user error?).
The commands are;
CL = Clear Screen CS0 = Turn Off Cursor CS1 = Turn On Cursor BL0 = Turn Off Backlight BL1 = Turn On Backlight TP,x,y = Position Text. Example SendSerial(D14,9600,TP,3,1) - Top left = 0,0 bottom right = 15,1 TT = Text Entry 0 = Exit modes.
Quick Example, I will work on more now;
Another example of how to make it do it's thing is;
That way saves having to write out all of the SendSerial lines.
OK, spent the best part of today playing with this display and figured it all out now.
Positioning of text is simple when you think about it (I think I may have been getting mixed up on the X and Y)
However, one thing I've noticed and I hope someone can point me in the right direction or explain it is this...
If a servo is being held and SendSerial is executed the servo will twitch. Not every time but a lot of the time. I have my test bot displaying the current ping along with the current time on the display, updated every 500ms. The sweep servo is held at 20 but twitches every second or so.
Is it the display causing this or is it a general occurrence?
found this lcd:
Lcd screen
how would you wire this up to the ez-b?
That is the same one, same auction, same everything.
Simple to wire up
Then plug it in to a digital port on the EZB
Excuse the poor quality it was taken quickly
Just make sure it comes with an LCD, that picture is of just the "backpack" (or LCD driver)
it does. thanks.
I know what im getting next.
Example Script #1 (yes there will be more)
There may be a better way to format the time & date, I haven't spent long looking in to that but the above way works. It also updates every second with a blinking . which could be changed for every minute if it is eating up the communications.
As always, easy to change for your LCD, port and baud are variables at the top of the script.
As much for reference in to doing anything than as an example for making a clock.
Edit: Minor bug fix made to hour when changing to single digit would have left the leading 1.
will the code posted before work too?
All code I post will work