Wiki source code of node_red usage example
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = Example of usage of UDP = | ||
2 | |||
3 | = Take NBSN95 mod1 as an example = | ||
4 | |||
5 | == After logging into the interface click '+' to create a flow == | ||
6 | |||
7 | [[image:image-20220519133634-1.png]] | ||
8 | |||
9 | == Rename the stream == | ||
10 | |||
11 | [[image:image-20220519134042-2.png]] | ||
12 | |||
13 | [[image:image-20220519134318-3.png]] | ||
14 | |||
15 | [[image:image-20220519134346-4.png]] | ||
16 | |||
17 | == Drag UDP in to the arrow area == | ||
18 | |||
19 | [[image:image-20220519134533-5.png]] | ||
20 | |||
21 | == Drag the function and debug to the blank area in the same way as above == | ||
22 | |||
23 | [[image:image-20220519134850-6.png]] | ||
24 | |||
25 | == configure UDP in == | ||
26 | |||
27 | |||
28 | [[image:image-20220519135402-7.png]] | ||
29 | |||
30 | Write to the UDP port that the device node sends to the server | ||
31 | |||
32 | Example My UDP device node sends to server port 8585 | ||
33 | just write 8585 | ||
34 | |||
35 | Note that the port that is already in use cannot be used. If the receiving fails, you need to check whether the port of the server is occupied. The sending port of the device node should not use the default port used by the server, such as a common port such as 8080. | ||
36 | |||
37 | In order to avoid data confusion, different types of nodes do not use the same UDP port, because different nodes have different data formats and different functions. | ||
38 | |||
39 | [[image:image-20220519135915-8.png]] | ||
40 | |||
41 | [[image:image-20220519144651-14.png]] | ||
42 | |||
43 | [[image:image-20220519141355-11.png]] | ||
44 | |||
45 | [[image:image-20220519141704-12.png]] | ||
46 | |||
47 | == About function == | ||
48 | |||
49 | If you are familiar with JS code, you can write it yourself | ||
50 | If you are not familiar, we have the JS code for each type of node, you just need to copy and paste it into it | ||
51 | |||
52 | [[image:image-20220519141833-13.png]] | ||
53 | |||
54 | |||
55 | [[image:image-20220519150455-15.png]] |