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

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

#2  

@Zap, nope. It's not SDK stuff, he is using that inside ARC.

#3  

@Zap... Just basic arduino code for an LCD... HippieGeek is showing how to use it with the V4...

You write the arduino code on the Windows Arduino IDE and then download it to the arduino controller. Then connect it to the UART port of the V4.... Old School stuff

I still use the arduino once in a while, but not too often now that EZ Robot came into my life....:)

#4  

Sorry, I have never used arduino. Of course, I have never used ARC either. When I started looking for a robot platform I decided EZB was going to be the way to go for me. I can look at code and figure out what it is doing for the most part, but sitting down and banging out code such as that has a little too high of a learning curve for me at this stage in my life :)

United Kingdom
#5  

Nice work, saves getting an LCD with serial/i"c backpack (however is it cheaper?)

#6  

this solution is about $6.00 and some time soldering. Pretty cool. Thanks for sharing.

#7  

Thanks guys.

Yes this is very basic stuff. but I see a lot of folks on here are not aware of what you can do. Also when i got into robotics the first thing i found was developers and engineers were putting the complete load of running a robot on a single controller when controllers were expensive that made sense , but controllers are cheep now so our components should start becoming smarter and almost robots in their selves.

This is my core goal , to created a robot that has thinking parts.

Like a part called a Knee. the chip in the Knee will limit the max min on the server based on the hardware design. then when the robot controller tells the knee to move to 45 degrees , the knee will have logic in it that knows its capability and will refuse to go into a position that could damage it self, another object or a person or other living thing. because the programmer did not under stand the limitations of that hardware item.

Its very difficult to explain my architecture for robotic design in a forum like this. but I am working on a website to further explain my opensource Robotic Framework Ideas.

#8  

Hey, I didn't say it wasn't good... which it is... I have a few projects in mind myself that will probably use arduinos as a low level controller... Arduinos are still a really good tool for robotics....