diff --git a/data/conf/c021.txt b/data/conf/c021.txt index e69de29b..615742f3 100644 --- a/data/conf/c021.txt +++ b/data/conf/c021.txt @@ -0,0 +1,7 @@ +serialBegin 9600 12 13 +button 1 na Управляется#из#arduino Serial 0 1 +button 2 na Отправить#в#arduino Serial 0 2 +text 1 Текст#из#arduino Serial 3 + +//12 13 это пины uart к которым вы можете подключить arduino. Скетч для arduino выложен в группу. +//команда serialWrite ard-on отправит в arduino текст ard-on \ No newline at end of file diff --git a/data/conf/s021.txt b/data/conf/s021.txt index e69de29b..9ae72453 100644 --- a/data/conf/s021.txt +++ b/data/conf/s021.txt @@ -0,0 +1,6 @@ +button2 = 1 +serialWrite ard-11-1 +end +button2 = 0 +serialWrite ard-11-0 +end \ No newline at end of file diff --git a/data/config.json b/data/config.json index 6114577a..3cae98c6 100644 --- a/data/config.json +++ b/data/config.json @@ -3,15 +3,15 @@ "chipID": "", "apssid": "IoTmanager", "appass": "", - "routerssid": "HomeNet", - "routerpass": "#19821111_", + "routerssid": "rise", + "routerpass": "hostel3333", "timezone": 2, "ntp": "pool.ntp.org", - "mqttServer": "192.168.1.30", + "mqttServer": "91.204.228.124", "mqttPort": 1883, - "mqttPrefix": "/iot", - "mqttUser": "devices", - "mqttPass": "devices", + "mqttPrefix": "/iotTeam", + "mqttUser": "test", + "mqttPass": "test", "scen": "1", "pushingboxid": "v7C133E426B0C69E", "weblogin": "admin", diff --git a/src/Cmd.cpp b/src/Cmd.cpp index 5d3789e9..e770ba01 100644 --- a/src/Cmd.cpp +++ b/src/Cmd.cpp @@ -71,6 +71,7 @@ void CMD_init() { #ifdef SERIAL_ENABLED sCmd.addCommand("serialBegin", serialBegin); sCmd.addCommand("serialWrite", serialWrite); + sCmd.addCommand("getData", getData); #endif #ifdef LOGGING_ENABLED @@ -99,7 +100,7 @@ void CMD_init() { sCmd.addCommand("firmwareUpdate", firmwareUpdate); sCmd.addCommand("firmwareVersion", firmwareVersion); - sCmd.addCommand("getData", getData); + handle_time_init(); }