Page 2 of 3

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Fri Oct 29, 2021 6:05 pm
by medelec35
oadramos wrote:
Fri Oct 29, 2021 6:01 pm
fixed it now. i was trying both addresses that "as suggested" previously....then saved at wrong place. see attached please.
Yes that looks correct.
Can you see correct chars on your display now?

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Fri Oct 29, 2021 6:09 pm
by oadramos
No Sorry i cant.

if i open arduino IDE now and program it, it then shows me "Hello World"

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Fri Oct 29, 2021 6:26 pm
by medelec35
oadramos wrote:
Fri Oct 29, 2021 6:09 pm
if i open arduino IDE now and program it, it then shows me "Hello World"
That is excellant news.
Thanks for letting us know.

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Fri Oct 29, 2021 6:46 pm
by oadramos
medelec35 wrote:
Fri Oct 29, 2021 6:26 pm
oadramos wrote:
Fri Oct 29, 2021 6:09 pm
if i open arduino IDE now and program it, it then shows me "Hello World"
That is excellant news.
Thanks for letting us know.
I'm very sorry, i didnt mean it that way. My dad has been bragging about flow code since flowcode probably 1.0

I decided i have sometime and wanted to try it out... I'm sure its just something im doing silly.

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Fri Oct 29, 2021 6:59 pm
by oadramos
Does this look right?



Title:
Description:
Device: ARD.ATMEGA.ATMEGA328P
Generated by: Flowcode v9.2.0.33
Date: Friday, October 29, 2021 19:56:46
Users: 1
Registered to:
Licence key:
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Compilation is up-to-date
Linking is up-to-date
Using FCD settings for programmer
Launching the programmer...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avrc_arduinoA.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" m328p arduino COM3 115200 "D:\Dropbox\Oliver Work 2020\FlowCode\Flowcode2.hex"



D:\Dropbox\Oliver Work 2020\FlowCode>REM REVISION: 1.0

D:\Dropbox\Oliver Work 2020\FlowCode>REM GUID: BC89C337-8FBB-43B7-A3A7-C7902C121931

D:\Dropbox\Oliver Work 2020\FlowCode>REM DATE: 29\03\2021

D:\Dropbox\Oliver Work 2020\FlowCode>REM DIR: FCD\AVR\batchfiles\avrc_arduinoA.bat

D:\Dropbox\Oliver Work 2020\FlowCode>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avrdude.exe" -pm328p -PCOM3 -b115200 -carduino -D -Uflash:w:"Flowcode2.hex"

avrdude.exe: AVR device initialized and ready to accept instructions

Reading |
################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e950f
avrdude.exe: reading input file "Flowcode2.hex"
avrdude.exe: input file Flowcode2.hex auto detected as Intel Hex
avrdude.exe: writing flash (1150 bytes):

Writing | ################################################## | 100% 0.18s

avrdude.exe: 1150 bytes of flash written
avrdude.exe: verifying flash memory against Flowcode2.hex:
avrdude.exe: load data flash data from input file Flowcode2.hex:
avrdude.exe: input file Flowcode2.hex auto detected as Intel Hex
avrdude.exe: input file Flowcode2.hex contains 1150 bytes
avrdude.exe: reading on-chip flash data:

Reading |
################################################## | 100% 0.14s

avrdude.exe: verifying ...
avrdude.exe: 1150 bytes of flash verified

avrdude.exe done. Thank you.


Programming successful!


FINISHED

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Fri Oct 29, 2021 7:20 pm
by oadramos
I have now swopped out the arduino boards and changed the wires. And still....
photo_2021-10-29_20-13-34.jpg
photo_2021-10-29_20-13-34.jpg (134.18 KiB) Viewed 6271 times
photo_2021-10-29_20-13-24.jpg
photo_2021-10-29_20-13-24.jpg (86.65 KiB) Viewed 6271 times

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Fri Oct 29, 2021 8:32 pm
by medelec35
If the wording is wrong after recompiling then the hardware has not been updated with the correct flwochart.
If the address is wrong then there will be a row of squares as the LCD has not ben correctly initilised.
As a sanity check, you can can confim the address is correct by using my I2C sniffer.

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Sat Oct 30, 2021 6:56 am
by oadramos
medelec35 wrote:
Fri Oct 29, 2021 8:32 pm
If the wording is wrong after recompiling then the hardware has not been updated with the correct flwochart.
If the address is wrong then there will be a row of squares as the LCD has not ben correctly initilised.
As a sanity check, you can can confim the address is correct by using my I2C sniffer.
This looks bad???
sniffe.PNG
sniffe.PNG (5.42 KiB) Viewed 6257 times

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Sat Oct 30, 2021 9:15 am
by oadramos
I even tried another LCM1602 Board and sniffed the same result.
another i2c board.jpg
another i2c board.jpg (75.04 KiB) Viewed 6255 times

Re: Arduino + 16 x 2 LCD + LCM1602 I2C Adaptor

Posted: Sat Oct 30, 2021 9:34 am
by oadramos
Just in case it helps...

My Arduino IDE code sketch that is working on current setup... Maybe it can help?

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

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

void setup()
{
// initialize the LCD
lcd.begin();

// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello, world!");
}

void loop()
{
// Do nothing here...
}