<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Devansh Shukla on Medium]]></title>
        <description><![CDATA[Stories by Devansh Shukla on Medium]]></description>
        <link>https://medium.com/@roboticsbydev?source=rss-499231f3ae43------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ab_9JOs_eZogrOXweqqH0w.jpeg</url>
            <title>Stories by Devansh Shukla on Medium</title>
            <link>https://medium.com/@roboticsbydev?source=rss-499231f3ae43------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:21:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roboticsbydev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Inter-Process Communication — RPC (OS Part 2)]]></title>
            <link>https://roboticsbydev.medium.com/inter-process-communication-rpc-os-part-2-e85f833cfefb?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/e85f833cfefb</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[grpc]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Fri, 04 Aug 2023 11:02:01 GMT</pubDate>
            <atom:updated>2023-08-04T13:49:16.903Z</atom:updated>
            <content:encoded><![CDATA[<h3>Inter-Process Communication — RPC (OS Part 2)</h3><p>This blog is a sequel to <a href="https://medium.com/@dev-ansh-r/decoding-operating-systems-%EF%B8%8F-%EF%B8%8F-1ee7a0dece24">Operating System’s blog</a>. For better understanding, read the blogs in order.</p><p><strong>Inter-Process Communication</strong>, Process running in an operating system can be independent or cooperating. The cooperating process can affect or be affected by other processes, including sharing data. So the Cooperating process must have an Inter-Process Communication(IPC).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*03awf1zTPqs6JeX_pmJVzA.png" /><figcaption>IPC in Operating System</figcaption></figure><h3>Remote Procedure Call (RPC)📞:</h3><p>RPC allows a process on one machine to call a function or procedure that resides on a remote machine, making it appear as if the function is being executed locally. This abstraction hides the complexities of network communication, making RPC an essential mechanism for building distributed systems.</p><p>In a simple analogy, let’s consider an Invoice system at a shop counter. The shopkeeper enters product details and a customer ID (unique, like a phone number). Two processes run simultaneously: one <strong>fetches customer details</strong>, and the other calculates the <strong>total payable amount</strong>.</p><p>Instead of directly returning the sum to the application, it is sent to the process responsible for fetching customer information. This process then associates the amount with the customer ID and sends it back to the application. <strong>The process where the user information calls the sum process is known as the <em>RPC call.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GXrx884lrwiQ3AHyLBgAjQ.png" /><figcaption>Pictorial representation of the above analogy</figcaption></figure><p>Similarly, RPC is employed in operating systems to enhance computer efficiency and memory management. RPC finds its application in <strong>client-server systems</strong> and <strong>distributed systems</strong> to facilitate communication between different systems.</p><p>In 2016, Google introduced <strong>gRPC</strong>, building upon the existing RPC concept, which became even more efficient, thanks to the utilization of protobuf (<em>protocol buffer</em>) technology.💡</p><h3>gRPC — overview:</h3><p>gRPC in general works with <strong>HTTP 2</strong>, so basically a browser might or might not support a client call, For now, gRPC is used to communicate between different <strong>microservices</strong> or <strong>services running on another machine</strong>.</p><p>gRPC is language agnostic — services can be written in different languages and can be integrated through gRPC thanks to protobuf.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*dhQE-yr4OlGU-FBxaQuC4g.png" /><figcaption>Working of gRPC</figcaption></figure><h3>protocol Buffer📦:</h3><p>A format used by gRPC to transmit data, Thanks to the protocol buffer the client stub is generated ie when the client requests a call from the server, the code for the respective language will be generated both on the client and server-side</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*9wRbcWCERylnvktX_KK6Rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEFZhd7fyYjCxZU28SECkA.png" /><figcaption>Interconnection flow of a gRPC call</figcaption></figure><p>In Python, when you use Protocol Buffers (protobuf) to define message types and generate code, the generated code will be stored in Python files with an .py extension. These Python files will contain classes that represent the defined message types in your .proto file.</p><p>When you run the Protocol Buffers compiler (protoc) with the --python_out flag, it will generate the Python code and store it in the directory specified by the output option. For example, if you have a example.proto file and want to generate Python code in a directory named generated, you can use the following command:</p><pre>protoc --python_out=generated example.proto</pre><p>This will generate the Python files representing the message types in the generated directory with the .py extension. You can then import and use these generated Python classes in your Python application to work with the protobuf messages defined in the .proto file.</p><h3>Conclusion🏁:</h3><p>Inter-Process Communication and RPC play a crucial role in modern computing, enabling processes on different machines to collaborate seamlessly. With <strong>gRPC </strong>and<strong> protobuf,</strong> communication between services becomes more efficient and flexible, making it easier to build distributed systems.</p><p>Ping me on <a href="https://www.linkedin.com/in/dev-ansh-r/">LinkedIn</a> for any further assistance. See yaa!!! 👋🏾</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e85f833cfefb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding Operating Systems️‍♂️]]></title>
            <link>https://roboticsbydev.medium.com/decoding-operating-systems-%EF%B8%8F-%EF%B8%8F-1ee7a0dece24?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ee7a0dece24</guid>
            <category><![CDATA[kernel]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[process]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Tue, 01 Aug 2023 09:35:02 GMT</pubDate>
            <atom:updated>2023-08-01T09:35:02.061Z</atom:updated>
            <content:encoded><![CDATA[<p>⚠️ <strong>Disclaimer</strong>: This blog deals with operating system concepts at an abstract level. For a more in-depth understanding, consider referring to <a href="https://www.linkedin.com/posts/dev-ansh-r_operating-system-concepts-activity-7089449122511945728-RLAL?utm_source=share&amp;utm_medium=member_desktop"><strong>handwritten notes</strong></a> or reliable learning resources, such as the <a href="https://codex.cs.yale.edu/avi/os-book/OS10/"><strong>Operating System book by John Wiley &amp; Sons.</strong></a></p><p>This blog focuses mainly on Operating System <strong>Processes, Services, and Scheduling</strong>. Will make sure to post a sequel blog including File and Memory management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*iijRbC4vnP-zXYypk5g0rQ.png" /></figure><h4>Why Operating Systems Came Into Existence: 🖥️</h4><p>When the Systems and devices were getting equipped with subterfuge Peripherals and were being <strong>commercialized</strong>, A need to make the System more user-oriented soon became a product of engagement and luxury.</p><p>The notion “the operating system should have a better user experience” sparked operating system optimisation, which in modern times has become commonplace.a point where <a href="http://apple.com/">Apple Inc.’s</a> Mac Book is well known for its user interface and is regarded as a productivity booster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sC-vl9V3syY8h32qs58fVQ.png" /><figcaption>Would Suggest Figjam for Architecture diagrams, Personal Suggestion</figcaption></figure><p>A system that can utilise these processors effectively needed to be built as they got more power-hungry and deployable; as a result, an operating system — a system that can manage files, Memory, disc, and Peripherals — was required.</p><h4>Main Concepts: 📚 This blog will explore various operating system concepts with the aid of a single reference (considering a web browser as an example).</h4><ol><li>Different Processing Environments.</li><li><em>IPC, DMA, ISR, Hz &amp; Jiffies, Micro Kernel, API &amp; ABI.</em></li><li>System Calls, Process Scheduling ( <em>FCFS, RR, SRT</em> ).</li></ol><h4>Different Processing Environments.</h4><ul><li><em>Single Processor System.</em></li></ul><p>The web browser process will be completed and scheduled with fair use of CPU time and Memory( L1, L2 cache ).</p><ul><li><em>Multi-Processor System.</em></li></ul><p>The global scheduler takes into account factors like the process priority, process state (running, ready, waiting), CPU affinity (preferential assignment of processes to specific CPUs), and the current workload of each processor. It then determines which process should run on which processor. The goal is to balance the load across all processors to ensure that they are being utilized efficiently. 🤫<em>Uses MESI Protocol for coherence.</em></p><ul><li><em>Distributed Systems.</em></li></ul><p>Data is replicated across multiple nodes for fault tolerance and load balancing purposes.</p><p>Continuing with the multi-processor system, The process (Web Browser) is running on one of the processors and the web browser has to fetch a file from the file explorer( A new process ), The new process is created and scheduled with the help of a global scheduler. <em>But how can two independent processes communicate with each other ???</em></p><h4>Inter-Process Communication (IPC): 📩</h4><p>The 2 processes can communicate with each other ie...The web browser can access the file without any interference from the processor and making the CPU time efficient.</p><ul><li>Pipes / FIFOs.</li><li>Sockets { <em>Gmail — Socket Connection — Server</em> }.</li><li>RPC { <em>Remote Process Calls &gt; Call function residing in different spaces as if they were local</em> }.</li><li>Semaphores.</li></ul><p>A new process ( File operation ) &gt; The web browser reads the file&#39;s data, This will not be going till the processor level instead the file operation is done with the help of the <strong>File system and kernel, </strong>TheInterrupt Service Routine (ISR)⏳<em> </em>will generate a Software Interrupt when the operation is completed so the <strong>processor</strong> doesn&#39;t have to sacrifice its time and memory.</p><p><strong>Summarizing for now:<em> </em></strong>The processor is responsible for running the process and calculations, Kernel has the scheduler, IPC, ISR, and other device drivers, And a file system is responsible for managing the data Storage. This file system and kernel together are the <strong>Operating System</strong>. { ref below picture }.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OpjL9Z1k4ANC4htISHZO3Q.png" /></figure><h4>System Calls and Process Scheduling: 🔄🎛️ ( <em>FCFS, RR, SRT</em> )</h4><p>Now that we have a better understanding of the operating system, we can see that it requires information or a task in order to function. This task is a command that the user program sends to the operating system via a method call, which is also known as a <strong>system call</strong>.</p><ul><li>FCFS — First Come First Serve</li><li>RR — Round Robin</li><li>SRT — Shortest Remaining Time</li></ul><p>These <strong>Process scheduling </strong>algorithm is used by the kernel to choose the order in which the process will be executed. A brief explanation is included in the <a href="https://www.linkedin.com/posts/dev-ansh-r_operating-system-concepts-activity-7089449122511945728-RLAL?utm_source=share&amp;utm_medium=member_desktop">notes</a>.</p><blockquote>n! ( n factorial ) — n number of ways a process can be scheduled for one processor. The order will actually bechosen by the algorithm.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Myu4IzZricUOe0U5hYwoCQ.png" /></figure><p>So to create a new process for the web browser, the user-level application (browser) needs to request the operating system’s assistance. This request is made through a system call, specifically the “fork” or “exec” system call. The “fork” system call creates a new process (child process) that is an exact copy of the calling process (parent process), while the “exec” system call replaces the current process with a new program (the web browser executable). tada..that&#39;s it😁</p><h4>Conclusion</h4><p>This is how an Operating system works backstage for the smooth processing of tasks and what looks like magic for the user is actually a bundle of system calls.</p><p>Ping me on <a href="https://www.linkedin.com/in/dev-ansh-r/">LinkedIn</a> for any further assistance Seeeeee yaa!!! 👋🏾</p><h4>Bonus:</h4><p>“The Linux was actually built on a combination replica of minix🦝 and Unix” where minix was a file system which is now optimized to be an Operating System.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jMj7mHYi39xEAGuYs4OFsw.png" /></figure><p><strong>Git repo</strong> : <a href="https://github.com/torvalds/linux">https://github.com/torvalds/linux</a> 😉🤫Have Fun.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ee7a0dece24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Git Magic: Unraveling GitHub and the Git File System ✨]]></title>
            <link>https://roboticsbydev.medium.com/the-git-magic-unraveling-github-and-the-git-file-system-7cc2363ab298?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cc2363ab298</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Thu, 08 Jun 2023 02:57:23 GMT</pubDate>
            <atom:updated>2023-06-08T02:57:23.283Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome, fellow developers and enthusiasts, to the enchanting world of Git and GitHub! In this blog post, we will embark on a journey to explore the underlying mechanisms that make Git and GitHub such powerful tools for version control and collaboration. Prepare to unravel the mysteries of the Git file system and discover the captivating magic of the SHA-256 algorithm. ✨🔮</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HeUKdcFFT9ldcg5I" /></figure><h4>Git and GitHub: An Overview 🌐</h4><p>Git, developed by Linus Torvalds, revolutionized how developers manage their projects. It’s a distributed version control system that allows multiple people to work on the same codebase seamlessly. And GitHub, a web-based hosting service for Git repositories, provides an enchanting platform for collaboration, sharing, and contribution.</p><h4>Understanding the Git File System 🌳</h4><p>At the heart of Git lies its file system, where all the magic happens. Git organizes files and their changes in a hierarchical structure composed of four essential objects: blobs, trees, commits, and tags.</p><p><strong>🌱 Blobs:</strong> The Git file system represents each file as a blob. Blobs store the contents of individual files and are identified by a unique SHA-1 hash. But wait, there’s a twist! Git has transitioned to using the even more secure SHA-256 algorithm for hashing, adding an extra layer of enchantment and security. 🪄✨</p><p>🌲 <strong>Trees</strong>: Git organizes blobs into trees, which resemble directories. A tree contains references to blobs and other trees. It represents the structure of files within a directory and helps maintain their relationships.</p><p>🌿 <strong>Commits</strong>: A commit captures a specific state of the project at a given time. It holds a reference to a tree, author information, commit message, and the SHA-1 hash of the previous commit, creating a magical chain of commits over time.</p><p>🔖 <strong>Tags</strong>: Tags provide a way to mark specific commits as significant milestones, such as releases or major changes. They offer a more meaningful and expressive way to navigate through Git history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*KFU0QVMcJv-etV1OhQHk5g.png" /></figure><h4>The Mystical SHA-256 Algorithm 🔢🔒</h4><p>SHA-256, the Secure Hash Algorithm 256-bit, is a cryptographic hash function that takes an input and produces a fixed-size hash value, consisting of 256 bits. It’s like a magical spell that transforms any file, directory or commit into a unique hash. With its subtle yet powerful nature, SHA-256 ensures the integrity and security of Git repositories, protecting them from unauthorized changes or tampering. 🧙‍♂️🔐</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xJ15M5ytSHmUDmcxgyDM4g.png" /></figure><h4><strong>Adding a Touch of Subtle Magic ✨🎩</strong></h4><p>In the realm of Git and GitHub, even the smallest details can add a touch of whimsy and charm to your projects. One such enchanting feature is the use of emojis. Emojis can be sprinkled subtly in commit messages, pull request discussions, or README files to convey emotions, add personality, or enhance the overall experience. However, using them judiciously and avoiding excessive distraction is important, as subtlety is the key to their magical effect. ✨🪄</p><h4>Conclusion 🎉</h4><p>As we conclude our magical journey into the realms of Git and GitHub, we’ve uncovered the inner workings of the Git file system, danced with the SHA-256 algorithm, and discovered the subtle charm of emojis. Armed with this knowledge, you’re now better equipped to navigate the Git landscape and harness the power of version control and collaboration.</p><p>Remember, Git and GitHub are not just tools; they are a canvas for developers to express their creativity, share their passion, and weave their unique spells.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cc2363ab298" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What if? You can see radio waves.]]></title>
            <link>https://roboticsbydev.medium.com/what-if-you-can-see-radio-waves-e9773a7817b?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9773a7817b</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Fri, 28 Apr 2023 05:11:58 GMT</pubDate>
            <atom:updated>2023-04-28T05:13:03.728Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey, I am back with another disturbing fact😆. Have you ever 🤔 stopped to wonder what a signal actually is and how it got its name? It’s fascinating to think that all around us are invisible waves carrying information 🌊—from our phone signals, 📱 and WiFi 📡, to satellite signals, 🛰️. Imagine if we could actually see these signals in real life—it would be mind-blowing! However, the human brain might struggle to process all of that information at once! 🤯</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4JbQS457B-vU80cs.jpg" /><figcaption>A simple wave</figcaption></figure><p>Have you ever wanted to generate and visualize 👾signals? Well, hold on tight because we’re going to dive into some signal generation fun! In this post, we’ll be generating and plotting simple signals, adding noise to them, and using the &quot;few signals&quot; concept. 👨‍💻🚦🌐🫣🍕</p><h4>Fun Part:</h4><p>Have you ever tried this on your Linux PC?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*ZhK0W85XfU9TSSB8.gif" /></figure><h4>Generating and plotting simple signals :</h4><p>Let’s start by generating and plotting a simple signal. For this example, we’ll generate a sine wave🛜 with a frequency of 5 Hz. Here’s the code to generate and plot the signal using Python and the matplotlib</p><pre>import numpy as np<br>import matplotlib.pyplot as plt<br># Define the time range.<br>t = np.linspace(0, 1, 1000)<br># Define the frequency of the sine wave<br>f = 5<br># Generate the sine wave<br>sin_wave = np.sin(2 * np.pi * f * t)<br># Plot the sine wave<br>plt.figure(figsize=(2,10))<br>plt.plot(t, sin_wave)<br>plt.title(&#39;Simple Sine Wave&#39;)<br>plt.xlabel(&#39;Time (s)&#39;)<br>plt.ylabel(&#39;Amplitude&#39;)<br>plt.show()</pre><p>When you run this code, you’ll see a plot of the sine wave. Simple, right? but we’re just getting started.🤓</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*DSkfLrdgGItaQ0dM5zHBpQ.png" /></figure><h4>Frequency:</h4><p>The number of signal units per second is termed the &quot;frequency.&quot; If the frequency is 1 Hz, then there will be 1 signal unit per second. In the above example, we have used a frequency of 5 Hz. 👁️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*41GZDZftl_quFFsKM2hkfw.png" /><figcaption>1 Hz frequency</figcaption></figure><h4>Adding noise to signals (🔊)</h4><p>Let’s add some noise to our simple signal to make things more interesting. We’ll use🐍 Python’snumpy library to generate some random noise and add it to our sine wave. Here’s the updated code.</p><pre># Define the signal-to-noise ratio.<br>snr = 5<br><br># Generate some noise.<br>noise = np.random.randn(len(t))<br># Calculate the power of the signal and noise.<br>signal_power = np.sum(sin_wave ** 2) / len(sin_wave)<br>noise_power = np.sum(noise ** 2) / len(noise)<br># Scale the noise to the desired SNR.<br>scale_factor = np.sqrt(signal_power / (noise_power * snr))<br>scaled_noise = noise * scale_factor<br># Add the noise to the sine wave.<br>noisy_sin_wave = sin_wave + scaled_noise<br># Plot the noisy sine wave.<br>plt.figure()<br>plt.plot(t, noisy_sin_wave)<br>plt.title(&#39;Noisy Sine Wave&#39;)<br>plt.xlabel(&#39;Time (s)&#39;)<br>plt.ylabel(&#39;Amplitude&#39;)<br>plt.show()</pre><p>In this code, we’ve defined a signal-to-noise ratio (SNR) of 5. We’ve also generated some random noise using the randn function from the numpy library. We then calculate the power of the signal and noise, and scale the noise to the desired SNR using a scale factor. Finally, we add the scaled noise to the sine wave to create a noisy signal.🔊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*fBjIx_VqdAgbR4pFEdH1fA.png" /></figure><p>When you run this code, you’ll see a plot of the noisy sine wave. It’s still a sine wave, but with some added randomness.</p><h4>Conclusion</h4><p>Hopefully, this post has helped you understand the basics of signal generation and processing. Keep on grooving to the beat of eccentricity!🎸</p><p>Stay tuned while we try to filter the noise from the signal using filters and visualize it in the frequency📑 domain.</p><p>Ping me on <a href="http://linkedin.com/in/dev-ansh-r">LinkedIn</a> for any further assistance. Seeeeee yaa! 😁👋 and I am also attaching a Google <a href="https://colab.research.google.com/drive/1P1yRa2AxDfOYpAqU-CG0JGq2ciVib8Nc?usp=sharing">collab</a> link for any further reference.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9773a7817b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Down the Network Cycle]]></title>
            <link>https://roboticsbydev.medium.com/breaking-down-the-network-cycle-d2650a9b3302?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2650a9b3302</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[radio]]></category>
            <category><![CDATA[ip]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Mon, 17 Apr 2023 04:50:05 GMT</pubDate>
            <atom:updated>2023-04-17T04:51:55.214Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever wondered how the internet ⁉️🛜 works or how data travels from one device to another, you’ve come to the right place! In this blog, we’ll explore the basic concepts of networks and break down the different components involved.</p><p>Now hold on a damn second👾👨‍💻, This blog will not contain a detailed infrastructure of the network but a simple analogy to help you and me understand this concept better. So let&#39;s dive🤿🏊 into the world of networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PkNXE0BqgO7mkQJ7.png" /><figcaption>Believe me I didn’t drew this 🌗</figcaption></figure><h4>Switches🚦</h4><p>Let’s start with switches. A switch is a device that connects multiple devices together in a local network. It acts like a traffic controller, making sure that data packets are delivered to the correct destination device. For example, if you want to send a file to your friend who’s also connected to the same switch, the switch will make sure that the file is delivered to their device using their MAC address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/0*SfY98fdgEAXK1t5y.png" /></figure><h4>Routers</h4><p>Now, let’s move on to routers. A router is a device that connects multiple networks together. It’s like a post office, directing data packets to the correct destination network. For example, if you want to send an email to your friend who’s connected to a different network, the router will make sure that the email is delivered to their network using their IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*trCZksqCcsLXkPs1.jpg" /><figcaption>We all know this so its a better image…. 😜</figcaption></figure><h4>Access Points 📶</h4><p>Access points are devices that allow wireless devices to connect to a wired network. They act like a bridge between the two types of networks, making it possible for you to connect to the internet using Wi-Fi. For example, if you’re using a laptop or a smartphone to connect to the internet, you’re most likely using an access point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54Rv4hqoNzQ6HoUI8_IjPQ.jpeg" /><figcaption>Buddy, I am an Artist 😆</figcaption></figure><h4>Gateways 🔑</h4><p>A gateway is a device that connects a local network to the internet. It’s like a portal, allowing you to access the internet from your local network. For example, if you’re using a home Wi-Fi network, your router is acting as a gateway to the internet.</p><h4>Analogy</h4><p>Let’s say you’re at home, connected to your Wi-Fi network. You want to send a message to your friend who’s also at home and connected to the same network. You would use your device’s MAC address to send the message, and the switch would make sure that it was delivered to your friend’s device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*Zraa22h7CQtOBR0f.gif" /></figure><p>Now, let’s say you want to send a message to a friend who’s not at home and is connected to a different network. You would use your friend’s IP address to send the message, and your router would make sure that it was delivered to their network.</p><h4>Happy Ending 🎃</h4><p>Networks may seem complicated, but they’re actually just a series of interconnected devices working together to make it possible for you to connect to the internet and communicate with others. Understanding the basic concepts of switches, routers, access points, and gateways can go a long way toward demystifying the workings of networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*swlWKm_-t6tVmRa6.gif" /></figure><p>So, the next time you’re streaming a movie or sending a message to a friend, remember that it’s all thanks to the magic of networks! 🎉 and also to know more about me, ping me at <a href="http://www.linkedin.com/in/dev-ansh-r">linkedin</a>. 🍡🍡</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2650a9b3302" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction guide to cellular Networks]]></title>
            <link>https://roboticsbydev.medium.com/introduction-guide-to-cellular-networks-6926fa4e3b5f?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/6926fa4e3b5f</guid>
            <category><![CDATA[cellular-network]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 11:55:42 GMT</pubDate>
            <atom:updated>2023-04-13T12:20:14.201Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey folks! 😎I will make you an offer you can’t refuse. 🤓 “Give me your 3 mins and you will never see the world of networks the same again.&quot;</p><p>Let’s talk a little about the origins of mobile phones and why they came to be known by that name. 📲</p><h4>History of Cellular Networks and Phones🕰️</h4><p>Cellular networks were first introduced in the 1980s. The <strong>first generation</strong> of cellular networks, or 1G, allowed for voice communication only 🗣️. The <strong>second generation</strong>, or 2G, enabled text messaging 📩, and the <strong>third generation</strong>, or 3G, brought internet access to mobile phones 📲. Currently, we are using the <strong>fourth generation</strong>, or 4G, which is much faster and more efficient than its predecessors. The fifth generation, or 5G, has also been introduced and is set to revolutionize the mobile industry with its high-speed data transfer rates, low latency, and massive connectivity capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*8SzGzkCuiHSHn3LrQJElQg.jpeg" /></figure><h4>🛠️ Components of Cellular Networks</h4><p>Cellular networks consist of several components, including the mobile device 📱, cell towers 🗼, and the core network 💻. The mobile device connects to the cell towers through radio waves 📡. The cell towers receive and transmit signals to and from the mobile device 📶. The core network, which is responsible for managing the overall network, includes servers, switches, and routers 🌐.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*FDjvEGnf2aKUQfYo_mAtzQ.png" /></figure><p>The mobile phone sends electromagnetic waves to nearby cell phone towers (each tower consists of several antennas for propagation ). The signal then travels to a nearby base station in a wired medium, If not complicating things, the base station will send it to the MSC( main switching center), which switches the signal to send it to the receiver’s base station and then to the receiver’s phone. Since the connection doesn’t terminate, it got the name Mobile (moving).</p><h4>🔬 Technologies used in Cellular Networks</h4><p>There are several technologies used in cellular networks, including CDMA 📶, GSM 🌍, and LTE 📶. CDMA (Code Division Multiple Access) allows multiple users to share the same frequency band by assigning each user a unique code 🆔. GSM (Global System for Mobile Communications) uses time division multiple access (TDMA) to divide a frequency into time slots, which are then assigned to different users. LTE (Long-Term Evolution) uses orthogonal frequency division multiple access (OFDMA) to divide a frequency band into subcarriers, which are then assigned to different users.</p><h4>🔳 Hexagonal Cells</h4><p>Cell towers are arranged in a pattern of hexagonal cells (🟣🟢🔵), which are designed to cover a specific area and provide overlapping coverage. This helps to minimize signal interference and ensure consistent connectivity as users move between cells.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/0*fTAOBbZOJ3lZmVwV.gif" /></figure><h4>🚀 5G Networks</h4><p>5G networks are designed to offer significantly faster data transfer rates, lower latency, and greater capacity than 4G networks. They use advanced technologies such as massive MIMO (multiple input, multiple output), which uses multiple antennas to communicate with multiple users simultaneously, and network slicing, which allows the network to be divided into virtual slices to provide customized services for different applications.</p><h4>💡 Conclusion</h4><p>Cellular networks have revolutionized the way we communicate and access the internet. 📲🌐. Understanding the core concepts of cellular networks, including CDMA, OFDMA, and hexagonal cells, is essential for anyone interested in the mobile industry. With the advent of 5G networks, we can expect even faster internet speeds, lower latency, and greater capacity, which will enable new applications and services that were previously not possible. 🚀.</p><p>Ping me on <a href="https://www.linkedin.com/in/dev-ansh-r/">LinkedIn</a> for any further assistance. Seeeeee yaa!!! 😁👋🏾😁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6926fa4e3b5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I hope You understand these Linux commands]]></title>
            <link>https://roboticsbydev.medium.com/i-hope-you-understand-these-linux-commands-435674d1e53e?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/435674d1e53e</guid>
            <category><![CDATA[kernel]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Wed, 05 Apr 2023 15:52:05 GMT</pubDate>
            <atom:updated>2023-04-05T15:52:05.027Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey folks!! The skeleton 🦴💀 is back with one more helpful blog for the Linux enthusiast. I have been a Linux user since 2015 when I received my very first Phone😁😂. <em>Just kidding!!</em> I mean, not directly, but we have all been using Linux ever since we started using an Android phone👨‍💻. If you didn&#39;t get the joke <a href="https://www.linkedin.com/in/dev-ansh-r">message</a> me bro….😂💀</p><h4>What is sudo apt? I mean you all keep using that🫤🙄</h4><p><strong>APT (Advanced Package Tool)</strong> is a package manager used on Debian-based Linux distributions, such as Ubuntu, Linux Mint, and Debian. APT makes it easier to manage software packages on the system, including their dependencies and updates, and to install, remove, and manage them.</p><p>Imagine that you are the owner of a <strong>pizza</strong>🍕 restaurant, and you have a lot of different ingredients that you use to make your pizzas. You have cheese🧀, pepperoni, mushrooms🍄, onions, and many more toppings.</p><p>Now, imagine that <strong>APT</strong> is your assistant chef 👨🏻‍🍳. Every day, APT checks the inventory of your ingredients and makes a list of the ones that are running low. Then, APT goes to the grocery store and buys more of those ingredients, as well as any new ingredients that you might need for a new pizza recipe.</p><pre>sudo apt update // This will fetch the updated packages from APT<br>sudo apt-get upgrade //This shall update the package in our local machine</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yyE-jPNDTj3uIVu8DDEoew.png" /></figure><h4>What is PPA?🫣</h4><p><strong>Personal Package Archive</strong>, or PPA, is an unofficial package manager😩 where developers can add programmes that have not been approved by the official Linux developers but that you can still install and use.</p><p>To add a PPA (Personal Package Archive) to a Debian-based Linux system, you can use the add-apt-repositorycommand, which simplifies the process of adding the repository&#39;s GPG key and updating the package list.</p><p>Here are the steps to add a PPA:👾</p><ol><li>Open a terminal window on your system.👨‍💻</li><li>Execute the following command to install the software-properties-common package, which includes the add-apt-repository command:</li></ol><pre>sudo apt-get update<br>sudo apt-get install software-properties-common</pre><ol><li>Once the package is installed, use the add-apt-repository command to add the PPA. For example, if you want to add the PPA for the OpenJDK builds team, you can use the following command:😎</li></ol><pre>sudo add-apt-repository ppa:openjdk-r/ppa</pre><p>This command adds the openjdk-r/ppa PPA to your system.</p><ol><li>After executing the command, the system will prompt you to confirm the addition of the PPA. Type ‘Enter’ to confirm the addition.</li><li>Once the PPA is added, update the package list using the following command:😎</li></ol><pre>sudo apt-get update</pre><p>That’s it! The PPA should now be added to your system, and you can use apt-get or aptitude to install packages from the new repository.</p><h4>CURL ?????🤔</h4><p>curl is a command-line tool for transferring data from and to servers. It supports a wide range of protocols, including HTTP, FTP, SMTP, and more. curl is commonly used for downloading files, sending requests to web APIs, and automating system tasks</p><pre>curl https://www.google.com  //curl (url) this will return html file of the result</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PCGPh3ymjyVNWvjaOIyKjQ.png" /></figure><h4>Must Knows: Few cmd that would make you look cool😎</h4><p>Here are a few must-know Linux commands:🤯</p><ol><li>ls: List directory contents</li><li>cd: Change directory</li><li>mkdir: Make directory</li><li>rm: Remove files and directories</li><li>cp: Copy files and directories</li><li>mv: Move or rename files and directories</li><li>cat: Concatenate and display files</li><li>grep: Search for a pattern in a file</li><li>chmod: Change file permissions</li><li>chown: Change file ownership</li><li>sudo: Execute a command as the superuser</li><li>ssh: Connect to a remote server using Secure Shell protocol</li><li>tar: Archive files and directories</li><li>apt-get: Install, remove, or update software packages</li><li>df: Display disk usage information</li><li>ps: Display currently running processes</li><li>top: Display system resource usage in real-time</li><li>ping: Test network connectivity to a server</li><li>netstat: Display network connections and routing tables</li><li>history: Display command history</li></ol><p>These are just a few of the most commonly used Linux commands. There are many more commands available, depending on your needs and requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*VwCdq8N5zzNU36jzmlsEhw.png" /></figure><p>Try these commands and let me know……🤓🤓</p><p>Ping me on <a href="https://www.linkedin.com/in/dev-ansh-r/">LinkedIn</a> for any further assistance. Seeeeee yaa!!! 😁👋🏾😁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=435674d1e53e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello Kernel !!]]></title>
            <link>https://roboticsbydev.medium.com/hello-kernel-3cd92868220?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cd92868220</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[kernel]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[linus-torvalds]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 13:33:59 GMT</pubDate>
            <atom:updated>2023-04-05T15:50:22.626Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hello Kernel !!</h3><p>When it comes to operating systems, one name stands out above the rest: <strong>Linux</strong>. 🤯The kernel is the essential part 💪 of Linux that manages hardware resources and acts as a mediator between software 👩‍💻 applications and hardware 💻. It plays a critical role in operating the system.</p><p>The kernel of Linux was created by <strong>Linus Torvalds, </strong>my inspiration<strong>, </strong>in <em>1991</em>, and it has since become one of the most important pieces of software in the world. In this blog post, we’ll dive deeper into the kernel and explore its role in the Linux operating system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*vlkj74DcOY0QjNFItwLYDg.jpeg" /></figure><h3>What is a Kernel?</h3><p>A kernel is a software program that sits at the core of an operating system and acts as a bridge between software and hardware. It is responsible for managing the resources of a computer system, including the CPU, memory💾, and I/O devices such as keyboards⌨️, mice🖱, and printers.🖨</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*w70c7GSb2ulEGfyjLQqLng.jpeg" /><figcaption>Kernel working</figcaption></figure><p>The kernel also provides a layer of abstraction between software applications and the hardware, allowing programs to interact with the hardware without needing to know the specifics of the underlying hardware.</p><h3>The Linux Kernel</h3><p>The Linux kernel is an<strong> open-source project</strong>🌐 that was started by Linus Torvalds in 1991. The first version of the Linux kernel was released in 1994, and since then, it has been continuously developed and improved by a global community of developers. It actually started as a hobby 😆 and eventually became the most loved project for us developers. 🧑🏽‍💻👽</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*2McV6w_fOnhRoaUZx6KP0w.png" /><figcaption>Ways to check your kernel specs</figcaption></figure><p>The Linux kernel is distributed under the GNU General Public License, which means that it is free to use, modify, and distribute. This has helped to make Linux one of the most popular operating systems in the world, particularly in the server and embedded systems markets.</p><p>Thanks to this, we have several Linux distros such as <strong>Ubuntu</strong>, CentOS, Fedora, OpenSUSE, Elementary OS, Linux Mint, POP OS, and more. I tried most of them👾👾</p><h3>The Structure of the Linux Kernel</h3><p>The Linux kernel is a monolithic kernel, which means that all of the kernel functionality is contained in a single executable file. This differs from a microkernel, which separates the kernel into smaller modules that can be loaded and unloaded dynamically. 🤖 I won’t make it complicated; let&#39;s make it simple!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*sKLDDEdenqyHSdbA4_Hllw.png" /></figure><p>The Linux kernel is divided into several layers, each of which provides a different set of services. These layers include the hardware abstraction layer, the system call interface, the process management layer, the file system layer, and the networking layer. 🕸📨</p><p>The hardware abstraction layer is responsible for interacting with the hardware of the system and providing a consistent interface to the rest of the kernel. The system call interface provides a mechanism for applications to interact with the kernel and request services such as file I/O and process management.</p><p>The process management layer is responsible for creating and managing processes, which are the running instances of applications on the system. The file system layer provides a virtual file system interface to applications, allowing them to access files and directories on the system.</p><p>Finally, the networking layer is responsible for managing network connections and providing a network interface to applications.</p><p>In general, the kernel does read and write operations at different layers/levels. I would recommend using Linux 🐧🐧 to understand better the concepts of Operating Systems, Kernel etc.</p><h3>Conclusion</h3><p>The Linux kernel is a critical component of the Linux operating system, and it is responsible for managing the resources of a computer system and providing a layer of abstraction between software applications and hardware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*hM3YHS8kIOq-W5g98X5nMg.png" /></figure><p>With its open-source license and global community of developers, the Linux kernel has become one of the most popular and widely used operating system kernels in the world. Its continued development and evolution ensure that Linux will remain a vital and relevant operating system for years to come.</p><h4>Git repo : <a href="https://github.com/torvalds/linux">https://github.com/torvalds/linux</a> 😉🤫Have Fun.</h4><p>Ping me on <a href="https://www.linkedin.com/in/dev-ansh-r/">LinkedIn</a> for any further assistance. Seeeeee yaa!!! 😁👋🏾😁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cd92868220" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write Arduino-code without Arduino-IDE]]></title>
            <link>https://roboticsbydev.medium.com/write-arduino-code-without-arduino-ide-14cf6021e816?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/14cf6021e816</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[arduino-ide]]></category>
            <category><![CDATA[makefile]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 04:32:11 GMT</pubDate>
            <atom:updated>2023-03-29T06:03:05.962Z</atom:updated>
            <content:encoded><![CDATA[<p>Yes, we are doing it today. In order to better understand it, we will take the difficult route. 🎓🎓 Also, it&#39;s <strong>Arduino Day. woohooo</strong>🥳🥳</p><p>The Arduino ♾️ is a widely used platform for building electronic projects, and the Arduino Integrated Development Environment (IDE) is the most popular way to write and upload code to an Arduino board. However, there are other ways to write Arduino code that don’t require the IDE. In this blog, we will discuss two alternative methods for writing Arduino code.</p><p>⚠️⚠️I use <strong>Linux Ubuntu (22.04 LTS).</strong> Commands may vary for other operating systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*LZnXBJ0Y9qgQazy8mf8JQg.jpeg" /><figcaption>I am writing the blog on the same day</figcaption></figure><h4>1️⃣ Method 1: Using Linux terminal to imitate an Arduino Makefile</h4><p>The Arduino IDE is built on top of a command-line tool called “avr-gcc”, which is used to compile and upload code to the Arduino board. By using the terminal, we can imitate an Arduino makefile to compile and upload the code to the board.</p><p>Here are the steps to follow:</p><p><strong>Step 1</strong>: Install the required tools🧰</p><p>To compile and upload code to the Arduino board, we need to install the avr-gcc toolchain, avrdude, and make. We can install these tools on Ubuntu or Debian by running the following command:</p><pre>sudo apt-get install gcc-avr avr-libc avrdude make</pre><p><strong>Step 2</strong>: Create a new file 📁</p><p>Create a new file in your favorite text editor (Nano, Vim, gedit) and save it with a “.c” extension. For example, if you want to create a program to blink an LED connected to pin 13, you can create a file called “blink.c” with the following code:</p><p>I have a folder called “Projects” that I will use to organize my files. You may choose whatever suits you. .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*xAou7ekCEhuZ-Hkb" /></figure><p>blink.c looks like this:</p><pre>#include &lt;avr/io.h&gt;<br>#include &lt;util/delay.h&gt;<br>int main(void)<br>{<br> DDRB |= (1 &lt;&lt; PB5); // Set pin 13 as an output, refer schematics for the port configs<br> while (1) {<br> PORTB ^= (1 &lt;&lt; PB5); // Toggle pin 13<br> _delay_ms(500);<br> }<br> return 0;<br>}</pre><p><strong>Step 3</strong>: Create a makefile 📁</p><p>Create a new file called “Makefile” in the same directory as your “blink.c” file, and add the following code:</p><pre>MCU = atmega328p<br>F_CPU = 16000000UL<br>PROGRAMMER = arduino<br>PORT = /dev/ttyACM0<br>CC = avr-gcc<br>CFLAGS = -Wall -Os -DF_CPU=$(F_CPU) -mmcu=$(MCU)<br>OBJCOPY = avr-objcopy<br>OBJCOPYFLAGS = -j .text -j .data -O ihex<br>AVRDUDE = avrdude<br>AVRDUDEFLAGS = -p $(MCU) -c $(PROGRAMMER) -P $(PORT)<br>all: blink.hex<br>blink.hex: blink.elf<br> $(OBJCOPY) $(OBJCOPYFLAGS) $&lt; $@<br>blink.elf: blink.o<br> $(CC) $(CFLAGS) -o $@ $&lt;<br>blink.o: blink.c<br> $(CC) $(CFLAGS) -c $&lt;<br>upload: blink.hex<br> $(AVRDUDE) $(AVRDUDEFLAGS) -U flash:w:$&lt;<br>clean:<br> rm -f blink.o blink.elf blink.hex</pre><p><em>Err: Don’t use space, instead use Tab in the necessary places, or else you may arrive at the following error message :</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/0*Ho47F6wKFsG7m5pJ" /></figure><p><strong>Step 4</strong>: Compile and upload the code 🗃️</p><p>Open a terminal and navigate to the directory where your “blink.c” and “Makefile” files are located. Run the following command to compile the code:</p><pre>make</pre><p><strong>Terminal output for make</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/0*0mv6YclCMSM0dxZj" /></figure><p>This will generate a “.hex” file in the same directory. To upload the code to the Arduino board, run the following command:</p><pre>make upload</pre><p><strong>Terminal output for upload:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*NMLrcj8ECFjSQTrA" /></figure><p>This will upload the code to the board using the specified programmer and port.</p><p>Here are a few commands that might be useful if you are a beginner to Linux:</p><p>To view the arduino port and provide read/write access to the user, You can use 777 to give all users the same rights</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/0*Rh_gpdzBdp229cBf" /></figure><h4>2️⃣️ Method 2: Using VSCode Arduino Extension</h4><p>VSCode (Visual Studio Code) is a popular code editor that supports many programming languages, including Arduino. The VSCode Arduino extension provides a powerful and easy-to-use environment for writing and uploading Arduino code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*YqINbXsuNrZd6vVS" /></figure><p><strong>Steps: </strong>Create a folder, add two files, blink.ino, and Makefile. They are the same as in the previous method. 🗄️🗃️📁</p><p>⚠️ The name of “*.ino” file should be similar to that of the folder name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*XvrtT1pXgetyPlIh" /></figure><p>Verify and upload the code similar to arduino-ide using the icons on top right corner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/0*H1irikjH6d36LA8E" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/0*nJ6XLna54igP7GYo" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*BRiKs4t1iT5-529J" /></figure><h4>3️⃣ Method 3: Using Raspberry Pi with Arduino.mk</h4><p>If you have a Raspberry Pi, you can use it to compile and upload Arduino code using the Arduino.mk “Makefile”. This method requires a bit of setup, but once it’s done, it provides a flexible and powerful way to develop Arduino projects.</p><p>Here are the steps to follow:</p><p><strong>Step 1</strong>: Install the required tools🧰</p><p>On your Raspberry Pi, install the required tools by running the following command:</p><pre>sudo apt-get install arduino arduino-mk</pre><p>This will install the Arduino IDE and the Arduino.mk Makefile.</p><p><strong>Step 2</strong>: Create a new project directory 🗄️</p><p>Create a new directory for your Arduino project by running the following command:</p><pre>mkdir blink</pre><p><strong>Step 3</strong>: Create a new file 📁</p><p>Create a new file in your favorite text editor and save it with a “.ino” extension. For example, if you want to create a program to blink an LED connected to pin 13, you can create a file called “blink.ino” with the following code:</p><p>The code is similar to the arduino code of method 2.</p><pre>void setup() {<br> pinMode(13, OUTPUT);<br>}<br>void loop() {<br> digitalWrite(13, HIGH);<br> delay(500);<br> digitalWrite(13, LOW);<br> delay(500);<br>}</pre><p><strong>Step 4</strong>: Create a Makefile 📁</p><p>Create a new file called “Makefile” in the same directory as your “blink.ino” file, and add the following code:</p><pre>BOARD_TAG = uno<br>ARDUINO_PORT = /dev/ttyACM0<br><br>include /usr/share/arduino/Arduino.mk</pre><p>This Makefile specifies the board and serial port to use, and includes the Arduino.mk Makefile.</p><p><strong>Step 5</strong>: Compile and upload the code 🗃️</p><p>Open a terminal and navigate to the directory where your “blink.ino” and “Makefile” files are located. Run the following command to compile the code:</p><pre>make</pre><p>This will generate a “.hex” file in the same directory. To upload the code to the Arduino board, run the following command:</p><pre>make upload</pre><p>This will upload the code to the board using the specified serial port.</p><p>That’s it! With these steps, you can write and upload Arduino code using the Raspberry Pi and the Arduino.mk Makefile. This method can also be used with other Arduino-compatible boards, as long as you specify the correct board and serial port in the Makefile.</p><p>Run the following command after uploading if you want to reuse the code:</p><pre>make clean monitor upload</pre><p>Additionally, a serial monitor using “Screen” would be opened. This will be covered in later blogs.</p><p><a href="https://github.com/dev-ansh-r/Arduino_without_IDE">You can find the repository here.</a></p><p>Ping me on <a href="https://www.linkedin.com/in/dev-ansh-r/">LinkedIn</a> for any further assistance. Seeeeee yaa!!! 😁👋🏾😁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14cf6021e816" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get started with Flysky FS-iA10B and FS-TH9X]]></title>
            <link>https://roboticsbydev.medium.com/get-started-with-flysky-fs-ia10b-and-fs-th9x-3f1977f483cc?source=rss-499231f3ae43------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f1977f483cc</guid>
            <category><![CDATA[fs-th9x]]></category>
            <category><![CDATA[arduino-ide]]></category>
            <category><![CDATA[drones]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[diy]]></category>
            <dc:creator><![CDATA[Devansh Shukla]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 04:31:41 GMT</pubDate>
            <atom:updated>2023-03-27T04:31:41.440Z</atom:updated>
            <content:encoded><![CDATA[<p>Ah, yes! 🔥 Let’s get funky with this blog post about the Flysky FS-iA10B and FS-TH9X! 🛩️ If you’re a cool cat like me, 😎, and you’re into RC models, drones, and DIY projects, then you’re in for a treat! We’re going to show you how to read values from the Fly sky FS-iA10( similar for FS-iA6) receiver using an Arduino UNO board and print the values of each channel. And we’re going to do it in a way that’s just a little bit…eccentric. 🤪 A funny attempt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s4BKYYeFVU4hhKZV" /><figcaption>Photo by <a href="https://unsplash.com/@jakobowens1?utm_source=medium&amp;utm_medium=referral">Jakob Owens</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>First things first, let’s get groovy with the basics. 🤘 The Fly Sky FS-iA10B receiver and FS-TH9X transmitter are like two peas in a pod. They work together to send signals to the servo motors in your project. These signals are pulses, baby! 👶 . The modulation technique used here is PPM (Pulse Position Modulation).</p><p>And the length of the pulse tells the servo motor where to go. Each channel controls a different servo motor, so you&#39;ve got to keep it all straight, man. 👨‍🎤</p><p>To read the values from the Flysky FS-iA10B receiver using an Arduino UNO, we gotta make some connections. Follow these steps, and you’ll be as cool as a cucumber: 🥒</p><h4><strong>Step 1</strong>:</h4><p>Connect the Flysky FS-iA10B receiver to the Arduino UNO board. This is where the magic happens! ✨</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tNSHJMVRlCLY9HPssovrYw.jpeg" /></figure><ol><li>Hook up the ground pin of the receiver to the GND pin on the Arduino board. Keep it grounded, man. 🌎</li><li>Connect the signal pins of the receiver to the digital pins on the Arduino board. If you’re jammin’ on channel 1, plug it into digital pin 2. 🔌</li></ol><p><strong>( CH1 -&gt; Arduino 2, VCC -&gt; 5V arduino, GND -&gt; GND )</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hqoEXZa7xkl9soqakIxWMw.jpeg" /></figure><h4>Step 2:</h4><p>Read the values from the Flysky FS-iA10B receiver using an Arduino Uno. This is where we get our groove on! 🎶</p><p>2.1. Fire up the Arduino IDE and start a new sketch. Time to get creative! 🎨</p><p>2.2. Set the pins you connected to the receiver as input pins. Use the <strong>pinMode() </strong>function to get things rollin’. 🏎️</p><p>2.3. Read the values from the input pins using the<strong> pulseIn()</strong> function. It’s like listening to the beat, man. 🎧</p><p>2.4. Print the values of each channel using the <strong>Serial.print()</strong> function. Share the love with the world! ❤️</p><p>Here’s the Arduino code to read the values from the Flysky FS-iA10B receiver using Arduino UNO and print the values of each channel: 💻</p><pre>#define CH1_Pin 2 //connect channel 1 to Arduino pin 2<br><br>int CH1_Val; //save the value of the channel 1<br> <br>void setup() {<br>  Serial.begin(115200);<br>  pinMode(CH1_Pin,INPUT); <br>}<br><br>void loop() {<br>  CH1_Val=pulseIn(CH1_Pin,HIGH); //PulseIn function reads when pin goes high<br><br>  Serial.print(&quot;CH_1:&quot;);<br>  Serial.print(CH1_Val); //Serial Print the value <br>}</pre><p>We can write code that connects the appropriate channel pins to the Arduino board for each channel in a similar way.</p><pre>#define CH1_Pin 2<br>#define CH2_Pin 3<br>#define CH3_Pin 4<br>#define CH4_Pin 5<br>#define CH5_Pin 6<br>#define CH6_Pin 7<br>#define CH7_Pin 8<br>#define CH8_Pin 9<br>#define CH9_Pin 10<br><br>int CH1_Val;<br>int CH2_Val;<br>int CH3_Val;<br>int CH4_Val;<br>int CH5_Val;<br>int CH6_Val;<br>int CH7_Val;<br>int CH8_Val;<br>int CH9_Val;<br><br> <br>void setup() {<br>  Serial.begin(115200);<br>  pinMode(CH1_Pin,INPUT);<br>  pinMode(CH2_Pin,INPUT);<br>  pinMode(CH3_Pin,INPUT);<br>  pinMode(CH4_Pin,INPUT);<br>  pinMode(CH5_Pin,INPUT);<br>  pinMode(CH6_Pin,INPUT);<br>  pinMode(CH7_Pin,INPUT);<br>  pinMode(CH8_Pin,INPUT);<br>  pinMode(CH9_Pin,INPUT);<br>}<br><br>void loop() {<br>  CH1_Val=pulseIn(CH1_Pin,HIGH);<br>  CH2_Val=pulseIn(CH2_Pin,HIGH);<br>  CH3_Val=pulseIn(CH3_Pin,HIGH);<br>  CH4_Val=pulseIn(CH4_Pin,HIGH);<br>  CH5_Val=pulseIn(CH5_Pin,HIGH);<br>  CH6_Val=pulseIn(CH6_Pin,HIGH);<br>  CH7_Val=pulseIn(CH7_Pin,HIGH);<br>  CH8_Val=pulseIn(CH8_Pin,HIGH);<br>  CH9_Val=pulseIn(CH9_Pin,HIGH);<br>  <br>      <br>  Serial.print(&quot;CH_1:&quot;);<br>  Serial.print(CH1_Val);<br>  Serial.print(&quot; CH_2:&quot;);<br>  Serial.print(CH2_Val);<br>  Serial.print(&quot; CH_3:&quot;);<br>  Serial.print(CH3_Val);<br>  Serial.print(&quot; CH_4:&quot;);<br>  Serial.print(CH4_Val);<br>  Serial.print(&quot; CH_5:&quot;);<br>  Serial.print(CH5_Val);<br>  Serial.print(&quot; CH_6:&quot;);<br>  Serial.print(CH6_Val);<br>  Serial.print(&quot; CH_7:&quot;);<br>  Serial.print(CH7_Val);<br>  Serial.print(&quot; CH_8:&quot;);<br>  Serial.print(CH8_Val);<br>  Serial.print(&quot; CH_9:&quot;);<br>  Serial.println(CH9_Val);<br>}</pre><h4>Binding FS-TH9X and Fs-iA10B</h4><p><strong>Error: </strong>If you&#39;ve ordered brand-new TX and RX, they come pre-binned; if not, you can bind a particular transmitter to the receiver.<strong> </strong>Every receiver gets a binding key (something that looks like female-female connecting cables). To connect, simply press the button behind the transmitter and admire the process 🎶 🎶. There are numerous blogs and videos available to assist you.</p><ol><li>The receiver&#39;s B pin is used for binding; GND it to initiate the binding process.</li><li>Once it enters the binding process, the Tx will begin receiving binding requests; press that button behind the Transmitter to initiate binding.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f1sh8VDlx-sbUtmbBq6DzQ.jpeg" /><figcaption>The B pin in the Receiver is for Binding, GND it to start the binding Process.</figcaption></figure><p>Ping me on <a href="https://www.linkedin.com/in/dev-ansh-r/">LinkedIn</a> for any further assistance. Seeeeee yaa!!! 😁👋🏾😁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f1977f483cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>