Interface and Application Programming


Home

 Objective of this Week

  • Compare as many tool options as possible


Programming Language

Python

Python is a high-level, beginner-friendly programming language widely used for automation, IoT, web development, AI, data science, and scripting. It is known for its simple syntax, which makes code easy to read and write, even for beginners.

micro_controller = ["Arduino", "Rasperry pi 3", "ESP32", "jetson nano"]
for i in micro_controller:
    print(i)

Java

Java is a versatile, object-oriented programming language widely used for building applications ranging from mobile apps to enterprise-level software. It follows the principle “write once, run anywhere,” allowing Java programs to run on any device with a Java Virtual Machine (JVM).

public class microControllerList {
    public static void main(String[] args) {
        String[] microControllers = {"Arduino", "Raspberry Pi 3", "ESP32", "Jetson Nano"};

        for (String controller : microControllers) {
            System.out.println(controller);
        }
    }
}

Javascript

JavaScript is a powerful, high-level programming language primarily used to create interactive and dynamic features on websites. It runs directly in the web browser, enabling real-time updates, animations, form validation, and responsive user interfaces. JavaScript is also used on the server side through platforms like Node.js, allowing full-stack development using a single language.

const micro_controller = ["Arduino", "Raspberry Pi 3", "ESP32", "Jetson Nano"];

for (let i of micro_controller) {
    console.log(i);
}


Scratch

Scratch is a block-based visual programming platform mainly used to learn coding concepts in an easy way. Instead of typing code, we simply drag and drop blocks to create actions. It allows us to control sprites, add sounds, switch backdrops, and create games, animations, or interactive stories. The interface is simple, with different sections like Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and My Blocks. Each section gives a different type of block to build the program. Overall, Scratch helps us understand how programming logic works by giving a visual way to connect blocks and immediately see the output on the stage.

Stage area

In that image where you see the cat is stage area. In that area we can see our project process, whatever work is done we can run it by above green flag and will stop the red icon.

Sprite Pane

Here we can see the all sprites which is used to our work, We can adjust the sprite setting by these too.

Blocks palette

This area contains all control action of our project, by using these we can operate our project parameters.

  1. Motion

    This section has all the blocks used to move a sprite. We can make it move steps, rotate, glide to positions, point in directions, and follow coordinates. Basically anything related to movement is inside Motion.

  1. Looks

    These blocks change how a sprite appears. We can switch costumes, change size, hide/show, change graphic effects, and also control speech/thought bubbles. Anything that visually changes the sprite comes from Looks.

  1. Sound

    Sound blocks handle audio operations. We can play sounds, stop them, change volume, set volume, and control sound effects. All audio-related actions are inside this category.

  1. Events

    These blocks start actions based on triggers. For example: green flag click, key press, sprite click, broadcast messages, and backdrop change. Events are used to start scripts when something happens.

  1. Control

    Control blocks handle timing and program flow. They include repeat loops, forever loops, wait blocks, if/else conditions, and blocks that control how long actions run. They help structure the logic.

  1. Sensing

    Sensing blocks let the sprite detect things around it. They can check touching, mouse position, key pressed, ask user input, loudness, timer, etc. These blocks are used when the sprite needs to respond to the environment.

  1. Operators

    Operators are used for calculations and logic. They include addition, subtraction, comparisons (>, <, =), and string operations. They are used inside conditions and variables to compute values.

  1. Variables

    This category stores data. We can create a variable, set value, change value, show/hide it on stage, and use it inside scripts. Useful for scores, timers, counts, positions, etc.

  1. My Blocks

    This section allows you to create your own blocks (custom functions). If you want to reuse a long set of instructions, you can make a block and call it easily anywhere in the project.

Script

We can build the project by draging the block into this area one by one.

Working

We did one game project - escape to jump, we create the code blocks and set the sprite as well as per our planning


Conclusion

Learning outcomes

  • Understood how to design and arrange the game interface, including sprites, backgrounds, and basic layout.

  • Learned to control sprite movements using events and motion blocks to make the player jump at the right time.

  • Gained experience in detecting collisions between the player and obstacles to trigger game-over or restart actions.

  • Learned how to manage game flow using timers, loops, and scoring logic to make the game more interactive.