July 2018
Beginner to intermediate
668 pages
16h 29m
English
When you click on blinkSwitch, one of two commands is sent to Arduino: BLINK_ON or BLINK_OFF, depending on the status of the switch. The fundamental part, the Delphi side, resides in the following function (this allows you to send the command):
procedure TMainForm.blinkSwitchClick(Sender: TObject);begin case blinkSwitch.State of tssOff: ComPort1.WriteStr('BLINK_OFF'); tssOn: ComPort1.WriteStr('BLINK_ON'); end;end;
The preceding code is used for the WriteStr function of TComPort to send the command to Arduino.
Regarding the Arduino Sketch (point 9 of How to do it...), it is appropriate to say a few words:
Read now
Unlock full access