Code Monkey home page Code Monkey logo

Comments (8)

carlosperate avatar carlosperate commented on June 6, 2024

The idea was to first create it as part of the Blocklyduino BlocklyduinoFactory and then implement a version in Ardublockly that connects to the python server to locally create and modify the files required. There is also a feature in the list (if there isn't, there should have been) to automatically add blocks to the toolbox from a directory (format still needs to be designed, I've just got a general idea in my head), which would be used with this feature to have your blocks appear in the Ardublockly toolbox automatically under a new category.

BlocklyduinoFactory is basically an enhancement of the blocklyfactory to use blockls to also create the generator code. This requires some additional "generator blocks" with more freedom (like being able to type imports, and function calls, etc), and also has to have a connection between the two blockly workspaces to synchronise the new block "features" (inputs, outputs, and all that).

from ardublockly.

Immortalin avatar Immortalin commented on June 6, 2024

@carlosperate the tool still feels rather clunky. A code editor would be nice. How do you plan to update blocks.js and arduino.js?

from ardublockly.

carlosperate avatar carlosperate commented on June 6, 2024

If the user is comfortable enough to write JavaScript code in a editor to generate c code, I don't think they'll have any issues following the instructions to add custom blocks. This tool is mostly done to simplify block creation. If the code required for the new block is complicated enough that it cannot be done using blockly, then once again, the user is probably proficient enough to add custom blocks with the current methods.

How do you plan to update blocks.js and arduino.js?

Not really planning to edit those files, the new blocks and workspace synchronisation will be implemented in the files located in the root directory of https://github.com/BlocklyDuino/BlocklyDuinoFactory.

from ardublockly.

Immortalin avatar Immortalin commented on June 6, 2024

But how are you going to implement delete and update of blocks. Manually using an editor?

from ardublockly.

carlosperate avatar carlosperate commented on June 6, 2024

BlocklyduinoFactory would just offer an option to "download files", which are created the same way than the current "download sketch" and "download blocks xml" features.

Ardublockly has a python server, mean to run locally on the users machine, that will take care of receiving the data to create the local files.

Btw, these local files would mostly be two xml blockly files (one for the block definition, one for the code generator), one javascript file (to contain the js block definition and js code generator), and a JSON file to define additional data and rules. Only the XML and JSON files are read and edited by the factory, and the javascript data would get regenerated and overwritten with every save.

from ardublockly.

carlosperate avatar carlosperate commented on June 6, 2024

In retrospect my original though of making a blockly factory to generate Ardublockly blocks and generators would probably require more effort than its worth. It's not that difficult, but it's always hard to find free time and there are other user facing features that could have more impact.
So closing this as "won't implement".

from ardublockly.

Immortalin avatar Immortalin commented on June 6, 2024

@carlosperate this issue might be of interest to you

from ardublockly.

carlosperate avatar carlosperate commented on June 6, 2024

Thanks @Immortalin, I've been playing with that and similar features for a different project and while I do see a lot of potential I think I need to advance some core features of Ardublockly before start investing the time to implement something similar that could work for the C/C++ language

from ardublockly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.