<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog | Utkarsh's Blogs</title><link>https://utkarsh-blogs.netlify.app/blog/</link><atom:link href="https://utkarsh-blogs.netlify.app/blog/index.xml" rel="self" type="application/rss+xml"/><description>Blog</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><image><url>https://utkarsh-blogs.netlify.app/media/icon_hu68170e94a17a2a43d6dcb45cf0e8e589_3079_512x512_fill_lanczos_center_3.png</url><title>Blog</title><link>https://utkarsh-blogs.netlify.app/blog/</link></image><item><title>Reinforcement Learning Series [01] - An introduction to RL</title><link>https://utkarsh-blogs.netlify.app/blog/rl_01/</link><pubDate>Mon, 27 Jan 2025 00:00:00 +0000</pubDate><guid>https://utkarsh-blogs.netlify.app/blog/rl_01/</guid><description>&lt;p>This will be series of articles based on the notes that I had made when I was learning RL from the &lt;a href="https://www.youtube.com/playlist?list=PLqYmG7hTraZDVH599EItlEWsUOsJbAodm" target="_blank" rel="noopener">Reinforcement Learning Course by David Silver&lt;/a> from &lt;a href="https://deepmind.google/" target="_blank" rel="noopener">Google DeepMind&lt;/a>. The articles are not just repetitions of the content delivered in the course, but my versions of the topics and how I understood them.&lt;/p>
&lt;p>Since Reinforcement Learning is a very math intensive course, I have broken down the concepts and the mathematical equations to layman terms and explained them in my own words so as to make them as simple as possible.&lt;/p>
&lt;p>In addition to the course by David Silver, I had also used the book titled, &amp;ldquo;&lt;strong>An Introduction to Reinforcement Learning&lt;/strong>&amp;rdquo; by Sutton and Barto which is like a bible for any beginner who wants to get into this field. This book tries to explain the mathematical concepts with as many real like example as possible. Online version of the book can also be found &lt;a href="http://incompleteideas.net/book/RLbook2018.pdf" target="_blank" rel="noopener">here&lt;/a>.&lt;/p>
&lt;h2 id="introduction-to-reinforcement-learning">Introduction to Reinforcement Learning&lt;/h2>
&lt;p>Reinforcement Learning are a class of Machine Learning algorithms in which we have an Agent interacting with an Environment; which provides a numeric reward to the agent telling it how good or bad it was performing.&lt;/p>
&lt;p>The goal of the agent in Reinforcement Learning is to learn to take actions in the environment which will maximize the reward. A real life analogous example of RL would be how you would train a puppy. You reward the puppy with a treat when it does what you expected it to do and punish it by not giving the treat when it does not do what you had asked for.&lt;/p>
&lt;p>Following is a simple diagram representing the various entities in Reinforcement Learning:&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="image" srcset="
/blog/rl_01/featured_hu7a0d6210b0c8f61c545a427e8fa0ff7a_15002_52a1b5129b7e47717550ee93dfe996d1.webp 400w,
/blog/rl_01/featured_hu7a0d6210b0c8f61c545a427e8fa0ff7a_15002_4ce514533f6132988f91418e297b3d3d.webp 760w,
/blog/rl_01/featured_hu7a0d6210b0c8f61c545a427e8fa0ff7a_15002_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/rl_01/featured_hu7a0d6210b0c8f61c545a427e8fa0ff7a_15002_52a1b5129b7e47717550ee93dfe996d1.webp"
width="700"
height="270"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Here, at time step &lt;em>&lt;strong>t&lt;/strong>&lt;/em>, the agent was initially in state &lt;em>&lt;strong>Sₜ&lt;/strong>&lt;/em> and thus got a reward &lt;em>&lt;strong>Rₜ&lt;/strong>&lt;/em> by the environment. Based on that reward:&lt;/p>
&lt;ol>
&lt;li>The agent takes an action &lt;em>&lt;strong>Aₜ&lt;/strong>&lt;/em> .&lt;/li>
&lt;li>Based on the action taken, it receives some reward &lt;em>&lt;strong>Rₜ₊₁&lt;/strong>&lt;/em> from the environment in the next time step.&lt;/li>
&lt;li>Then moves on to the next state &lt;em>&lt;strong>Sₜ₊₁&lt;/strong>&lt;/em>.&lt;/li>
&lt;/ol>
&lt;p>This cycle keeps continuing during the entire reinforcement learning process until a termination condition / state is reached.&lt;/p>
&lt;h2 id="difference-between-reinforcement-learning-and-other-machine-learning-algorithms">Difference between Reinforcement Learning and other Machine Learning algorithms&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>A major difference in the case of Reinforcement Learning and other traditional Machine Learning algorithms, especially the Supervised Learning ones is that, there is no &amp;lsquo;Supervisor&amp;rsquo; in this case. No one tells the algorithms about which actions to take. This is just a trial and error paradigm. The best thing to do is not told by anyone and the only way to know if it was a good or a bad action is by looking at the reward signal.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The feedback in Reinforcement Learning is not instantaneous, and is delayed. This means that, if the agent makes a decision now at a current time step, many steps later it will know if it was a good or a bad decision taken previously based on the cumulative reward at the end.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>As we work we sequential decision making in Reinforcement Learning, time really matters. The data which the agent trains upon is highly correlated.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>The actions taken by an agent at the current time step affects the subsequent data that it will receive in the future. An example to understand this would be, if an RL agent is controlling a robot which is moving in a particular direction, based on the action taken by the agent to move the robot in different directions, the data received will be related to those particular directions only.&lt;/p>
&lt;h2 id="the-reinforcement-learning-problem">The Reinforcement Learning Problem&lt;/h2>
&lt;p>&lt;em>In this section, we will be talking about the aspects of a Reinforcement Learning model such as Rewards functions, State functions, Environments etc.&lt;/em>&lt;/p>
&lt;h3 id="reward-functions">Reward Functions&lt;/h3>
&lt;p>The Reward function (&lt;em>&lt;strong>Rₜ&lt;/strong>&lt;/em>) is a scalar feedback signal which indicates how well an agent is doing at any time step &lt;em>&lt;strong>t&lt;/strong>&lt;/em>. The objective of an RL agent is to maximize the cumulative reward. This means that the RL agent will take necessary actions so that the total reward received in the end is as high as possible.&lt;/p>
&lt;p>The concept of Reinforcement Learning is based on the &amp;lsquo;&lt;em>&lt;strong>Reward Hypothesis&lt;/strong>&lt;/em>&amp;rsquo;, which states that : &amp;quot; &lt;em>All goals can be described by the maximization of expected cumulative reward&lt;/em> &amp;ldquo;. In simple terms, every goal has some or the other intermediate reward and the achievement of that particular goal can be done by getting maximum amount of those intermediate rewards. An example for this can be, lets suppose someone&amp;rsquo;s goal is to loose certain amount of weight, the intermediate goal can be working out daily and loosing small amounts of weight each week and by maximising this intermediate rewards each week, the ultimate goal of reducing that certain amount of weight can be achieved over time.&lt;/p>
&lt;h3 id="history-andstate">History and State&lt;/h3>
&lt;p>As analogous to real life, History in RL is a sequence of previous observations, actions reward which happened during the training of the RL model. This is the informations which the RL agent has seen so far. Mathematically, it represents all the observable variables up the current time step &lt;em>&lt;strong>t&lt;/strong>&lt;/em>.&lt;/p>
$$
\mathbf H_t = (\{\mathbf A_1, \mathbf O_1, \mathbf R_1 \}, ...., \{\mathbf A_t, \mathbf O_t, \mathbf R_t \})
$$
&lt;p>
 
