Author
Topic: Library that works fine on the NHD-0420CW-A*3 (Read 17121 times)

Chris, forgot to answer your question. Works fine. Just as written. The initial delay fooled me, compiled/loaded and it was dark then as I was typing something the display lit up. That 5 second delay got me.

See, my hangup on hacking on the OLedI2C.cpp file is the use of write, or rather Wire.write to send the binary patterns for the special fonts to the display. And of course, getting them back out. It would have been ideal (In my mind) if they'd just occupy the bottom 8 memory locations and be addressed like any other character.

Chris, forgot to answer your question. Works fine. Just as written. The initial delay fooled me, compiled/loaded and it was dark then as I was typing something the display lit up. That 5 second delay got me.

See, my hangup on hacking on the OLedI2C.cpp file is the use of write, or rather Wire.write to send the binary patterns for the special fonts to the display. And of course, getting them back out. It would have been ideal (In my mind) if they'd just occupy the bottom 8 memory locations and be addressed like any other character.

Wire.endTransmission(); // stop condition / 7) The write mode will be finished when a stop condition is applied.

delay(5000); // 5sec. delay LCD.clearLcd();}Now can you add this to OLedI2C.hvoid createChar(uint8_t, uint8_t[]); // NEW 03-23-2015 / Allows us to fill the first 8 CGRAM locations with custom characters

/*OLedI2C.hOLED 1602 Library for the I2COLED display from WIDE.HKAlso my first attempt at a LibraryPhil Grant Sept 2013www.gadjet.co.ukScrolling contributed by Nathan Chantrell http://nathan.chantrell.net/Updated 06/11/2013 to include the cursPos data within the sendString function.*/#ifndef OLedI2C_h#define OLedI2C_h#include "Arduino.h"#include "Wire.h"

// 1602-OLED-Arduino-Library/OLedI2C.cpp// keywords.txt / OLedI2C.cpp / OLedI2C.h// The 3 files should be in %your arduino dir%\libraries\OLedI2C\// The directory name must match the library name for libraries to work.

/*This is my first Library to make writing to the OLED 1602Display much easier, the display is based on the SSD1311.The display has 16 characters and 2 lines.The library is far from complete and may be prone to errors.Feedback welcome, visit www.gadjet.co.ukPhil Grant 2013Scrolling contributed by Nathan Chantrell http://nathan.chantrell.net/Updated 06/11/2013 to include the cursPos data in the sendString functionsendString("string", col, row)*/#include "OLedI2C.h"

/*This is my first Library to make writing to the OLED 1602Display much easier, the display is based on the SSD1311.The display has 16 characters and 2 lines.The library is far from complete and may be prone to errors.Feedback welcome, visit www.gadjet.co.ukPhil Grant 2013Scrolling contributed by Nathan Chantrell http://nathan.chantrell.net/

Updated 06/11/2013 to include the cursPos data in the sendString functionsendString("string", col, row)

/*This is my first Library to make writing to the OLED 1602Display much easier, the display is based on the SSD1311.The display has 16 characters and 2 lines.The library is far from complete and may be prone to errors.Feedback welcome, visit www.gadjet.co.ukPhil Grant 2013Scrolling contributed by Nathan Chantrell http://nathan.chantrell.net/Updated 06/11/2013 to include the cursPos data in the sendString functionsendString("string", col, row)*/#include "OLedI2C.h"

Thanks Chris. The first suggestions made earlier prompted me to just start fresh in a library directory. So made all those changes and now while it compiles nothing happens, and anything on display from previous helloworld stuff freezez till power cycle.