Go Down

Topic: Connecting Arduino Leonardo to uOLED G1-160 (Read 1 time) previous topic - next topic


Is it possible to connect the two solely with jumper cables? I'm connecting 5V, TX, RX, GND, and RES, but have not successfully printed anything to the display. My search for answers led me to a PDF entitled Interfacing a 4D display to Arduino , put out by 4D. (http://www.4dsystems.com.au/appnotes.php) I followed the steps through importing the correct library. This is my code, as suggested by the aforementioned PDF:

#include <Goldelox_Const4D.h>
#include <Goldelox_Const4DSerial.h>
#include <Goldelox_Serial_4DLib.h>
#include <Goldelox_Types4D.h>

#define DisplaySerial Serial         // define display serial port0
       // include 4D Systems library for Arduino
Goldelox_Serial_4DLib Display(&DisplaySerial);      // declare this serial port
void setup(void)
delay(2000);       // Allow time for the display to initialize before communicating
DisplaySerial.begin(9600) ;      // initialize serial port and set Baud Rate to 9,600
Display.gfx_Cls() ;       // clear display
// Below this comment is the first string to be serially sent to the display.
Display.putstr("Hello World\n\n") ;        // send "Hello World" string to display
// Below this comment is the second string to be serially sent to the display. Note the double spacing
// to provide clarity in the presentation.
Display.putstr("Serial Display test\n\n\n") ;      //send second string to display
// Below this comment is the third string to be serially sent to the display. Again for clarity
// in presentation, triple spacing has been placed and used. Furthermore, this text
// string introduces to the user some font and text-formatting capabilities available. There are seven(7)
// statements before the Display.putstr statement which instructs the Arduino to do this. You can
// edit the text string to show the display model you have. Autodetecting the display model is
//  not covered by this application note.
Display.txt_Attributes(BOLD + INVERSE + ITALIC + UNDERLINED) ;     // change and set new text format
Display.txt_Xgap(3) ;
Display.txt_Ygap(3) ;
Display.txt_BGcolour(RED) ;
Display.txt_FGcolour(WHITE) ;

Display.txt_MoveCursor(5, 0) ;          // use this cursor position
Display.putstr("uLCD-32PTU SPE + Arduino\n") ;         //send third string to display
void loop(void)
// do nothing here
Thanks in advance!

Go Up