Posts

Firmware (Software for Hardware)

  Embedded Firmware Design Document Firmware  is often referred to as “software for hardware”. Firmware provides instructions to help hardware start up, communicate with other devices, and perform basic input/output tasks.  There are typically three levels of firmware: Low-level firmware: This firmware is usually stored in non-volatile memory chips like read-only memory (ROM) and one-time programmable (OTP) memory. These chips cannot be rewritten or updated, and the firmware is intrinsic to the hardware, such as a computer. High-level firmware: This firmware is deployed within flash memory chips and comes with more complex instructions that allow updates to be made. Subsystems: These are semi-independent devices that are part of a more extensive system. Firmware at this level is embedded within central processing units (CPUs), flash chips, and liquid crystal display (LCD) units. Types of firmware :  BIOS (Basic Input/Output System) :- The Basic Input/O...

GIT COMMANDS

  Commands to start a Project in Git Repository  :- 𝗴𝗶𝘁 𝗶𝗻𝗶𝘁 : This is the very first command you'll need to use when starting a new project. It initializes a new Git repository in your current directory. 𝗴𝗶𝘁 𝗰𝗹𝗼𝗻𝗲 <𝗿𝗲𝗽𝗼> : To work on an existing project, you'll want to clone (copy) it to your local machine. This command does that. Commands to 𝗠𝗮𝗸𝗲 𝗖𝗵𝗮𝗻𝗴𝗲𝘀 :- 𝗴𝗶𝘁 𝘀𝘁𝗮𝘁𝘂𝘀 : Before making or after making changes, it's good practice to check the status of your files. This command will show you any changes that are currently upstaged. 𝗴𝗶𝘁 𝗮𝗱𝗱 <𝗳𝗶𝗹𝗲𝗻𝗮𝗺𝗲> : After you've made some changes to your files, you'll want to stage them for a commit. This command adds a specific file to the stage. 𝗴𝗶𝘁 𝗮𝗱𝗱 . 𝗼𝗿 𝗴𝗶𝘁 𝗮𝗱𝗱 -𝗔 : Instead of adding files one by one, you can add all your changed files to the stage with one command. 𝗴𝗶𝘁 𝗰𝗼𝗺𝗺𝗶𝘁 -𝗺 "𝗖𝗼𝗺𝗺𝗶𝘁 𝗺𝗲𝘀𝘀𝗮𝗴𝗲" : Now that your ...

Create a autorun for a PyQt5 raspberry pi Application

Create a autorun for a PyQt5 raspberry pi Application :  To create an autorun for a PyQt5 Python application on a Raspberry Pi, you can follow these steps: Create a script that will run your PyQt5 application. Let's call it "DemoApp.py". Make sure that the script is executable by running the command chmod +x App_Script.sh . Open the rc.local file by running the command sudo nano /etc/rc.local . Add the following line to the file, just before the "exit 0" line: ' sudo python3 /path/to/ App_Script.sh  &'. S ave the file and exit. The next time your Raspberry Pi boots up, the script " App_Script.sh " will automatically run and your PyQt5 application will start. Note: If your PyQt5 application requires any specific environment variables or other dependencies to run properly, you may need to modify the script or add additional commands to the rc.local file to ensure that these requirements are met before running the application.

Pointers in C++

  Pointers: Pointer is a variable which store the address of another variable. It is declared using '*' with data type of the variable whose address will be store in the pointer variable. For Example -                                     int  n=10;  / / An integer variable n                                    int* ptr = &n; // ptr is a pointer to the variable n.                                                      // ptr store the address of variable n.                               int*ptr means "ptr is a pointer to the integer variable". Dereferenci...

Difference between Structure and Class in C++

  Difference between Structure and Class in C++  Members of Structure are public by default and members of Class are private by default. Structures are value types and Classes are reference types (A variable of structure type contains the Structure's data but a class variable contains the reference of the data). Structures use stack allocation; Classes use heap allocation.  When deriving a struct from a class/struct, default access specifiers for base class/struct are public.

pragma in c++

Why to use #pragma once  in program?   '#pragma' is a Preprocessor directive, which specifies how a compiler should process its input. The use of #pragma once can  reduce build times. Compiler will not open and read the file again after the first #include of the file in the translation unit. It's called the multiple-include optimization. The  intrinsic  pragma tells the compiler that a function has known behavior. The compiler may call the function and not replace the function call with inline instructions, if it will result in better performance .

Number System

 Important   Number System for computer are :- Decimal Number System (0-9) Binary Number System (0-1) Hexadecimal Number System (0-9, A-F) Octal Number System (0-7) 1.) Decimal Number System :        Base : 10       Values : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 2.) Binary Number System :        Base : 2       Values : 0, 1 3.) Hexadecimal Number System :        Base : 16       Values : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A(10), B(11), C(12), D(13), E(14), F(15)       4.) Octal Number System :        Base : 8       Values : 0, 1, 2, 3, 4, 5, 6, 7 Binary to Decimal Conversion: Binary (base-2) numbers use only two digits: 0 and 1. Decimal (base-10) numbers use ten digits: 0 through 9. The conversion process relies on the idea of place value , just like in decimal numbers. In decimal, each digit's position represents a power of 10 (e.g., in 1...