What happens next in the Reinforcement Learning is dependent on the history of the model. We aim to develop an algorithm which represents the mapping of the history to the future actions of the model. The agent will learn from the history and accordingly choose actions. Finally, according to the action taken by the agent, the environment will reward or penalize the agent. &lt;/p>
&lt;p>Instead of using history, which is a long piece of information and might be not be completely useful, we use &amp;lsquo;&lt;strong>State&lt;/strong>&amp;rsquo;, to determine what happens next. State is nothing but a function of the History.&lt;/p>
$$
\mathbf S_t = f(H_t)
$$
&lt;h3 id="environment-state">Environment State&lt;/h3>
&lt;p>The Environemnt State (&lt;code>$\mathbf S_{t}^{e}$&lt;/code>) is the private representation of the environment in which the agent is reacting. It represents the data which the environment uses to pick the next observation or reward.&lt;/p>
&lt;p>The reaosn it is called &amp;lsquo;private representation&amp;rsquo; is because, usually this data is not visible to the agent. Even if it might be visible, it may contain data which is irrelevant to the environment.&lt;/p>
&lt;p>When we deal with multi-agent systems in the future, an individual agent can consider all other agents as part of the environment.&lt;/p>
&lt;p>The environment state &lt;code>$\mathbf S_{t}^{e}$&lt;/code> is &lt;strong>Markov&lt;/strong> by definition, what this means, we will discuss in upcoming sections.&lt;/p>
&lt;h3 id="agent-state">Agent State&lt;/h3>
&lt;p>The Agent State &lt;code>$\mathbf S_{t}^{a}$&lt;/code> is the internal representation of the agent in a RL model. It is nothing but a set of numbers inside the agent, which it uses as information to pick its next action. This information is used by the reinforcement learning algortihms. Agent State can be any function of the history.&lt;/p>
$$
\mathbf S_{t}^{a} = f(H_t)
$$
&lt;h3 id="markov-state--information-state">Markov State / Information State&lt;/h3>
&lt;p>Information State (a.k.a Markov State) is a collection of all the useful information from the history which is used by the model to take future decisions.&lt;/p>
&lt;h3 id="markov-property">Markov Property&lt;/h3>
&lt;p>Markov Property states that, any state &lt;code>$\mathbf S_{t}$&lt;/code> is Markov, if and only if,&lt;/p>
$$
\matbh P[\mathbf S_{t+1} | \mathbf S_t ] = \mathbf P[\mathbf S_{t+1} | \mathbf S_1, ..., S_t]
$$
&lt;p>This basically means that, the probability of the occurence of the next state &lt;code>$\mathbf S_{t+1}$&lt;/code> conditioned the given state &lt;code>$\mathbf S_{t}$&lt;/code> is same as the &lt;em>probability of the next state &lt;code>$\mathbf S_{t+1}$&lt;/code> if you show all the previous states to the system&lt;/em>.&lt;/p>
&lt;p>In simple meaning, to find the probability of the next state occuring, you can throw away information about all the previous states and just retain the information about the current state and you will see a similar future. There is a famous line which describes this property which says that &amp;ldquo;&lt;em>&lt;strong>The future is independent of the past given the present&lt;/strong>&lt;/em>&amp;rdquo;.&lt;/p>
&lt;p>Lets take an real-life example to understand this, suppose you want to control a RC helicopter using RL, in such a case, the velocity, angular velocity, angular position and wind speed would all roughly be a markov state of the helicopter. The position or velocity of the helicopter 10 minutes ago doesn&amp;rsquo;t matter or affect the position of the helicopter in the next moment, just the information of the current states are enough.&lt;/p>
&lt;h2 id="approaches-in-sequential-decision-making">Approaches in Sequential decision making&lt;/h2>
&lt;h3 id="problems-or-objectives">Problems or Objectives&lt;/h3>
&lt;p>There are two fundamental problems in sequenctial decision making:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Reinforcement Learning Problem:
In a RL problem, the environment is initially unkown. It is not told how the environment works. The agent interacts with the environment to figure out the best plan of action based on hit and trial method. This is analogous to the real life use case of controlling a nuclear power plant in which you are asking a RL agent to control and handle the entire nuclear powerplant without giving information to the agent about how the power plant actually works.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Planning Problem:
In this, the model of the environment is known to the agent in advance and you tell the agent all the rules of the game, dynamics of the environment etc. Instead of interacting with the environment, the agent performs internal computations on its models and figures out what to do next, improving its policy during this course of action.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>The agent without ever interacting with the environment actually, simulates the different situations and possiblities of what can happen, and builds a tree of these different sitautiosn and possiblities. At last it just performs a tree search to reach that particular situation taking the necessary actions required for it.&lt;/p>
&lt;h3 id="exploration-vs-exploitation">Exploration vs Exploitation&lt;/h3>
&lt;p>Reinforcement Learning is a type of trial and error learning. The agent should discover a good policy by itself from its existance of the environment without loosing too much reward along the way. There are two basic pathways that an agent can take to achieve this goal:&lt;/p>
&lt;p>Exploration means choosing the give up some known reward in the journey inorder to find out more information about the environment and use that information later on to maximize the rewards.&lt;/p>
&lt;p>Exploration means exploiting the known information during the journey and maximizing the rewards along its way.&lt;/p>
&lt;p>It is very important to keep a decent balance between these two. An agent should explore as well as exploit.&lt;/p></description></item><item><title>Working with W5500 on Arduino Microcontrollers</title><link>https://utkarsh-blogs.netlify.app/blog/arduino_w5500/</link><pubDate>Sat, 07 Sep 2024 00:00:00 +0000</pubDate><guid>https://utkarsh-blogs.netlify.app/blog/arduino_w5500/</guid><description>&lt;p>Local Area Network (LAN) is a a collection of devices physically connected to each other in a single location such as a home, office, building etc. Ethernet is a robust modern technology which allows us to connect the various devices over LAN and communicate to each other through an Ethernet Cable. In this article, we are going to see how to establish communication between an host which will be an Arduino microcontroller and a linux server acting as the client.&lt;/p>
&lt;p>To establish this communication, we will be performing a simple loopback test using the Unified Data Protocol (UDP) wherein, whatever we send from the Arduino to the linux server will be displayed on the client end which is our server and then sent back to the micrcontroller which is the host creating a loop of data transfer.&lt;/p>
&lt;p>For testing, any arduino based microcontroller can be used but we will be using an Arduino Nano. By default, arduino based microcontrollers do not support Ethernet communication directly, hence, we will be using Wiznet&amp;rsquo;s W5500 Ethernet to SPI module to interface ethernet with our microcontroller.&lt;/p>
&lt;h2 id="components-required">Components Required&lt;/h2>
&lt;ol>
&lt;li>Arduino Nano Microcontroller x 1&lt;/li>
&lt;li>Wiznet W5500 Ethernet Module x 1&lt;/li>
&lt;li>Ethernet Cable (Crossover cable preffered) x 1&lt;/li>
&lt;li>Ubuntu Linux Computer (UDP Server) x 1&lt;/li>
&lt;li>Jumper Cables&lt;/li>
&lt;/ol>
&lt;h2 id="hardware-setup">Hardware Setup&lt;/h2>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Schematic of Setup" srcset="
/blog/arduino_w5500/sch_hu0bf767ff964e433df461ba8b6c951474_119137_96bdf0f72e57247f51d7fd4951dff374.webp 400w,
/blog/arduino_w5500/sch_hu0bf767ff964e433df461ba8b6c951474_119137_0b0a2503e38515469125e38083138d1e.webp 760w,
/blog/arduino_w5500/sch_hu0bf767ff964e433df461ba8b6c951474_119137_1200x1200_fit_q95_h2_lanczos_3.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/arduino_w5500/sch_hu0bf767ff964e433df461ba8b6c951474_119137_96bdf0f72e57247f51d7fd4951dff374.webp"
width="628"
height="630"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>W5500&lt;/th>
&lt;th>ARDUINO&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>5V&lt;/td>
&lt;td>5V&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>GND&lt;/td>
&lt;td>GND&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>SCK&lt;/td>
&lt;td>D13&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>MISO&lt;/td>
&lt;td>D12&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>MOSI&lt;/td>
&lt;td>D11&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CS&lt;/td>
&lt;td>D10&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RST&lt;/td>
&lt;td>D9&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;ul>
&lt;li>Connecting the RST pin is optional, only if you want to Reset the W5500 module through code. It is preffered to reset the module before configuring the network parameters for communication.&lt;/li>
&lt;/ul>
&lt;h2 id="arduino-programming">Arduino Programming&lt;/h2>
&lt;h3 id="libraries-required-">Libraries Required:-&lt;/h3>
&lt;p>We are going to use the following external ethernet libraries for our program:&lt;/p>
&lt;ol>
&lt;li>&lt;a href="https://www.arduino.cc/reference/en/libraries/ethernet_generic/" target="_blank" rel="noopener">Ethernet Generic&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.arduino.cc/reference/en/libraries/ethernet/ethernetclient/" target="_blank" rel="noopener">Ethernet Client&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.arduino.cc/reference/en/libraries/ethernet/ethernetserver/" target="_blank" rel="noopener">Ethernet Server&lt;/a>&lt;/li>
&lt;/ol>
&lt;p>Let us start with writing the Arduino Code.&lt;/p>
&lt;p>&lt;strong>Step 1: Import the required libraries.&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-c" data-lang="c">&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;Ethernet_Generic.h&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;EthernetClient.h&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;EthernetServer.h&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;SPI.h&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Step 2: Create a function which sends a confirmation to the Client when a message has been received.&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">void sendConfirmation(EthernetClient client) {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> // Confirmation message to be sent
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> String confirmation = &amp;#34;Message Received\n&amp;#34;;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> // Send the confirmation to the client
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> client.print(confirmation);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> // Also print the confirmation to the Serial Monitor for debugging
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Serial.print(&amp;#34;Sent to client: &amp;#34;);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Serial.print(confirmation);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Step 3: Configure the network parameters for the Host (Arduino).&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">// Network settings
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // MAC address which should be unique
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">IPAddress ip(192, 168, 1, 177); // Set the Arduino IP (Make sure no other device on the network uses this IP address)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">EthernetServer server(80); // Set the server port
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Step 4: Setup the parameters for the Serial Monitor, Start the Ethernet and the Server.&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">void setup() {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> // Start serial communication for debugging
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Serial.begin(9600);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> // Start Ethernet
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Ethernet.begin(mac, ip);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> // Start the server
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> server.begin();
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Serial.print(&amp;#34;Server is at &amp;#34;);
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> Serial.println(Ethernet.localIP());
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Step 5: Write the loop function which continously checks for any incoming character if the client is connected and stores all the charaters in a string.&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span class="line">&lt;span class="cl">&lt;span class="n">void&lt;/span> &lt;span class="n">loop&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Listen&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">incoming&lt;/span> &lt;span class="n">clients&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">EthernetClient&lt;/span> &lt;span class="n">client&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">server&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">available&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;Client connected&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="ne">String&lt;/span> &lt;span class="n">message&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s2">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Variable&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">hold&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">incoming&lt;/span> &lt;span class="n">message&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">While&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">client&lt;/span> &lt;span class="n">is&lt;/span> &lt;span class="n">connected&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">while&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">connected&lt;/span>&lt;span class="p">())&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">available&lt;/span>&lt;span class="p">())&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">char&lt;/span> &lt;span class="n">c&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">read&lt;/span>&lt;span class="p">();&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Read&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">incoming&lt;/span> &lt;span class="n">data&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">c&lt;/span>&lt;span class="p">);&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Print&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">received&lt;/span> &lt;span class="n">data&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">Serial&lt;/span> &lt;span class="n">Monitor&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">message&lt;/span> &lt;span class="o">+=&lt;/span> &lt;span class="n">c&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Append&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">character&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">message&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Check&lt;/span> &lt;span class="k">if&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">message&lt;/span> &lt;span class="n">is&lt;/span> &lt;span class="n">complete&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">e&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">g&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">by&lt;/span> &lt;span class="n">checking&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">newline&lt;/span> &lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="se">\n&lt;/span>&lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">c&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="se">\n&lt;/span>&lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Send&lt;/span> &lt;span class="n">confirmation&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">client&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">sendConfirmation&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Clear&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">message&lt;/span> &lt;span class="n">variable&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">next&lt;/span> &lt;span class="n">message&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">message&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s2">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Close&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">connection&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">stop&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;Client disconnected&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="complete-code-">Complete Code:-&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span class="line">&lt;span class="cl">&lt;span class="o">//&lt;/span> &lt;span class="n">Author&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="n">Utkarsh&lt;/span> &lt;span class="n">Anand&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">/*&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">Description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="o">-&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">This&lt;/span> &lt;span class="n">code&lt;/span> &lt;span class="n">is&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">communicating&lt;/span> &lt;span class="n">between&lt;/span> &lt;span class="n">Arduino&lt;/span> &lt;span class="n">Nano&lt;/span> &lt;span class="n">microcontroller&lt;/span> &lt;span class="ow">and&lt;/span> &lt;span class="n">a&lt;/span> &lt;span class="n">UDP&lt;/span> &lt;span class="n">server&lt;/span> &lt;span class="n">like&lt;/span> &lt;span class="n">Ubuntu&lt;/span> &lt;span class="n">Linux&lt;/span> &lt;span class="n">system&lt;/span> &lt;span class="n">through&lt;/span> &lt;span class="n">ethernet&lt;/span> &lt;span class="n">LAN&lt;/span> &lt;span class="n">connection&lt;/span> &lt;span class="n">using&lt;/span> &lt;span class="n">a&lt;/span> &lt;span class="n">Wiznet&lt;/span> &lt;span class="n">W5500&lt;/span> &lt;span class="n">Ethernet&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">SPI&lt;/span> &lt;span class="n">module&lt;/span>&lt;span class="o">.&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">Code&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="o">-&lt;/span> &lt;span class="n">https&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="o">//&lt;/span>&lt;span class="n">github&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">com&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="n">ChiratheRobotics&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="n">Safety_Embedded_board&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="n">tree&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="mi">15&lt;/span>&lt;span class="n">_ethernet_integration&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="n">Mule_V3&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="n">Ethernet_Integration&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="n">Arduino_W5500&lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="n">Arduino_W5500_UDP_Loopback_Test&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">*/&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">//&lt;/span> &lt;span class="n">Include&lt;/span> &lt;span class="n">all&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">required&lt;/span> &lt;span class="n">libraries&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#include &amp;lt;Ethernet_Generic.h&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#include &amp;lt;EthernetClient.h&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#include &amp;lt;EthernetServer.h&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#include &amp;lt;SPI.h&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">//&lt;/span> &lt;span class="n">Fuction&lt;/span> &lt;span class="n">Prototype&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">void&lt;/span> &lt;span class="n">sendConfirmation&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">EthernetClient&lt;/span> &lt;span class="n">client&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">//&lt;/span> &lt;span class="n">Network&lt;/span> &lt;span class="n">settings&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">byte&lt;/span> &lt;span class="n">mac&lt;/span>&lt;span class="p">[]&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">{&lt;/span> &lt;span class="mh">0xDE&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mh">0xAD&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mh">0xBE&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mh">0xEF&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mh">0xFE&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mh">0xED&lt;/span> &lt;span class="p">};&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">MAC&lt;/span> &lt;span class="n">address&lt;/span> &lt;span class="n">which&lt;/span> &lt;span class="n">should&lt;/span> &lt;span class="n">be&lt;/span> &lt;span class="n">unique&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">IPAddress&lt;/span> &lt;span class="n">ip&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">192&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">168&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">177&lt;/span>&lt;span class="p">);&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Set&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">Arduino&lt;/span> &lt;span class="ne">IP&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">Make&lt;/span> &lt;span class="n">sure&lt;/span> &lt;span class="n">no&lt;/span> &lt;span class="n">other&lt;/span> &lt;span class="n">device&lt;/span> &lt;span class="n">on&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">network&lt;/span> &lt;span class="n">uses&lt;/span> &lt;span class="n">this&lt;/span> &lt;span class="ne">IP&lt;/span> &lt;span class="n">address&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">EthernetServer&lt;/span> &lt;span class="n">server&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">80&lt;/span>&lt;span class="p">);&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Set&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">server&lt;/span> &lt;span class="n">port&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">void&lt;/span> &lt;span class="n">setup&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Start&lt;/span> &lt;span class="n">serial&lt;/span> &lt;span class="n">communication&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">debugging&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">begin&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">9600&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Start&lt;/span> &lt;span class="n">Ethernet&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Ethernet&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">begin&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">mac&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">ip&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Start&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">server&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">server&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">begin&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;Server is at &amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">Ethernet&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">localIP&lt;/span>&lt;span class="p">());&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">void&lt;/span> &lt;span class="n">loop&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Listen&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">incoming&lt;/span> &lt;span class="n">clients&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">EthernetClient&lt;/span> &lt;span class="n">client&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">server&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">available&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;Client connected&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="ne">String&lt;/span> &lt;span class="n">message&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s2">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Variable&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">hold&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">incoming&lt;/span> &lt;span class="n">message&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">While&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">client&lt;/span> &lt;span class="n">is&lt;/span> &lt;span class="n">connected&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">while&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">connected&lt;/span>&lt;span class="p">())&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">available&lt;/span>&lt;span class="p">())&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">char&lt;/span> &lt;span class="n">c&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">read&lt;/span>&lt;span class="p">();&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Read&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">incoming&lt;/span> &lt;span class="n">data&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">c&lt;/span>&lt;span class="p">);&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Print&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">received&lt;/span> &lt;span class="n">data&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">Serial&lt;/span> &lt;span class="n">Monitor&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">message&lt;/span> &lt;span class="o">+=&lt;/span> &lt;span class="n">c&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="n">Append&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">character&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">message&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Check&lt;/span> &lt;span class="k">if&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">message&lt;/span> &lt;span class="n">is&lt;/span> &lt;span class="n">complete&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">e&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">g&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">by&lt;/span> &lt;span class="n">checking&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">newline&lt;/span> &lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="se">\n&lt;/span>&lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">c&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="se">\n&lt;/span>&lt;span class="s1">&amp;#39;&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Send&lt;/span> &lt;span class="n">confirmation&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">client&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">sendConfirmation&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">client&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Clear&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">message&lt;/span> &lt;span class="n">variable&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">next&lt;/span> &lt;span class="n">message&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">message&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s2">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Close&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">connection&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">stop&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;Client disconnected&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">void&lt;/span> &lt;span class="n">sendConfirmation&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">EthernetClient&lt;/span> &lt;span class="n">client&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Confirmation&lt;/span> &lt;span class="n">message&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">be&lt;/span> &lt;span class="n">sent&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="ne">String&lt;/span> &lt;span class="n">confirmation&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s2">&amp;#34;Message Received&lt;/span>&lt;span class="se">\n&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Send&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">confirmation&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">client&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">client&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">confirmation&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">//&lt;/span> &lt;span class="n">Also&lt;/span> &lt;span class="nb">print&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">confirmation&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">Serial&lt;/span> &lt;span class="n">Monitor&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">debugging&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;Sent to client: &amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">confirmation&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="ubuntu-setup">Ubuntu Setup&lt;/h2>
&lt;p>&lt;strong>Step 1: Ethernet Connection&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>Ensure that ethernet cable is connected between the LAN port of W5500 and Ubuntu System.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Step 2: Network Configuration&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>Open terminal on Ubuntu System&lt;/li>
&lt;li>Check your ethernet interface&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">$ ifconfig
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In my system, the ethernet interface was called &amp;lsquo;&lt;strong>enp89s0&lt;/strong>&amp;rsquo;.&lt;/p>
&lt;ol start="3">
&lt;li>Assign a static IP to your ethernet interface.&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">$ sudo ifconfig enp89s0 192.168.1.199 netmask 255.255.255.0
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note&lt;/strong>:- The IP addresses of Ubuntu System and Arduino should be on the same subnet.&lt;/p>
&lt;p>&lt;strong>Step 3: Test the connection&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>Ping the Arduino Nano to ensure the connection is working.&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">$ ping 192.168.1.177
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You should receive replies from the Arduino, confirming the network setup is correct.&lt;/p>
&lt;p>&lt;strong>Step 4: Send and Receive Data&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>You can use &lt;strong>&amp;rsquo;telnet&amp;rsquo;&lt;/strong> or &lt;strong>&amp;rsquo;netcat&amp;rsquo;&lt;/strong> to communication with the Arduino server.&lt;/li>
&lt;li>Download &lt;strong>&amp;rsquo;netcat&amp;rsquo;&lt;/strong> using the following command&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">$ sudo apt-get install netcat
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="3">
&lt;li>Connect to the arduino using the comamnd &lt;em>&lt;strong>nc {IP Address of Arduino} {Port}&lt;/strong>&lt;/em>.&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">$ nc 192.168.1.177 80
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="4">
&lt;li>Type any test, and you should see the echoed response from the arduino on the serial monitor.&lt;/li>
&lt;/ol></description></item><item><title>Leveraging Lazy Predict</title><link>https://utkarsh-blogs.netlify.app/blog/lazy-predict/</link><pubDate>Fri, 05 Apr 2024 00:00:00 +0000</pubDate><guid>https://utkarsh-blogs.netlify.app/blog/lazy-predict/</guid><description>&lt;div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
&lt;span class="pr-3 pt-1 text-primary-400">
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9-3.75h.008v.008H12z"/>&lt;/svg>
&lt;/span>
&lt;span class="dark:text-neutral-300">The article was originally published by ACM Manipal on behalf of the author &lt;a href="https://medium.com/p/06efdc5054b2" target="_blank" rel="noopener">here&lt;/a>.&lt;/span>
&lt;/div>
&lt;p>In machine learning, selecting the right model for a given dataset can be a daunting task. With a plethora of algorithms to choose from and various hyperparameters to tune, the process often demands significant time and effort. On top of this, with the recent AI boom, the application of machine learning and deep learning algorithms has increased significantly especially in non-computer science applications. Researchers in diverse domains want to leverage this powerful tool into their work but lack a background in machine learning or high-level programming.&lt;/p>
&lt;p>However, there’s a silver lining: &lt;em>Lazy Predict&lt;/em>, a Python library that offers a shortcut to model selection by automating the evaluation of multiple algorithms on a dataset. In this article, we’ll explore Lazy Predict in detail, including its features, use cases, and example codes.&lt;/p>
&lt;h3 id="what-is-lazy-predict-">What is Lazy Predict ?&lt;/h3>
&lt;p>Lazy Predict is a Python library designed to streamline the process of evaluating and comparing multiple machine learning models simultaneously on a single dataset. Developed by &lt;a href="https://github.com/shankarpandala" target="_blank" rel="noopener">Shankar Rao Pandala&lt;/a>, it leverages the scikit-learn library to build, train and evaluate a variety of classifiers and regressors. With Lazy Predict, users can quickly get an overview of how different algorithms perform on their dataset without the need for extensive manual coding.&lt;/p>
&lt;h3 id="how-does-it-work-">How does it work ?&lt;/h3>
&lt;p>Using Lazy Predict is incredibly simple, after importing the necessary modules, users can directly load their dataset and specify the target variable which needs to be predicted or classified. Lazy Predict then automatically splits the data into training and testing sets, initializes a collection of pre-defined classifier and regressor models, trains each model on the training data, and evaluates their performance on the test data. Finally, it generates a comprehensive report containing various performance metrics for each model, enabling users to compare their effectiveness effortlessly.&lt;/p>
&lt;h3 id="code-example">Code Example&lt;/h3>
&lt;p>For this article, we are using Lazy Predict for running classification models on the famous &lt;a href="https://archive.ics.uci.edu/dataset/80/optical&amp;#43;recognition&amp;#43;of&amp;#43;handwritten&amp;#43;digits" target="_blank" rel="noopener">Optical Recognition of Handwritten Digits&lt;/a> dataset by &lt;a href="https://yann.lecun.com/exdb/mnist/" target="_blank" rel="noopener">MNIST&lt;/a>. The data set contains images of hand-written digits: 10 classes where each class refers to a digit.&lt;/p>
&lt;p>To use the Lazy Predict library, it has to be installed using the python-pip package.&lt;/p>
&lt;div class="highlight">
&lt;pre class="chroma">
&lt;code>
pip install lazypredict
&lt;/code>
&lt;/pre>
&lt;/div>
&lt;p>Let’s start coding the application.&lt;/p>
&lt;ol>
&lt;li>Import the required python packages&lt;/li>
&lt;/ol>
&lt;div class="highlight">
&lt;pre class="chroma">
&lt;code>
from lazypredict.Supervised import LazyClassifier
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
&lt;/code>
&lt;/pre>
&lt;/div>
&lt;ol start="2">
&lt;li>Load the dataset and separate the target and feature variables&lt;/li>
&lt;/ol>
&lt;div class="highlight">
&lt;pre class="chroma">
&lt;code>
data = load_digits()
X, y = data.data, data.target
&lt;/code>
&lt;/pre>
&lt;/div>
&lt;ol start="3">
&lt;li>Split the data into training and testing sets. Here, we are using a training to testing split ratio of 8:2&lt;/li>
&lt;/ol>
&lt;div class="highlight">
&lt;pre class="chroma">
&lt;code>
# Split data into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=123)
&lt;/code>
&lt;/pre>
&lt;/div>
&lt;ol start="4">
&lt;li>Initialize the LazyClassifier. We are not using any custom metric, hence it has been set to &lt;em>None&lt;/em>. Set &lt;em>verbose&lt;/em> parameter to false to hide the detailed information while the model is being trained. Also, set the &lt;em>ignore_warnings&lt;/em> flag to &lt;em>True&lt;/em> to display any warnings which may come up.&lt;/li>
&lt;/ol>
&lt;div class="highlight">
&lt;pre class="chroma">
&lt;code>
# Initialize LazyClassifier
clf = LazyClassifier(verbose=0,ignore_warnings=True, custom_metric=None)
&lt;/code>
&lt;/pre>
&lt;/div>
&lt;ol start="5">
&lt;li>Start the model training and generate the model performance summary.&lt;/li>
&lt;/ol>
&lt;div class="highlight">
&lt;pre class="chroma">
&lt;code>
# Fit LazyClassifier
models_summary, predictions = clf.fit(X_train, X_test, y_train, y_test)
&lt;/code>
&lt;/pre>
&lt;/div>
&lt;ol start="6">
&lt;li>Display model performance summary&lt;/li>
&lt;/ol>
&lt;div class="highlight">
&lt;pre class="chroma">
&lt;code>
# Display model performance summary
print(models_summary)
&lt;/code>
&lt;/pre>
&lt;/div>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Lazy Predict Results" srcset="
/blog/lazy-predict/lazy_hu0e15abe55ebb5a073bd2fe6470b1dc00_105972_7d2c8c82c4e2f43d4cd4fe33dbd3cea3.webp 400w,
/blog/lazy-predict/lazy_hu0e15abe55ebb5a073bd2fe6470b1dc00_105972_6e01d61ee2248fef2dfa4c2e4abedb56.webp 760w,
/blog/lazy-predict/lazy_hu0e15abe55ebb5a073bd2fe6470b1dc00_105972_1200x1200_fit_q95_h2_lanczos_2.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/lazy-predict/lazy_hu0e15abe55ebb5a073bd2fe6470b1dc00_105972_7d2c8c82c4e2f43d4cd4fe33dbd3cea3.webp"
width="760"
height="491"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h3 id="use-cases-of-lazy-predict">Use Cases of Lazy Predict&lt;/h3>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Exploratory Data Analysis (EDA)&lt;/strong>: Lazy Predict serves as a valuable tool during the initial stages of a machine learning project, providing insights into which algorithms may be suitable for further exploration.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Model Selection&lt;/strong>: By comparing the performance of various models, Lazy Predict helps practitioners identify the most promising candidates for fine-tuning and optimization.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Education and Learning&lt;/strong>: Lazy Predict can be used as an educational resource to introduce beginners to different machine learning algorithms and their performance characteristics.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h3 id="benefits-of-using-lazy-predict">Benefits of using Lazy Predict&lt;/h3>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Time-Saving&lt;/strong>: Lazy Predict automates the process of model selection, saving practitioners valuable time that would otherwise be spent on manual evaluation.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Efficiency&lt;/strong>: With Lazy Predict, users can quickly assess the performance of multiple models in a single step, facilitating rapid experimentation and iteration.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Accessibility&lt;/strong>: Lazy Predict’s user-friendly interface makes it accessible to users of all skill levels, from novices to seasoned machine learning practitioners.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h3 id="conclusion">Conclusion&lt;/h3>
&lt;p>Lazy Predict offers a convenient and efficient solution for evaluating machine learning models, making it an invaluable asset in the data scientist’s toolkit. By automating the process of model selection and performance evaluation, it enables practitioners to expedite the development of robust and accurate machine learning solutions. Whether you’re a beginner exploring the world of machine learning or a seasoned researcher seeking to streamline your workflow, Lazy Predict is a tool worth considering.&lt;/p>
&lt;h3 id="references">References:&lt;/h3>
&lt;p>Lazy Predict GitHub Repository: &lt;a href="https://github.com/shankarpandala/lazypredict" target="_blank" rel="noopener">https://github.com/shankarpandala/lazypredict&lt;/a>
Pandala, Shankar Rao. “Lazy Predict.” GitHub, 2021, &lt;a href="https://github.com/shankarpandala/lazypredict" target="_blank" rel="noopener">https://github.com/shankarpandala/lazypredict&lt;/a>.&lt;/p></description></item><item><title>Navigating the Landscape of Research - Top tools and resources for researchers in 2024</title><link>https://utkarsh-blogs.netlify.app/blog/research-tools/</link><pubDate>Fri, 29 Mar 2024 00:00:00 +0000</pubDate><guid>https://utkarsh-blogs.netlify.app/blog/research-tools/</guid><description>&lt;div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
&lt;span class="pr-3 pt-1 text-primary-400">
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9-3.75h.008v.008H12z"/>&lt;/svg>
&lt;/span>
&lt;span class="dark:text-neutral-300">The article was originally published by ACM Manipal on behalf of the author &lt;a href="https://medium.com/@acm.manipal/navigating-the-landscape-of-research-top-tools-and-resources-for-researchers-in-2024-48018769cd84" target="_blank" rel="noopener">here&lt;/a>.&lt;/span>
&lt;/div>
&lt;p>In the ever-evolving world of research, staying organized, efficient, and up-to-date with the latest developments is paramount. Fortunately, the digital age has ushered in a plethora of tools and resources designed to streamline the research process. In this article, we’ll explore some of the essential resources and tools that have helped me through my undergraduate research journey.&lt;/p>
&lt;h4 id="1-uoverleafu">1. &lt;u>Overleaf&lt;/u>&lt;/h4>
&lt;p>LaTeX is the standard format for document writing in academia and Overleaf has revolutionized collaborative writing. This online LaTeX editor allows researchers to create, edit, and share LaTeX documents seamlessly. Its real-time collaboration features enable multiple authors to work on a document simultaneously, making it ideal for collaborative research projects. With Overleaf, formatting complexities are minimized, allowing researchers to focus on content creation without worrying about the intricacies of LaTeX coding.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="overleaf" srcset="
/blog/research-tools/overleaf_hu3889237f4461328333d40674a5f71f28_38060_fda403f1a3cdea3ac9707cbc2f4b1074.webp 400w,
/blog/research-tools/overleaf_hu3889237f4461328333d40674a5f71f28_38060_2992cb240d3ea3b7d78b0a107ca53e41.webp 760w,
/blog/research-tools/overleaf_hu3889237f4461328333d40674a5f71f28_38060_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/overleaf_hu3889237f4461328333d40674a5f71f28_38060_fda403f1a3cdea3ac9707cbc2f4b1074.webp"
width="720"
height="421"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h4 id="2-uscispaceu">2. &lt;u>Scispace&lt;/u>&lt;/h4>
&lt;p>A literature review is an essential component of any research project. As essential as it is, understanding research papers can be difficult sometimes. Scispace played a very crucial role in making this simpler for me. It is a comprehensive research management platform that integrates various tools and services to facilitate every stage of the research process. From literature review and data analysis to collaboration and project management, Scispace offers a centralized hub for researchers to organize their work efficiently. Its AI-powered chatbot can read through entire papers and generate summaries, inferences, etc. easily Users can also ask different questions to the chatbot about the research presented in the papers.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="scispace" srcset="
/blog/research-tools/scispace_hu89102549a6a2b9032138e442a9dc05d6_31198_17a66c96f7e36d00d4bf51a961356d71.webp 400w,
/blog/research-tools/scispace_hu89102549a6a2b9032138e442a9dc05d6_31198_670d67359a11de0434e82d223dfede8e.webp 760w,
/blog/research-tools/scispace_hu89102549a6a2b9032138e442a9dc05d6_31198_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/scispace_hu89102549a6a2b9032138e442a9dc05d6_31198_17a66c96f7e36d00d4bf51a961356d71.webp"
width="720"
height="450"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h4 id="3-umendeley--zoterou">3. &lt;u>Mendeley / Zotero&lt;/u>&lt;/h4>
&lt;p>Mendeley is a leading reference management tool that helped me collect, organize, and cite sources effectively. It offers features for storing and annotating PDFs, generating bibliographies, and collaborating with peers. Mendeley’s social networking capabilities also allow researchers to discover new publications and connect with colleagues in their field.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="mendeley" srcset="
/blog/research-tools/mendley_hue25286c7491f7122af0706d0c1232714_30818_021d47fc738333f0adeff7b7571f2dc3.webp 400w,
/blog/research-tools/mendley_hue25286c7491f7122af0706d0c1232714_30818_38da036b3283e619db43dd2567dc40ba.webp 760w,
/blog/research-tools/mendley_hue25286c7491f7122af0706d0c1232714_30818_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/mendley_hue25286c7491f7122af0706d0c1232714_30818_021d47fc738333f0adeff7b7571f2dc3.webp"
width="720"
height="361"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Another popular tool for similar use cases is Zotero which offers great open source capabilities but I used and preferred Mendeley due to its cross-device synchronization capabilities handling papers on multiple devices.&lt;/p>
&lt;h4 id="4-uconnected-papers--litmapsu">4. &lt;u>Connected Papers / Litmaps&lt;/u>&lt;/h4>
&lt;p>Connected Papers and Litmaps are visualization tools that helped me in exploring the interconnectedness of academic literature. By analyzing citation networks and identifying key relationships between papers, these platforms offer valuable insights into the landscape of scholarly research. Researchers can use Connected Papers and Litmaps to discover seminal works, identify emerging trends, and navigate complex research domains with ease.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="litmaps" srcset="
/blog/research-tools/litmaps_hu0dca30c847947159e4f9be91c4b3d3dd_19888_a71f628b41e2ab904f1ee2c21784d8a7.webp 400w,
/blog/research-tools/litmaps_hu0dca30c847947159e4f9be91c4b3d3dd_19888_7159df60f1274c884a08fcff01de5c51.webp 760w,
/blog/research-tools/litmaps_hu0dca30c847947159e4f9be91c4b3d3dd_19888_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/litmaps_hu0dca30c847947159e4f9be91c4b3d3dd_19888_a71f628b41e2ab904f1ee2c21784d8a7.webp"
width="720"
height="377"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h4 id="5-ugithubu">5. &lt;u>Github&lt;/u>&lt;/h4>
&lt;p>Although having a reputation for being the go-to tool in the software development industry, GitHub has increasingly become a valuable resource for researchers working on projects involving code or data analysis. Its version control capabilities facilitate collaboration and reproducibility by enabling my fellow co-researchers to track changes, manage revisions, and share code repositories.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="github" srcset="
/blog/research-tools/github_huf13c2679e1c1bada9bbae2de1ac7045f_22782_6fe889ae9ce94aead98b4250a413093e.webp 400w,
/blog/research-tools/github_huf13c2679e1c1bada9bbae2de1ac7045f_22782_3aaa1b18accfd569534ef8b869f6ab67.webp 760w,
/blog/research-tools/github_huf13c2679e1c1bada9bbae2de1ac7045f_22782_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/github_huf13c2679e1c1bada9bbae2de1ac7045f_22782_6fe889ae9ce94aead98b4250a413093e.webp"
width="720"
height="396"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h4 id="6-unotionu">6. &lt;u>Notion&lt;/u>&lt;/h4>
&lt;p>When working on multiple research projects, keeping track of all the progress becomes critical and messy at times. That is where Notion helped me. It is a versatile productivity tool that combines note-taking, project management, and collaboration features in a single platform. Its flexible structure allows researchers to create customized databases, organize information intuitively, and collaborate with team members seamlessly. Whether used for brainstorming ideas, outlining research proposals, or managing lab workflows, Notion adapts to the unique needs of researchers across diverse disciplines.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="notion" srcset="
/blog/research-tools/notion_hu97d9c47c03a3646579e7bcf2e6593f09_33656_51342d5b989d2973796ff93a8844cbdf.webp 400w,
/blog/research-tools/notion_hu97d9c47c03a3646579e7bcf2e6593f09_33656_0193299f53c9d3741580c00dc722ec45.webp 760w,
/blog/research-tools/notion_hu97d9c47c03a3646579e7bcf2e6593f09_33656_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/notion_hu97d9c47c03a3646579e7bcf2e6593f09_33656_51342d5b989d2973796ff93a8844cbdf.webp"
width="720"
height="451"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h4 id="7-ugoogle-scholaru">7. &lt;u>Google Scholar&lt;/u>&lt;/h4>
&lt;p>Google Scholar remains a go-to resource for researchers seeking access to scholarly literature across a wide range of disciplines. Its vast database of academic publications, patents, and citations enables researchers to discover relevant sources, track citations, and stay informed about the latest research trends. Powered by the Google search engine, its advanced search capabilities and personalized recommendations make it an indispensable tool for conducting comprehensive literature reviews and staying updated on cutting-edge research.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="google" srcset="
/blog/research-tools/google_hub4e829d024c917b58e5aa848aedea687_31496_a68d5728d09f921cf2c8b7d158c86c09.webp 400w,
/blog/research-tools/google_hub4e829d024c917b58e5aa848aedea687_31496_be94581e4a5d05ccd2e76b90202e8d45.webp 760w,
/blog/research-tools/google_hub4e829d024c917b58e5aa848aedea687_31496_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/google_hub4e829d024c917b58e5aa848aedea687_31496_a68d5728d09f921cf2c8b7d158c86c09.webp"
width="720"
height="431"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h4 id="8-ugrammarlyu">8. &lt;u>Grammarly&lt;/u>&lt;/h4>
&lt;p>Clear and concise writing is essential for effective communication in academia. Grammarly is a writing assistant tool that helps researchers improve the clarity, correctness, and coherence of their written work. From grammatical errors and punctuation mistakes to style suggestions and tone adjustments, Grammarly provides real-time feedback and suggestions to enhance the quality of research manuscripts, grant proposals, and academic papers.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="grammarly" srcset="
/blog/research-tools/grammarly_hu1153d9b4a90b41e0850e1c64687dbf34_22256_7e412c28e3c721e0d3a9c3ac98fdfdf1.webp 400w,
/blog/research-tools/grammarly_hu1153d9b4a90b41e0850e1c64687dbf34_22256_146f40386c5e211858125271f073cf89.webp 760w,
/blog/research-tools/grammarly_hu1153d9b4a90b41e0850e1c64687dbf34_22256_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/grammarly_hu1153d9b4a90b41e0850e1c64687dbf34_22256_7e412c28e3c721e0d3a9c3ac98fdfdf1.webp"
width="720"
height="379"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h4 id="9-upapers-with-codeu">9. &lt;u>Papers with Code&lt;/u>&lt;/h4>
&lt;p>As the importance of reproducibility and transparency in research continues to gain prominence, Papers with Code offers a valuable resource for researchers seeking to share and reproduce code implementations of academic papers. This platform provides code repositories linked to research papers, allowing researchers to access, replicate, and build upon existing work with ease. It also promotes open sourcing in academia, especially in the computer science field. Papers with code provide the ability to implement and upload on the website for research papers whose code is not published by the authors. It provides monetary incentives to people contributing to the code repositories.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="pwc" srcset="
/blog/research-tools/pwc_hu21ba57731d83aecd9c775e85483bf5c0_28710_df877c4d21d9476593b97a96dfe834e9.webp 400w,
/blog/research-tools/pwc_hu21ba57731d83aecd9c775e85483bf5c0_28710_7dd96064d62fa5734dc32a4b83ef3d5c.webp 760w,
/blog/research-tools/pwc_hu21ba57731d83aecd9c775e85483bf5c0_28710_1200x1200_fit_q95_h2_lanczos.webp 1200w"
src="https://utkarsh-blogs.netlify.app/blog/research-tools/pwc_hu21ba57731d83aecd9c775e85483bf5c0_28710_df877c4d21d9476593b97a96dfe834e9.webp"
width="720"
height="432"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>In an era of rapid technological advancement and information overload, leveraging the right tools and resources is essential for navigating the complexities of the research landscape. Whether it’s managing references, analyzing data, or collaborating with peers, the tools mentioned above can empower researchers to work more efficiently, communicate effectively, and make meaningful contributions to their respective fields.&lt;/p></description></item></channel></rss>