Lcd Display For Ezb4 - Using Arduino Mini As Controler

Luis Vazquez

USA

Hello again,

I have created an LCD Display for the EZB4.

This is a very cheep and easy project.

You will need

1 LCD display ( my code is set up for 2 line 16 char display) here are 5 of them for about 10 bucks USD

1 Arduino ( any model will work but i recomend the Pro MINI)
Here is a listing of them on ebay

Oh here is the wiring . again I am using the pro mini . this is showing and UNO board. the pin outs are the same.

User-inserted image

To wire your LCD screen to your Arduino, connect the following pins: LCD RS pin to digital pin 12 LCD Enable pin to digital pin 11 LCD D4 pin to digital pin 5 LCD D5 pin to digital pin 4 LCD D6 pin to digital pin 3 LCD D7 pin to digital pin 2 Additionally, wire a 10K pot to +5V and GND, with it's wiper (output) to LCD screens VO pin (pin3).

User-inserted image

Arduino code:


// LCD and Arduino to EZB4
// Project Created by Luis A. Vazquez
// www.dragontear.com

#include <LiquidCrystal.h>
String content = "";
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.setCursor(0,0);
  lcd.print("EZB4 LCD Display");
  lcd.setCursor(0,1);
  lcd.print("By DragonTear");
}
void loop() {
  readSignalFromComp();
}

void readSignalFromComp() {
  if (Serial.available()) {
  delay(100);
  while (Serial.available() > 0) {
  int temp = Serial.read();

   
  Serial.print("Debug:");
  Serial.println(temp);  

  if (temp == 17){lcd.clear();}
      
  if (temp == 18){lcd.setCursor(0,0);}
      
  if (temp == 19){lcd.setCursor(0,1);}
    
  if (temp > 31){  lcd.write(temp);   }
    
    }
  }
}


EZ-Builder Script


UartInit(0,2,9600)
UARTWrite(0,2,17, 18, "Hello From" , 19 , "EZ-Builder")

The control codes are:

17 - to clear the screen 18 - Move cursor to line 1 19 - Move cursor to line 2

I hope this was complete and self explanitory, but if not please ask , I am willing to help.

By — Last update

ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

#9  

oh @Richard R , I did not take your first comment in a negative way.. heheh

#10  

Luis you are a big help! I've got lots of Arduino C++ code and was disappointed that I could not use it with the EZ-B. I followed your instructions and succeeded in getting to EZ-B talking to and listening to the Arduino via serial didn't realize it was that easy. There is so much sensor code out there for Arduino it's just not practical trying to recode using EZ-Script. This forum post is huge!

#11  

Thanks @leversofpower.

Im thinking about putting together a weekly video pod case. Focusing on the ezb4 but also how to hack and reuse other tech with the ezb and robotic in general.

#12  

That's a great idea. If you need any help please feel free to let me know.

#13  

Thanks for sharing this Luis:) Im working on a project that was primarily Arduino based until i stumbled onto the EZB4. The Arduino will still play a major role in the overall project, but not the Main robot operation, since that has been handed over to the EZB4. But Ive been wondering how to integrate the Arduino into the system as a backup/fail-safe, in the event that the PC/EZB drops out, such as loss of signal, and still maintain some basic functionality.

#14  

@Luis Vazquez, This is great info and yet so simple. Thanks for this thread.

#15  

Again Dana I would love to help. The forums here are a bit hard to follow for information like this. I looked at your issue in another post. I hope it helps

#16  

Hi, Luis, can you tell me how you connect your arduino to the UART port of the EZB4, thanks a lot.