Delphi & Arduino - MySensors
Biblioteca de component Delphi que implementa o protocolo MySensors.org
- instalar a biblioteca no Delphi;
- Componentes
// cria infraestrutura para troca de informações com o Gateway TMySensors = class(TComponent) private public function Ativar: Boolean; procedure Desativar; published property Ativo: Boolean read GetAtivo; property Gateway: TMySensorsGatewayClass read FGateway write SetGateway; property Modelo: TMySensorsGateway read FModelo write SetModelo; end;
// Gateway Serial TMySensorSerialGateway = class(TMySensorsGatewayClass) private public function GetModelo: TMySensorsGateway; override; published property Porta; property PortaConfig; property TimeOut: integer read FTimeOut write SetTimeOut; property Intervalo: integer read FIntervalo write SetIntervalo; end;
-
Criar: a) TMySensors b) TMySensorSerialGateway - Ligar o Gateway com o TMySensors - Configurar a porta serial
-
ao iniciar a aplicar -> MySensors1.Ativar;
Dependências: ACBrSerial