procedure TForm1.FormCreate(Sender: TObject);
begin
Switch:= TGpioLinuxPin.Create(4);
LED.Direction:= gdIn;
Led:= TGpioLinuxPin.Create(18);
Led.Direction:= gdOut;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Led.Value:= true;
Shape1.brush.color:= clLime;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Led.Value:= false;
Shape1.Brush.Color:= clWhite;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
// if Switch.Value = true then Shape2.brush.color:= clRed
// else Shape2.Brush.Color:= clBlue;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
Led.Free;
Switch.Free;
end;
end.