Welcome to My Digital Garden

Developer / Tinkerer

A Software Developer, Tinkerer and Electronics & Communication Engineer who enjoys exploring every detail of technology.

C,C++ Code Style Guide

This guide provides step-by-step instructions for setting up consistent formatting, rules checking, and documentation for C/C++ code using clang-format, clang-tidy, and Doxygen in VS Code. Follow this guide to ensure uniformity across the team. 1. Prerequisites Before starting, ensure you have the following tools installed: VS Code (latest version) Extensions for VS Code: C/C++ (Microsoft) Doxygen Documentation Generator Command-line tools: clang-format clang-tidy doxygen Python (for pre-commit hooks) 2. Auto-Formatting Using clang-format clang-format is used for consistent code formatting. ...

November 28, 2024 · 3 min

Kernel Log Level

Number Macro Log Level Description Equivalent 0 pr_emerg Emergency System is unusable. KERN_EMERG 1 pr_alert Alert Action must be taken immediately. KERN_ALERT 2 pr_crit Critical Critical conditions. KERN_CRIT 3 pr_err Error Error conditions. KERN_ERR 4 pr_warn Warning Warning conditions. KERN_WARNING 5 pr_notice Notice Normal but significant condition. KERN_NOTICE 6 pr_info Informational Informational messages. KERN_INFO 7 pr_debug Debug Debugging messages. KERN_DEBUG The number corresponds to the log level used by the Linux kernel, with lower numbers indicating higher severity. For example, if the log level is set to 4 (Warning), only messages from pr_emerg to pr_warn will appear in the system logs. Default log level is generally set to 6.

November 20, 2024 · 1 min

Hola Bot

Holonomic Drive Robot: A Versatile Path-Planning Machine !assets/Pasted image 20241201191055.png Overview The Holonomic Drive Robot is an innovative, three-wheeled robot designed for precision path planning and image-based drawing. It combines advanced robotics algorithms, custom hardware, and creative problem-solving to deliver exceptional performance in a variety of tasks, from geometric pattern generation to drawing intricate images like logos. Key Highlights 1. Motion Planning and Control Implemented a novel path-planning approach to optimize motor velocity and trajectory precision. Designed custom algorithms to address trajectory distortion caused by motor speed limitations. 2. Hardware and Software Integration Successfully integrated ESP32, eYFI Mega, stepper motors, and LiPo batteries into a cohesive system. Overcame challenges such as faulty motor drivers and optimized power delivery for reliability. 3. Image Processing and Simulation Extracted contours from images and translated them into robot motion commands. Utilized ROS and Gazebo for testing and refining the system in a simulated environment. 4. Real-Time Problem Solving Debugged critical hardware issues, such as malfunctioning motor drivers and damaged LiPo cells. Enhanced communication latency between the laptop and ESP32 from 1 second to 200ms by identifying and resolving protocol bottlenecks. 5. Creative Outputs Enabled the robot to draw patterns such as Lissajous figures (infinity loops) and complex logos. Developed a custom ink mixture to ensure visibility and erasability for pattern drawing. Technologies Used Hardware: ESP32, eYFI Mega, LiPo batteries, and stepper motors. Software: ROS for robot control, Gazebo for simulation, and Python, C for software logic. Tools & Libraries: OpenCV for image processing, AccelStepper for motor control, and custom ROS packages for integration. Development Timeline January - February 2023: Prototyping and Hardware Development Designed and built the physical robot body, integrating motor drivers, sensors, and controllers. Calibrated the camera with over 100 samples for precise localization. Debugged and optimized motor driver configurations, achieving simultaneous operation of all wheels. Developed non-blocking motor control using the AccelStepper library. March 2023: Software Refinement and Final Tests Created a contour extraction function for converting images into path points for drawing. Integrated a servo-based pen mechanism for on/off control during drawing operations. Conducted intensive testing, fixing indexing bugs, and optimizing scripts for various patterns, including the Snapchat logo and infinity shapes. Demonstrated successful path-following in a simulation environment using Gazebo. !assets/hola-collage 1.jpg Challenges Overcome Latency in Data Transmission: Resolved slow communication by identifying a missing newline character in transmitted data, reducing latency from 1 second to 200ms. Battery and Power Issues: Diagnosed and replaced faulty LiPo battery cells, ensuring uninterrupted operation. Hardware Failures: Addressed motor driver failures and loose connections with creative soldering solutions and robust wiring techniques. Achievements Successfully implemented conditional path-following to optimize motor velocity during complex path execution. Demonstrated precise image drawing with minimal distortion using camera-calibrated localization. Created a detailed documentation repository and shared project outcomes through YouTube videos, showcasing the robot’s capabilities. Media Video Demonstrations: Watch Demo Video Conclusion The Holonomic Drive Robot is a testament to innovative thinking, technical expertise, and perseverance. It serves as a versatile platform for robotics experimentation, offering potential applications in art, industrial automation, and beyond. ...

