Beispiel #1
0
void setup() 
{ 
  // a few options to talk to the Display, uncomment the one you want
  genieBegin (GENIE_SERIAL, 115200);  //Serial0
  //genieBegin (GENIE_SERIAL_1, 9600);  //Serial1
  //genieBegin (GENIE_SERIAL_2, 9600);  //Serial2
  //genieBegin (GENIE_SERIAL_3, 9600);  //Serial3

  genieAttachEventHandler(myGenieEventHandler);

  //Reset the Display (change D4 to D2 if you have original 4D Arduino Adaptor)
  pinMode(4, OUTPUT);  // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
  digitalWrite(4, 1);  // Reset the Display via D4
  delay(100);
  digitalWrite(4, 0);  // unReset the Display via D4
  
  delay (3500); //let the display start up

  //Turn the Display on (Contrast) - (Not needed but illustrates how)
  genieWriteContrast(1); // 1 = Display ON, 0 = Display OFF

  //Write a string to the Display
  genieWriteStr(0, GENIE_VERSION);
}
//////////////////////////////////// genieSetup /////////////////////////////////////////
//
//  Dummy interface for old library version
//
void genieSetup (uint32_t baud) {
	genieBegin (GENIE_SERIAL, baud);
}