Open zeljkoc opened 7 years ago
Hello @zeljkoc, I'd really like to add the functionality to the PascalIO. But I can't figure out, which types of LCD displays the class can be used for or what the counting in the button class is good for. Could you please add some lines of documentation? Regards Simon
Exampl counting in the button: var btCount: TButtonGpioLinuxPin; Count: Longint; begin btCount := TButtonGpioLinuxPin.Create(1); btCount.Direction := gdIn; btCount.InterruptMode:=[gimRising, gimFalling]; repeat count := btCount.PressCount; if (count > 0) and (count <= 4) then begin //Increment end else if (count > 10) then begin //decrement end;
until false;
end;
Example LCD var lcd: TLCD;
begin lcd:= TLCD.Create($3F, 0); lcd.init;
lcd.Clear; lcd.WriteString('Hello', 1); //row 1 lcd.WriteString( 'World' , 2); //row 2
end. // picture Display http://www.ebay.com/itm/Arduino-IIC-I2C-TWI-162-1602-16X2-Serial-Blue-LCD-Module-Display-Screen-/190573003243
I added two units. lcddriver.pas LCD Display 2 x 16 - I2c GpioButons.pas GPIO input keyboard, Measure how long a button is pressed Press and LongPress
Test to Orange pi zero
https://github.com/zeljkoc/pascalio/tree/zeljus/src