Property Sequence : TStringList read FSequence write FSequence Property LedCount : integer read FLedCount write FLedCount Property Count : integer read FCount write FCount TLedSequence = classįSequence : TStringList //List of sequences In this all GPIO pins are packed inside a list. My solution in Lazarus is based on my own class TLedSequence. test_led A running lightįor my mediaplayer I wanted to control 7 single LEDs and a multi-LED (3-color LED) with a changeable sequence. You can find the link for a download to it at the end of the article. Procedure TForm1.FormDestroy(Sender: TObject) įor a test, you must call the program generated with sudo. Procedure TForm1.Button2Click(Sender: TObject) Procedure TForm1.Button1Click(Sender: TObject) Led:=TGpioLinuxPin.Create(18) //use GPIO18 Led.Direction:=gdOut //declare as output Procedure TForm1.FormCreate(Sender: TObject) It is boolean.Ĭlasses, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, To turn the pin on or off use the property value.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |