Train Vision Object By Script icon Train Vision Object By Script Train camera vision objects via controlcommand(), attach camera, start learning, monitor progress, and return object name for scripts. Try it →
Asked — Edited

DJ, I am out of Digital Ports and I want to use a LCD Display. Can I use a 12C port and if so do I need to purchase a special interface and how would I input the text since the only control available under 12C is blinkin and nothing that I can see in Script? I await your input.


ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

#9  

DJ, You were absolutly correct "There are problems i've found with I2C displays though. They are usually poorly documented or have strange initialization commands." I ran the code you wrote above and nothing happened. I have found the documentation but it reads like Greek to me. Any advise?

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#10  

The code I pasted was an example of how I assumed it would work, but there are two things that are missing...

  1. You'll need to know the address. the 0x0a was just a sample

  2. It might not accept merely a string of text. You might have to send it an initialization string first

#11  

Thanks for the input DJ, I found the address. It is 0x27. I tried that and all that happened was the screen turned from a lit blue (on power up) to a blank (no power). Any idea how to find out what the initialization string might be?

#12  

DJ, This is what I found. Makes no sense to me but it may to you. Can you translate?

///Arduino Sample Code ///www.DFRobot.com ///Last modified on 17th September 2010

#include #include

LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup() { lcd.init(); // initialize the lcd

// Print a message to the LCD. lcd.backlight(); //lcd.setCursor(0, 1); lcd.print("Hello, world!"); }

void loop() { // when characters arrive over the serial port... if (Serial.available()) { // wait a bit for the entire message to arrive delay(100); // clear the screen lcd.clear(); // read all the available characters while (Serial.available() > 0) { // display each character to the LCD lcd.write(Serial.read()); }

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#13  

You know, i'm entirely unsure what that mess is. I'll have to probe the Arduino library to see what they're doing. Does your LCD have a serial interface also? You can use that instead maybe.... Now that ARC supports more than one EZ-B Board:) You have lots of free I/O!

I2C is great if your hardware is documented. Doesn't look like that I2C LCD is documented very well

#14  

DJ, I found an add that has alot of documentation. Can you please take a look and see if maybe there is a solution at hand?

E Bay add

Many thanks in advance.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#15  

try


 sendI2C(0x50, 0x80, "Hello world")

also, make sure the interface is indeed I2C and not SPI. The pins should be marked as:

  • SDA
  • +5
  • GND
  • SCL
Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#16  

Ah after fustrating searches... Look at this link: Proper Datasheet

Your device address is 0x27 it seems. Now I still don't know what command is sent to write a string.. you can try this first


sendI2C(0x27, "Hello World")