KMtronic LTD
- Fully assembled and tested.
- Each relay has an LED to indicate when it is operated.
- Relay outputs can be used to turn ON/OFF lights, motors and other devices.
Relays have Normally Open (NO) and
Normally Closed (NC) Contacts each capable of switching max:
- 12VDC/15A
- 24VDC/15A
- 125VAC/15A
- 250VAC/10A
Requires external 12 volt DC / 1000mA power supply
8 Data, 1 Stop, No Parity
Baud rate : 9600
FIRST channel commands:
OFF command : FF 01 00 (HEX) or 255 1 0 (DEC)
ON command : FF 01 01 (HEX) or 255 1 1 (DEC)
SECOND channel commands:
OFF command : FF 02 00 (HEX) or 255 2 0 (DEC)
ON command : FF 02 01 (HEX) or 255 2 1 (DEC)
...
...
EIGHT channel commands:
OFF command : FF 08 00 (HEX) or 255 8 0 (DEC)
ON command : FF 08 01 (HEX) or 255 8 1 (DEC)
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup()
{
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
}
void loop() // run over and over
{
for(uint8_t i=1; i < 9; i++ ){
KMtronic_Relay_ON(i);
delay(50);
}
for(uint8_t i=1; i < 9; i++ ){
KMtronic_Relay_OFF(i);
delay(50);
}
KMtronic_Relay_ON(1);
delay(500);
KMtronic_Relay_OFF(1);
delay(500);
KMtronic_Relay_ON(8);
delay(500);
KMtronic_Relay_OFF(8);
delay(500);
}
void KMtronic_Relay_ON(uint8_t number)
{
mySerial.write((uint8_t)0xFF);
mySerial.write((uint8_t)number);
mySerial.write((uint8_t)0x01);
}
void KMtronic_Relay_OFF(uint8_t number)
{
mySerial.write((uint8_t)0xFF);
mySerial.write((uint8_t)number);
mySerial.write((uint8_t)0x00);
}
htm1