Exemplo n.º 1
0
Arquivo: LCD.php Projeto: iqb/gpio
 /**
  * Enable all pins and make the display usable
  */
 public function initialize()
 {
     $this->pinRS->enable()->setDirection('out');
     $this->pinE->enable()->setDirection('out');
     $this->pinD4->enable()->setDirection('out');
     $this->pinD5->enable()->setDirection('out');
     $this->pinD6->enable()->setDirection('out');
     $this->pinD7->enable()->setDirection('out');
     $this->writeByte(0x33, true);
     // 110011 Initialise
     $this->writeByte(0x32, true);
     // 110010 Initialise
     $this->entryMode(true, false);
     $this->displayOnOffControl(true, false, false);
     $this->functionSet(false, true, false);
     $this->clearDisplay();
     usleep($this->delay);
 }