doc: strip component; instead use repo to document alone
This commit is contained in:
parent
ae75a96c40
commit
074e447046
@ -1,3 +1,6 @@
|
|||||||
# [WIP] ESPHome component for the KP18{2,4} series of programmable loads
|
# [WIP] ESPHome component for the KP18{2,4} series of programmable loads
|
||||||
|
|
||||||
Designed to expose attributes of these programmable loads to ESPHome.
|
Designed to expose attributes of these programmable loads to ESPHome.
|
||||||
|
|
||||||
|
## [WIP] Using the `modbus_controller` component
|
||||||
|
https://esphome.io/components/modbus_controller.html#example-client
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
|
|
||||||
namespace esphome {
|
|
||||||
namespace kp18x {
|
|
||||||
|
|
||||||
class kp18x: public serial_port
|
|
||||||
|
|
||||||
public void write_register(register register, uint value)
|
|
||||||
{
|
|
||||||
byte[] message = new byte[11 + 2];
|
|
||||||
message[6] = sizeof(uint); //4
|
|
||||||
message[7] = (byte)(value >> 24);
|
|
||||||
message[8] = (byte)(value >> 16);
|
|
||||||
message[9] = (byte)(value >> 8);
|
|
||||||
message[10] = (byte)(value >> 0);
|
|
||||||
send_message(command.write_single, (ushort)register, 1, ref message);
|
|
||||||
delay();
|
|
||||||
get_response(9);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user