Пока не рабоатет

This commit is contained in:
2025-08-28 20:59:31 +03:00
commit 2317b904ba
9 changed files with 2273 additions and 0 deletions

23
Arduino_Modbus.ino Normal file
View File

@@ -0,0 +1,23 @@
#include "rs_message.h"
void setup() {
// put your setup code here, to run once:
// Пример: RX=16, TX=17, скорость 115200
rs_huart.begin(115200, SERIAL_8N1, 8, 9);
rs_huart.println("start1");
MODBUS_FirstInit();
Serial.begin(115200); // для отладки
Serial.println("start");
}
void loop() {
// put your main code here, to run repeatedly:
RS_UART_Handler(&hmodbus1); // нужно вызывать периодически
RS_TIM_Handler(&hmodbus1); // проверка таймаута
//delay(500);
//Serial.println("start");
//rs_huart.println("start1");
}