March 30, 2023 · 3 min

Introduction to Linux

What is Operating System ? An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. What is Kernel? The kernel is a part of operating system which has complete control over everything in the system. It is the portion of the operating system code that is always resident in memory,[2] and facilitates interactions between hardware and software components. What is Linux? Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance. ...

July 12, 2022 · 6 min

degoogle rom

/e/ OS settings put global captive_portal_http_url http://204.ecloud.global settings put global captive_portal_https_url https://e.foundation/net_204/ change ntp settings put global ntp_server pool.ntp.org DeBlot pre-installed apps Use this command to list all the apps installed adb shell pm list packages To search any particular keyword use grep command adb shell pm list packages | grep 'keyword' Package names will be somewhat like this, eg. for Google Assistant its com.android.hotwordenrollment.okgoogle, for Google Auto its com.google.android.projection.gearhead Copy the name of the package you want to uninstall and use the following command ...

November 23, 2021 · 1 min

Understanding Farmers

Job profile of a farmer A Farmer is the CEO, COO, CFO, Sales manager, Investment manager of a propritary fariming firm. It will directly effect his income if he is not good in even one of the fields Before the cropping season: What to sow, when to sow, credit availability, plan for inputs, land preparation, soil nutrient status Farmers has to have the access to the data that howmuch has it rained, moisture level in soil. When to sow based on forcasting Svaings, loans –> moneylenders Seed varity and quality, selection from number of options, authenticity of seeds Land preparation, machinery and labours, funds for that Gap filling for requirements of soil for a crop, suppliments, fertilizers, NPK (should be made easy to understand) During the cropping season: choose appropriate agriculture technology monitor the progress of crop observe anomalies and take action, monitor weather labour/machinery management for sowing and intercultural operations water management weed/pests/ wild animals management respond to climate contingencies in case of damege file claim for insurance After the cropping season: Harvesting based on weather conditions, checking if crop is actually ready labour management primary processing, storage market assessment, where and when to sell grading/sorting/packing/transportation value addition, negotiation for better prices realization of prices repayments(loans, etc.) surplus investment planning(future planning) During the lean season: Remaining 6 to 7 months: Migration, ancillary works, MGNAREGA Repeats it season after season and year after year ...

November 20, 2021 · 3 min

Technical Analysis

Analyzing the past It is a well established fact that stock prices show cyclical movements, similar to a business. It is a process of identifying trends & trend reversals at an earlier stage to formulate buy-sell strategy. A good technical Analyst always considers facts. He stays away from emotions like greed & panic while taking his decision Know Yourself Intraday Trader - Closes the trade within a day. Short Term Investor - Closes a trade in 2 days to 3 months. Medium Term Investor - Closes a trade in 3 months to 1 year. Long Term Investor - Closes a trade after 1 year. Trends The meaning of trend in finance isn’t all that different from the general definition of the term - a trend is really nothing more than the general direction. We do see trends even while watching IPL matches! Uptrends ...

October 10, 2021 · 11 min

Rich Dad Poor Dad Summary

Introduction For example, one dad would say, “The love of money is the root of all evil.” The other, “The lack of money is the root of all evil.” Money is not taught in schools. Schools focus on scholastic and professional skills, but not on financial skills. This explains how smart bankers, doctors and accountants who earned excellent grades in school may still struggle financially all of their lives. Our staggering national debt is due in large part to highly educated politicians and government officials making financial decisions with little or no training on the subject of money. ...

October 2, 2021 · 3 min · Robert Kiyosaki

Compile your Custom Linux Kernel

Preparation Install Dependencies sudo pacman -S base-devel xmlto kmod inetutils bc libelf git --needed Downloading source and local setup It is recommended to create a separate build directory for your kernel(s). In this example, the directory kernelbuild will be created in the home directory: mkdir ~/kernelbuild cd ~/kernelbuild Goto kernel.org and download kernel source wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.14.5.tar.xz Note: you can verify signature of the downloaded tarball if you want Extract tarball tar -xvJf linux-5.14.5.tar.xz Check ...

September 17, 2021 · 3 min

xfiles

.xinitrc The ~/.xinitrc file is a shell script read by xinit and by its front-end startx. It is mainly used to execute desktop environments, window managers and other programs when starting the X server (e.g., starting daemons and setting environment variables). .xprofiles An xprofile file, ~/.xprofile and /etc/xprofile, allows you to execute commands at the beginning of the X user session - before the window manager is started. .Xresources Xresources is a user-level configuration dotfile, typically located at ~/.Xresources. It can be used to set X resources, which are configuration parameters for X client applications. (xrdb ~/.Xresources) ...

September 14, 2021 · 1 min