-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blockly Networking #55
Comments
Can you explain a bit more? Might be better to open a discussion on the Node-RED forum? |
Hi Martin, |
In the best cases, I want to establish the topology of the sensor network. I noticed that different software that use blocky has different libraries. For example, in PKA there are the following libraries (photo 1) In Node-red there are the following (photo 2) Robot Mesh has libraries for easier robot control. In micro: bit libraries are the following: So my question is - is it possible to add more libraries to Blockly to help me for easier network configurations? |
This node is developed as an alternative for the Function-node, for users that are not familiar with Javascript or programming in general. So we have added some basic blocks that allow users to implement some custom basic logic, which they cannot find in other blocks. |
Do you know any software (except maybe micro: bit), that use blockly, that have embedded that kind of networking library? |
For the blockly question perhaps @cymplecy can give any advise. I don't use blockly outside of Node-RED. About the Zigbee question: I have no idea. You should ask such questions on the Node-RED Discourse forum instead of here... |
That option has become accidentally available, because the core of the Blockly-node is a copy of the Function-node: indeed once the Blockly-node has generated Javascript code, it has to behave exactly the same as the Function-node. Seems I should have not copied that part of the Function-node code... I have never used Function-node libraries myself, but when I read this article, I see this: I some next release I should remove that from the Blockly node, because it would never work:
I assume you want to bamboozle the Blockly node to get your recent feature request implemented? You want to create a library of Javascript code snippets and then load that into the Blockly node. Am I correct or not? But it doesn't work like that. In Blockly every block can generate a very small code snippet of Javascript. And when you combine a lot of such blocks together, an entire Javascript program will be generated. Which is a fairly simple concept (in theory...). However there is no way to do the reverse: you cannot generate Blockly blocks from a Javascript program, since that is much more difficult. Indeed you would have to support the entire Javascript ECMA specification, and keep it updated at each new version of that specification. See here the response of the Blockly team to that question: Very short discussion. If you get the point ... P.S. you might find attempts (like JS2Blockly but that is incomplete and unmaintained. I cannot add such a feature to the Blockly-node, since it will give more questions than answers to the users. Moreover all the blocks that I have implemented myself (e.g. to support the Node-RED API) can never be regenerated by that library. Summarized: unfortunately impossible. |
Actually i wanted to add some additional commands, like mechanical or radio commands (like in Robot Mesh or Micro Bit software's) |
Where or how do you want to add what? |
Unfortunately, you've misunderstood how Blockly is used inside Node-RED1.
It is only used to save having to write JavaScript inside a function node.
It is never going to do what you seen to be after.
You can use it to create a node that could communicate across a network but
Bart isn't going to add extra blocks to do this.
It's up to us to use the blocks he provides to try and achieve our
programming goals
…On Sat, 31 Oct 2020, 14:15 martin9115, ***@***.***> wrote:
Actually i wanted to add some additional commands, like mechanical or
radio commands (like in Robot Mesh or Micro Bit software's)
Is it possible?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR7RNDHRQYDVKXNV2ANVATSNQLXRANCNFSM4SHD47ZA>
.
|
I was looking for radio commands to input in Bockly. How can i understand what library originally have in the function nodes, like in Python, Java, etc? P.S. I just wanted to explore the all options |
@martin9115: To be very honest, you don't make it very easy for us. You expect us to help you in our free time, but you just give us a pdf of 51 pages and expect us to read it and understand what you want to achieve. You could have done a bit more homework yourself. If everybody (who are using my nodes) expect this kind of (free) service, then I have to divorce and quit my daily job... Anyway, I had a (very quick) look myself at the pdf and I 'think' it works like this:
With this knowledge I also have no idea at all what you expect to do in Node-RED:
Now it is your turn to explain 'clearly' what you want to achieve! |
The links i share with you contain just a couple examples of the library used by the software, this is not some high- level literature, that consume a lot of time, but i understand you very well. And i'm grateful, that you create this node for people like me, that are not very good at programing. As for my idea, i have i couple of Xbee modules and i wanted to establish some network between them and maybe some topology (Star, Mesh), and since i'm not good in programing i wanted to try do something with visual programming. |
Hmmm, unfortunately I have never used xbee myself. If I were you I would post on the Node-RED forum a well described question. That you want to connect N xbee devices with some topology (star, mesh), and that you don't know how to get started with that. And that you aren't familiar with programming. I assume that you aren't the first one using xbee in combination with Node-RED... |
I post everywhere, but nothing for now... I found some Python library with some command for xbee control, and that is why i wonder can i add this commands in Python function node for example? |
Do you mean you have already posted it on the Node-RED forum?
I saw yesterday that they advice to use the Exec node for Python instead of the python contrib node. But I have never used python myself... You should really ask these kind of questions on the Node-RED forum!!! |
OK i will ask again in NR |
Hi, can we establish some (sensor) network topology with blockly?
The text was updated successfully, but these errors were encountered: