OTP Generator using Node-RED
An OTP Generator is a very useful application in the present times. It is a part of our day to day life activities. OTP Generator is used for generating a random number between 1 and 100 both in text and in pictorial format can be used in net banking and other purposes.
Steps for creation of an OTP Generator in Node-RED:
Start the server by typing the command "node-red-v" in the command prompt and open the Node-RED software in your browser.
Insert an inject node and configure its properties as shown below. I have set the code to repeat every 3 seconds
Insert a function node and configure its properties as shown below in Figure 3.
Now select the respective node which shows the type of output you want in your NodeRed dashboard
For Eg:If you want a chart type of output, include a chart node, if you want a slider type of output, include a slider node, for the display of output in text format, include the debug node
After inserting the respective node for output display, configure the group and tab and the other properties by double-clicking the respective nodes.
Note: More than one type of output can also be displayed
In this case I have used a gauge node, a debug node, a debug node and a chart node
Now open the NodeRed dashboard by giving the following address
Observe that the output is changing every 3 seconds as I mentioned during the configuration of the inject node.
Reference:
Comments
Post a Comment