File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
lua_script_examples/echo-serial Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 3636#if COMMUNICATION_PROTOCOL == SOCKET_SERIAL
3737#include " ../modules/serial2socket/serial2socket.h"
3838#endif // COMMUNICATION_PROTOCOL ==SOCKET_SERIAL
39- #if defined(WIFI_FEATURE) || defined(ETH_FEATURE)
39+ #if defined(WIFI_FEATURE) || defined(ETH_FEATURE) || defined(BLUETOOTH_FEATURE)
4040#include " ../modules/network/netconfig.h"
4141#endif // WIFI_FEATURE || ETH FEATURE
4242#if defined(FILESYSTEM_FEATURE)
Original file line number Diff line number Diff line change 2222#define _VERSION_ESP3D_H
2323
2424// version and sources location
25- #define FW_VERSION "3.0.0.7b1 "
25+ #define FW_VERSION "3.0.0.8b1 "
2626#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
2727
2828#endif //_VERSION_ESP3D_H
Original file line number Diff line number Diff line change 1+ --[[
2+ Echo Serial
3+
4+ This example echo serial outout to serial with echo: header
5+ Put this script in the ESP3D flash file system and call it from the init script in
6+ configuration.h.
7+ #define ESP_AUTOSTART_SCRIPT "[ESP300]/FS/detectpush.lua"
8+
9+ Be sure to have the following line comment out in the configure.h:
10+ #define ESP_LUA_INTERPRETER_FEATURE
11+ ]] --
12+
13+ -- Setup
14+ local availableMsg = 0
15+ local message = " "
16+ while (true ) do
17+ -- check if have data
18+ availableMsg = available ()
19+ -- if any message
20+ if (availableMsg > 0 ) then
21+ message = " echo:" .. readData ()
22+ print (message )
23+ end
24+ -- yield to other tasks
25+ yield ()
26+ end
You can’t perform that action at this time.
0 commit comments