How to use Bluetooth function with making custom node?

Hi! I'm making custom node

I'm trying to make custom node with Bluetooth technology.
However, I don't know how to use BLE things. I have no idea.
In other case like Ionic app framework or etc, we usually use
library but i don't know how to use in node-red.
Anyone helps?

Here is my .js code

module.exports = function(RED) {
    function LowerCaseNode(config) {
        var node = this;
        var test;
        var weight1;
        node.on('input', function(msg) {
            weight1 = document.getElementById('node-input-weight1');
            test = weight1.innterText;

Thanks for reading. Regards.

A node is simply a node.js module that is required by Node-RED when it starts. It has specific requirements of course but if you want to use a third-party library with your node, you do that the same as you would with any other node.js app.

Then you have jumped into a very deep and cold lake. Bluetooth is extremely complex and hard to get right. Libraries will help but you need a good understanding of how BT works.

Tnx for replying. I mean I alr made other BLE application but
i don't know how to use in node-red custom node.
I used to use library for BLE before but i can't find any library in node-red.
Do u have any idea? Tnx

There are some bluetooth nodes for Node-RED, check out the "flows" site to search for them. Noting that they don't always seem very reliable going by various threads in the forum over the years. But you may be lucky.

You can also use node.js packages with function nodes as well with newer versions of Node-RED.

As always, details are in the documentation.

Tnx for replying again. I'll try it

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.