Menu

News: Another development - what is this?

Anobium
2025-06-02
2025-06-29
1 2 > >> (Page 1 of 2)
  • Anobium

    Anobium - 2025-06-02

    What is this ?

    So, what is this ?

    Does someone want to play ?

     

    Last edit: Anobium 2025-06-02
    • Roger Jönsson

      Roger Jönsson - 2025-06-07

      One thing that strikes me is the blocks nearly melting into each other making it hard to follow the logic. Visually the code more or less just continues downwards, without looping. I guess this design for good looks, but for readability (less confusing for a newbie too) a much clearer gap around individual loops would help see into it. I think.

      Why mainloopvar?

       
      • Anobium

        Anobium - 2025-06-07

        The Do-Loop implement in the latest build has a simpler construct in the latest build. A DO-LOOP is a block that makes the program repeat a task, like replaying a game level.

        The Shape of a Simple DO-LOOP Block. It’s a tall rectangle with a tab on top and a slot below:

        +------------------+
           | Do              |  <- Tab to connect above
           |  [open space]   |  <- For your actions
           | Loop            |  <- Slot to connect below
           +------------------+
        Colour: Green for "Loops".
        

        Repeats actions inside it, e.g., saying "Hi!" multiple times.
        The simplest version (do_loop_simplest) repeats forever until stopped.


        In the latest build all Blocks now have a Black line edge. Makes them a lot easier to see.


        The UI is a MIT/Google defined. I want to ensure the colors/shapes comply with the standards. I can tweak things like the Black edge via the defined CSS file.


        The mainloop var? These are development photos and the variable has no meaning.

         
        • Roger Jönsson

          Roger Jönsson - 2025-06-07

          Much better. The border is a very good workaround and the loop command at the end of the loop makes it easier to understand the code.

          I don't understand what mytimer does inserted to the right of wait in the repeats, why on the side?

          I agree it is a good idea following the standard. Still, a little less cute and a little more clarity (more linear) would have been nice, but it is probably not easy to convince MIT/Google of that.

           
          • Anobium

            Anobium - 2025-06-07

            Here is a different Block for the Wait. So, great feedback from you.

            Case #1. The left field will take any number value.

            or

            Case #2. The right field will take any variable, calc etc. Note the left field is not read-only.

            This an a much better approach.

             

            Last edit: Anobium 2025-06-07
            • Roger Jönsson

              Roger Jönsson - 2025-06-07

              I would definitely choose case #2.

              Wait [mytimer] s
              or
              Wait 1 s
              -Makes perfect sense. Easy to follow and understand.

              Wait [1 or mytimer] s
              Is not actual code, is it?

               
              • Anobium

                Anobium - 2025-06-07

                Try here https://gcbasic.com/GCBASIC_Blockly.html?dl=1 Play and generate the code - you can always reset the page by reloading the page.

                Wait [1 or mytimer] s
                Is not actual code, is it?

                Wait [1 or mytimer] s would generate

                Wait 1 s or Wait mytimer s. Very clever.


                Lots of the functionality works, some of the functionality is not yet implemented. But, this really shows what is possible!

                 
                • Roger Jönsson

                  Roger Jönsson - 2025-06-07

                  So if there is a variable (enabled) use its value instead. Ok. Needs explaining, but practical, yes. Good thing.
                  I think the interface is pretty easy to follow now. The black borders and the end repeat / loop at the end of the loops, made a big difference. Thumbs up!

                   

                  Last edit: Roger Jönsson 2025-06-07
  • Anobium

    Anobium - 2025-06-06

    Introducing Blockly for GCBASIC: Visual Programming for Microcontrollers

    I am excited to announce Blockly for GCBASIC - a visual programming interface that brings drag-and-drop functionality to microcontroller development.

    Why Replace Graphical GCBASIC?

    Whilst Graphical GCBASIC served the community well, Blockly for GCBASIC represents a step forward in visual programming capabilities. Here is why I am making this transition:

    Modern Web-Based Interface: Built on Google's Blockly framework, this solution offers a cross-platform experience that works in modern web browsers.

    Enhanced User Experience: The drag-and-drop interface makes programming more accessible to beginners whilst remaining suitable for advanced users. No more wrestling with complex GUI layouts or platform-specific installation issues.

    Future-Proof Architecture: By leveraging Blockly's foundation, this approach ensures better long-term maintainability and the ability to incorporate new features as the ecosystem evolves.

    Use Cases for GCBASIC Blockly

    Educational Environments: Suitable for teaching programming concepts in schools and universities. Students can focus on logic and problem-solving without getting caught up in syntax details. Teachers can demonstrate programming concepts visually, making abstract ideas more concrete for learners.

    Rapid Prototyping: Assemble and test microcontroller programmes for proof-of-concept projects. The visual nature makes it easier to experiment with different approaches. Engineers and hobbyists can iterate through design concepts more quickly than traditional text-based coding.

    Maker Projects: Whether you are building home automation systems, robotics projects, or IoT devices, Blockly for GCBASIC makes microcontroller programming accessible to makers of various skill levels. The visual approach helps bridge the gap between creative ideas and technical implementation.

    Embedded System Development: From simple LED controllers to multi-sensor systems, the visual interface helps manage programme flow and hardware interactions. System architects can visualise the overall programme structure more clearly.

    Research and Development: Academic researchers can focus on their experiments rather than wrestling with low-level programming details, whilst still having access to GCBASIC functionality. This allows more time for the actual research and less time debugging syntax errors.

    Professional Training: The visual interface can help train new employees on microcontroller programming concepts. The graphical representation makes it easier to understand control logic and system interactions.

    Accessibility: Programmers with certain learning differences or visual processing preferences may find the block-based approach more intuitive than traditional text-based coding.

    Development Status

    Currently in early alpha phase, and I am pleased to report progress:

    Core Foundation Complete: The basic Blockly engine is operational and integrated with GCBASIC compilation.

    Major Challenges Resolved: The difficult architectural problems have been solved, including block-to-code translation, hardware abstraction, and compilation pipeline integration.

    Basic Functionality Working: Essential programming blocks for variables, loops, conditionals, and basic I/O operations are functional and tested.

    What is Next: I am now focusing on expanding the block library, improving the user interface, and adding more microcontroller-specific features. Priority areas include enhanced debugging capabilities, custom block creation tools, and documentation.

    Blockly for GCBASIC UI

    Current Capabilities

    The alpha version supports fundamental programming constructs including variable declarations, mathematical operations, conditional statements, and loop structures.

    Basic GPIO operations, timer functions, and serial communication blocks are operational and producing correct GCBASIC code output is next.

    Join the Development

    This is a good time to get involved with Blockly for GCBASIC. Whilst in early alpha, the foundation is solid and ready for community feedback and contributions.

    Want to try the build, try here

    The transition from Graphical GCBASIC to Blockly represents a technology upgrade making microcontroller programming more accessible for a wider community.

    Your feedback during this early phase will be valuable in shaping the final product. Whether you are an educator, professional developer, or hobbyist maker, your input will help ensure Blockly for GCBASIC meets real-world needs.


    Interested in trying the early alpha or contributing to development? Contact me for access and information.

     
  • Anobium

    Anobium - 2025-06-07

    News:

    I have updated the host solution to auto-load an example project. This means you can select the Generate Code button and you can experience the code generation - no blank workspace to start with.....

    You can create you projects, save, re-open and import existing blocks.

    The initial project is a LCD project.

    The default project

    This is alpha development. If someone wants to change to automatically compile and program that is doable.

    Your feedback is important.

    Enjoy.

     

    Last edit: Anobium 2025-06-07
  • Anobium

    Anobium - 2025-06-07

    Want to try the build, try it https://gcbasic.com/GCBASIC_Blockly.html?dl=1

     
  • jackjames

    jackjames - 2025-06-07

    Cute, fun.
    Even though I'm an old (actually very old) school programmer.
    So old school that I once programmed in Fortran on a Digital PDP11-84.
    I like playing with these things, I'll play with it a bit...

     
    • Anobium

      Anobium - 2025-06-07

      I am sure you can write a Fortran version!!!

      The process is relatively simple. You need to know the output expect. You define the Blocks, you define the output from the Blocks and it works. It is way more complex in reality but this is the high level process.

       
  • Anobium

    Anobium - 2025-06-09

    News

    The latest build has Logic blocks, plus many Maths blocks from the last few days.

    Blockly Diagram Description for GCBASIC Blockly - Build 06092025 11:45

    Hello fellow GCBASIC enthusiasts!

    Sharing a snapshot of the current Blockly workspace from the GCBASIC Blockly project (build 06092025 11:45). This picture showcases a well-constructed program designed for a PIC microcontroller, leveraging the visual block-based interface to generate GCBASIC code.

    Let me break it down:

    Workspace Overview

    Interface: The workspace features the Blockly grid with a toolbox on the left, categorised into sections like Setup, Logic, Math, Variables, Loops, Text, Commands, and Containers. The main workspace displays a series of interconnected blocks, each with distinct colours indicating their category.

    Build Info: The header displays BLOCKLY for GCBASIC - build 06092025 11:45, reflecting the latest development snapshot.

    Block Structure

    The program is built with a nested hierarchy of blocks, demonstrating control flow, variable manipulation, and I/O operations:

    Setup Blocks:

    • A select_chip block (orange) sets the target microcontroller to "16F877A".
    • A constant_block_group (green) defines LCD control constants (e.g., LCD_RS, LCD_ENABLE) with comments.
    • A variable_block_group (pink) declares global variables like myTimer (Word), myCounter (Byte), myVar (Byte), and myString (String * 10).

    Main Logic:

    • The program starts with a do_loop_simplest block (yellow), creating an infinite loop labeled "Main loop - runs forever."
    • Inside this loop, a repeat_loop_simple block (yellow) repeats actions 2 times.
    • An if_then_else block (purple) checks if myCounter = 0:
    • Then Branch: Executes Print "GCBASIC#1" and Wait 500 ms.
    • Else Branch: Executes Print "GCBASIC#2" and Wait 500 ms.
    • A set_variable block (pink) sets myCounter = 0 to reset the counter.
    • Another repeat_loop_simple block repeats 2 times, containing:
    • A print_text block (yellow) outputs myString.
    • A wait_fixed block (blue) waits for myTimer ms with a comment noting variable or constant use.
    • An lcd_cls block (blue) clears the LCD.

    Variable Manipulation:

    • A set_variable block sets myVar = 0.
    • A math_operation block (blue) calculates myCounter + 1 and updates myCounter.

    Generated GCBASIC Code

    The right-hand pane displays the compiled GCBASIC code, automatically generated from the blocks:

    • Constants: Defines LCD ports (e.g., #DEFINE LCD_RS PORTB.4).
    • Variables: Declares myTimer, myCounter, myVar, and myString with initial values.
    • Main Program: Includes a Do loop with the If structure, Print and Wait commands, and variable updates, ending with Loop.

    Observations

    • Comments: Blocks like constant_block_group and wait_fixed include comments (e.g., "This is an example group..." and "Uses either the constant..."), which are formatted in the code.
    • Nesting: The nested loops and conditional statements demonstrate the power of Blockly for complex logic.
    • Interactivity: The control buttons (Generate Code, Import Blocks, etc.) and console outputs (System Log, GCBASIC Output) are visible, indicating a fully functional environment.

    This diagram highlights the versatility of GCBASIC Blockly for creating microcontroller programs visually. Feel free to experiment with the blocks, share your designs, or report any issues via the GitHub Issues page. Looking forward to your feedback!


    Version 06.09.2025.02

    • Updated to changelog with revised URLs
    • Added Logic Blocks: If-Then-EndIf; If-Else-EndIf;Compare;And|Or;Not;True|False
    • Revised to ensure Logic indents are correct
    • Updated Default project to include Logic Blocks

    ** Version 06.08.2025.0G**

    • Restored 'Load Imported' - deleted in error when removing errant dropdown.
    • Add Group control to Constants Group Container
    • Changed set_variable block to use inline inputs with a text field instead of a value input.
    • Changed math_modulo block to use inline text inputs instead of value inputs.
    • Implement changlog
    • Implement changelog popup with version control
    • Removed the errant dropdown at the bottom of the page
    • Implement comments. Blocks can have comments added. These commments, when appropiate, are formatted and added to the GCBASIC. Very hard to implement. If you think other Blocks need the comments exposing - just ask.
    • Blocks that are not fully suportted have been hidden
    • Loading XML with comments now supported
    • The wait command is even smarter. Variables can be disabled)

    GCBASIC Code generated

    /*
                GCBASIC source generated by BLOCKLY.  An Open source code generator.
    
               A GCBASIC source program
    
    */
    // Date:    06/09/2025
    // Version: 0.9b
    // Author:  Evan
    
    #chip 16F877A, 20
    #option explicit
    
    // Constants used
        // LCD IO 4 config
        #DEFINE LCD_IO 4
        #DEFINE LCD_NO_RW 
        #DEFINE LCD_SPEED FAST
        #DEFINE LCD_RS PORTB.4
        #DEFINE LCD_ENABLE PORTB.5
        #DEFINE LCD_DB4 PORTB.0
        #DEFINE LCD_DB5 PORTB.1
        #DEFINE LCD_DB6 PORTB.2
        #DEFINE LCD_DB7 PORTB.3
    
    // Global Numeric Variables used
        Dim myTimer As Word
            myTimer = 1
        Dim myCounter As Byte
            myCounter = 0
        Dim myVar As Byte
            myVar = 0
    
    // Global String Variables used
        Dim mystring As String * 10
        mystring = "Blockly"
    
    
    // Main Program Commences Here 
    
        myTimer = 500
        // Main loop - runs forever
        Do
            myCounter = 0
            // Runs 2 times and exits
            Repeat 2
                If (myCounter = 0) Then
                    Print "GCBASIC#1"
                    Wait 500 ms
                Else
                    Print "GCBASIC#2"
                    Wait 500 ms
                End If
                // Clears the LCD
                CLS
                myCounter = myCounter + 1
            End Repeat
            // Again, runs 2 times and exits
            Repeat 2
                Print myString
                /*
                    Uses either the constant or the variable.
                    You can remove the variable, or, disabled it
                    */
                Wait myTimer ms
                // Clear the LCD
                CLS
            End Repeat
        Loop
    

    For Developers - you need a GitHub account
    Bug Tracking and enhancements - please use this link:
    Report an Issue and request an enhancement

    Discussions - please use this link: GitHub GCBASIC Blockly discussion

    If you do not have a GitHub Account, create one, then use the URL above.

    Or, post to this GCBASIC Forum post.

     

    Last edit: Anobium 2025-06-09
  • HackInBlack

    HackInBlack - 2025-06-09

    the github 'discussion' link is 404'ed

     
    • Anobium

      Anobium - 2025-06-09

      You need a GitHub account.

       
    • Anobium

      Anobium - 2025-06-10

      No you do not need a GitHub account to see the GitHub URL... I spotted that I had made the repository Private.. it is not Public

       
  • Anobium

    Anobium - 2025-06-09

    News

    Just added For-Next loop.

    I can add For-Conditional Exit For-Next if required.


    Tables and Functions support will be very comprehensive implementation.

    Any other commands can be added as required.

    Evan

     
  • Anobium

    Anobium - 2025-06-10

    News

    Lots more added but this is the baseline functionality. This needs someone to want to use this to drive the overall solution.

    Version 06.10.2025.01

    • Add Create SubRoutine and call Subroutine
    • Change layout to use 90% of browser
    • Reduced banner font size to give more real estate for Blockly
    • Add GCBASIC logo to workspace
    • Set Grid to off by default
    • New default project now has subroutine capability

    Now looks pretty cool.

     

    Last edit: Anobium 2025-06-10
  • Anobium

    Anobium - 2025-06-12

    News.

    Table definition and ReadTable added.


    Not may reviewers to date. :-(

    Was it all worth it?

     
  • Anobium

    Anobium - 2025-06-12

    GCBASIC Blockly Project Guide

    Introduction

    This guide provides a straightforward, local installation of GCBASIC for Blockly, allowing you to run it seamlessly on your system. By using Python’s built-in http.server, you can create a lightweight web server to host Blockly files without any complex setup.

    The process is simple:
    1. Install Python.
    2. Copy Blockly files to a directory.
    3. Start a local web server with a single command.

    Follow this guide to quickly set up your GCBASIC_Blockly.html project and begin experimenting with Blockly in a controlled environment.


    Table of Contents


    What is Python's http.server?

    Python's http.server is a built-in module that allows you to create a simple HTTP server to serve files from a directory. It provides a lightweight way to host static files, such as HTML, JavaScript, and CSS, over a network or locally.

    • Purpose: Ideal for testing, development, and quick file sharing.
    • Limitations: Not recommended for production use due to lack of security features, performance optimization, or scalability.

    Why Use a Simple HTTP Server in Python?

    Using a simple HTTP server in Python offers several advantages for working with Blockly and your GCBASIC_Blockly.html project:

    • Easy File Sharing – Share your Blockly workspace with others on the same network without configuring a complex server. Access it via a local IP (e.g., http://192.168.1.x:8000/GCBASIC_Blockly.html).
    • Quick Testing – Test your Blockly application locally without needing Apache, Nginx, or other web server installations, speeding up development cycles.
    • Development Convenience – Serve files from any directory for local debugging, allowing real-time edits to HTML and JavaScript files with immediate browser reflection.
    • Cross-Platform – Works on Windows, macOS, and Linux with Python installed, making it universally accessible.

    How to Start a Server (Install)

    Setting up a Python HTTP server is low-risk and requires minimal effort. Follow these steps:

    1. Install Python:
    2. Download and install Python from the official site (Python.org) or your package manager (e.g., apt, brew).
    3. Ensure Python 3.x is installed (e.g., check with python3 --version or python --version).
    4. This process is safe and reversible, with no system-level changes required.

    5. Copy Files to a Folder:

    6. Create a dedicated directory (e.g., BlocklyProject).
    7. Copy your GCBASIC_Blockly.html file and any associated text files (e.g., my_blockly_project.xml, changelog.txt, GCBASIC_Blockly_Guide.md) into this folder. See the File Listing for details.

    8. Open a Command Prompt:

    9. Navigate to the folder using a terminal or command prompt:
      • Windows: cd path\to\BlocklyProject
      • macOS/Linux: cd /path/to/BlocklyProject
    10. Ensure you’re in the correct directory before proceeding.

    How to Start a Server (One-liner)

    To start a simple HTTP server in Python, use this one-liner command in your terminal or command prompt:

    python -m http.server 8000
    

    How to Access the Server (One-liner)

    After running the server, access your Blockly setup in a browser using:

    http://localhost:8000/GCBASIC_Blockly.html
    

    Best Place to Download Python

    The best place to download Python is the official Python website: Python.org. It provides the latest stable releases for Windows, macOS, and Linux, along with installation guides and documentation.

    Alternatively, if you're using Windows, you can also download Python from the Microsoft Store: Python 3.11.

     

    Last edit: Anobium 2025-06-12
  • Anobium

    Anobium - 2025-06-13

    GCBASIC for Blockly - Demo Guide

    Introduction: Sharing Blockly Solutions

    Welcome to GCBASIC for Blockly, where programming meets visual simplicity and modular design. This guide introduces how to create, refine, and share Blockly-based solutions, making collaboration effortless.

    Instead of writing complex manual code, Blockly allows developers to drag-and-drop logical blocks, simplifying embedded programming. By sharing structured solutions, users can reuse, refine, and optimise existing logic, accelerating project development.


    Why Share Blockly Solutions?

    • Encourage Reusability – Reuse optimised solutions across multiple projects.
    • Improve Collaboration – Share structured blocks for community-driven enhancements.
    • Enhance Learning – Provide beginners with structured examples that build programming confidence.
    • Standardise Workflows – Ensure consistency in embedded programming practices.

    Downloadable XML Files: Overview

    The downloadable XML files contain a pre-configured Blockly workspace, designed for easy importing and extension.

    Key Features:

    ✅ Contains ready-to-use Blockly logic, structured for embedded microcontrollers.
    ✅ Allows fast modification, enabling developers to tweak logic without starting from scratch.
    ✅ Ensures block positioning is preserved, maintaining workspace organisation on reload.

    Summary of GCBASIC Blockly XML

    This XML file includes a set of predefined blocks to handle timing, conditions, and structured execution flows. It enables developers to work with fixed delays, conditional waits, and customised annotations within Blockly. The workspace is optimised for microcontroller programming, ensuring efficient code execution while keeping the logic visually organised.


    Expanding Shared Solutions Further

    • Integrate Blockly solutions into GCBASIC projects, ensuring compatibility with embedded systems and microcontrollers.
    • Version control your Blockly XML files, allowing a structured approach for updates, modifications, and improvements.
    • Encourage open-source contributions, enabling widespread adoption of efficient Blockly-based logic.

    Existing Online Demos

    Here are preconfigured Blockly demos available for testing:

    🔗 My Blockly Project
    🔗 ADC to LCD Demo
    🔗 LCD Test Demo


    Downloads

    This section provides access to prebuilt Blockly solutions, ready for use in GCBASIC projects.

    GCBASIC Blockly XML File

    This is the default XML file that contains a pre-configured Blockly workspace, designed for microcontroller programming.

    🔗 Download GCBASIC Blockly XML

    Other Downloads

    🔗 Download LCD operations demonstration

    Would you like to include additional XML files, example projects, or supporting documentation here?

    🚀 Let me know what you’d like to add!

     
  • Anobium

    Anobium - 2025-06-14

    GCBASIC for Blockly Demos

    Explore the collection of GCBASIC for Blockly projects in XML format. See https://www.gcbasic.com/GCBASIC_Blockly_Examples.html

    All the demos are now listed automatically. Just clck to open.

    Enjoy... with the corrected URL

     
  • Anobium

    Anobium - 2025-06-15

    GCBASIC for Blockly updated

    Explore the new demo GCBASIC for Blockly projects. See https://www.gcbasic.com/GCBASIC_Blockly_Examples.html for the new Robot Controller.

    The GCBSASIC for Blocky tool has new features:

    • You can set a port constant state to On or Off
    • You can use a number constant in logic statements
    • You can use a port constant in logic statements

    All very logical.

    Evan

     
  • Anobium

    Anobium - 2025-06-20

    GCBASIC for Blockly Capabilities from a User's Perspective

    Key Points

    • GCBASIC for Blockly provides a visual, drag-and-drop interface for programming microcontrollers such as PIC, AVR, and LGT, ideal for beginners.
    • It supports over 1300 chips, with features for code generation, project management, and error handling.
    • The tool includes logic blocks, loops, variables, and subroutines, enhancing programming flexibility.
    • It is user-friendly, offering demonstrations, guides, and a customisable workspace for learning and projects.

    Visual Programming and Microcontroller Support

    GCBASIC for Blockly offers a visual programming environment where users can create GCBASIC code by dragging and dropping blocks, making it accessible for those new to programming. It supports a wide range of microcontrollers, including PIC, AVR, and LGT, with over 1300 chips available for selection through a searchable dropdown, ensuring compatibility with various hardware, such as PIC16F877A and ATmega328P.

    Block Library and Code Generation

    The toolbox is organised into categories such as Setup, Constants, Logic, Math, Variables, Loops, Text, Lists, Subroutines, Commands, and Containers, covering essential programming needs. Users can generate well-formatted GCBASIC code from these blocks, which can be exported for use in the GCBASIC IDE or other environments, with sections for chip selection, constants, variables, main programme, subroutines, and tables, ensuring readability.

    Project Management and User Experience

    Users can import and export projects as XML files, allowing them to save and load their work easily. The interface includes error checking, logging, and dynamic features such as validating references, ensuring a smooth experience. The workspace is customisable, with options to toggle the grid, resize, and zoom, and it features a tabbed interface for viewing generated code.

    Educational and Practical Tools

    I have designed the tool to include demonstrations (for example, LCD, ADC, motor control) and a dynamic guide (GCBASIC Blockly Guide). It supports features such as subroutines, tables, and logic blocks, catering to both simple and complex projects. Demonstrations are available at GCBASIC Blockly Examples.

    Detailed Capabilities of GCBASIC for Blockly from a User's Perspective

    GCBASIC for Blockly is a robust visual programming tool built on the Blockly framework, designed to simplify microcontroller programming for users, particularly beginners, educators, and hobbyists. It enables the creation of GCBASIC code for microcontrollers such as PIC and AVR through an intuitive drag-and-drop interface, eliminating the need for traditional coding syntax. Below is a comprehensive overview of its capabilities, reflecting its suitability for both educational and practical applications.

    Visual Programming Environment

    At its core, GCBASIC for Blockly offers a visual programming interface where users can construct programs by arranging puzzle-piece-like blocks. This approach is particularly beneficial for those new to programming, as it abstracts the complexities of syntax and focuses on logic and structure. The interface is accessible, with clear labels and tooltips, making it easy for users to understand and use. The drag-and-drop functionality supports a wide range of programming concepts, from basic operations to advanced control structures, aligning with Blockly's design for educational and beginner-friendly coding (Blockly Overview).

    Microcontroller Compatibility and Chip Selection

    The tool supports an extensive list of microcontrollers, including PIC and AVR, with over 1300 chips available for selection. Users can choose their target chip through a searchable dropdown, which enhances usability for projects requiring specific hardware. This feature ensures that the generated GCBASIC code is tailored to the selected microcontroller, supporting devices such as PIC16F877A and ATmega328P.

    Comprehensive Block Library

    The toolbox is categorised into several groups, each serving distinct programming needs:

    • Setup: Includes blocks for selecting chips and adding decorative text or remarks, useful for project initialisation.
    • Constants: Allows defining configuration constants, including setting PORT constants to ON or OFF and getting their state, enhancing hardware interaction.
    • Logic: Features blocks for conditionals (If-Then, If-Else), comparisons, logical operations (And, Or, Not), and Boolean values, ensuring correct indentation for readability.
    • Math: Supports numeric operations, modulo calculations, and checks for odd/even numbers, catering to mathematical programming needs.
    • Variables: Enables declaration of numeric and string variables, with group containers for organising variable definitions, supporting data management.
    • Loops: Offers various loop structures such as For-Next, Do-While, Repeat, with handlers for missing variables and logic statement inputs, providing control flow options.
    • Text: Includes blocks for printing text, essential for output operations.
    • Lists: Supports creating and reading tables (lists) for data storage and retrieval.
    • Subroutines: Allows defining and calling custom subroutines, with parameters, enhancing code reusability.
    • Commands: Includes wait commands with variable or constant inputs, and LCD operations, for timing and display functions.
    • Containers: Provides snippet containers for collapsing code segments and grouping blocks, improving code organisation.

    These categories ensure users have access to a broad spectrum of programming constructs, making the tool versatile for both simple and complex projects.

    Code Generation and Export

    Users can generate GCBASIC code from their block arrangements, which is formatted with comments and organised into sections such as chip selection, constants, global variables (numeric and string), main program, subroutines, and tables. The code can be exported as a file for use in the GCBASIC IDE or other compatible environments, facilitating integration with development workflows. Subroutines are shown last in the output, improving code readability.

    Project Management and Persistence

    The tool supports importing and exporting projects as XML files, allowing users to save their work and load it later. This feature is crucial for collaborative projects or resuming work. Users can also pass XML files as start parameters, enhancing flexibility (GCBASIC Blockly Demos). The system saves state locally, ensuring persistence across sessions, and includes a prompt for usernames, adding a personal touch to generated code headers.

    Error Handling and Feedback

    GCBASIC for Blockly includes robust error handling, with real-time validation of dropdowns (e.g., ensuring referenced tables or constants exist) and logging of errors and warnings in a dedicated console. This feedback mechanism helps users identify and resolve issues, such as undefined variables or invalid conditions, with messages displayed in colour-coded formats (e.g., red for errors, green for warnings). Console log warnings and flashing the code tab when generating code enhance user awareness.

    Dynamic Features and Interactivity

    The interface includes dynamic features such as a searchable chip selector, automatic validation of references, and interactive elements such as enabling/disabling fields based on block connections (e.g., wait command variables). It supports setting PORT constants and getting their state, with validation ensuring correctness. The system also supports comments for blocks, which are formatted and included in the generated code, improving documentation.

    Customizable Workspace and User Experience

    Users can customise the workspace by toggling the grid on or off, resizing, and zooming in/out for better visibility. The tabbed interface allows switching between the Blockly editor and the generated GCBASIC code, with a flash effect when generating code to draw attention. The workspace layout uses 90% of the browser, with a reduced banner font size for clarity, and includes a GCBASIC logo for branding, enhancing the user experience.

    Educational and Practical Tools

    The tool is designed with educational value in mind, offering demonstrations for LCD, ADC, motor control, and more, accessible via GCBASIC Blockly Examples. A dynamic guide (GCBASIC Blockly Guide) provides learning resources. A version control popup ensures users are informed of updates, supporting continuous learning and adoption.

    Extensibility and Community Support

    Built on Blockly, GCBASIC for Blockly is highly extensible, allowing advanced users to create custom blocks, though this is more relevant for developers. The tool's integration with Blockly provides access to community forums and resources, enhancing support for users (Blockly Developer Forum). URLs in the readme facilitate community engagement and resource sharing.

    Accessibility and Performance

    The drag-and-drop interface, combined with clear block labels and tooltips, makes the tool accessible to users with different learning styles or abilities, aligning with Blockly's commitment to inclusive tools (Blockly Accessibility). Performance optimisations, such as caching and efficient data handling, ensure smooth operation even with large projects, with zoom and auto-positioning enhancing usability.

    Integration with External Resources

    Users can load XML files as parameters and generate code that integrates with external IDEs or microcontrollers, enhancing its utility in real-world projects. Demonstrations showcase practical applications (GCBASIC Blockly Demos).

    Security and Stability

    The tool includes measures such as preventing page refreshes during a session, ensuring user work is protected. Enhanced wait commands and error handling contribute to stability, with the system logging visits for analytics, though this is more backend-focused (GCBASIC Download).

    Summary Table of Key Capabilities

    Category Capabilities
    Programming Visual drag-and-drop interface, logic blocks, loops, variables, subroutines, tables
    Hardware Support Over 1300 PIC, AVR, and LGT chips, searchable chip selection
    Code Management Generate, export, import, and save GCBASIC code as XML files
    User Experience Customisable workspace, tabbed interface, error logging, feedback mechanisms
    Educational Tools Demonstrations (LCD, ADC, motor), guides, version control popup
    Performance Caching, zoom, auto-positioning, grid toggle, stability features
    Accessibility Intuitive design, tooltips, colour-coded feedback, inclusive interface

    Key URLs

     
    ❤️
    1
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.