<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Dessad</title>
    <description>The latest articles on Forem by Dessad (@dessad07).</description>
    <link>https://forem.com/dessad07</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2237863%2F69fbae89-ca27-4094-ab2b-b3543edd3c8d.jpg</url>
      <title>Forem: Dessad</title>
      <link>https://forem.com/dessad07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dessad07"/>
    <language>en</language>
    <item>
      <title>Troubleshooting Arduino Not Detected on COM Port in Windows</title>
      <dc:creator>Dessad</dc:creator>
      <pubDate>Thu, 14 Nov 2024 14:18:26 +0000</pubDate>
      <link>https://forem.com/dessad07/troubleshooting-arduino-not-detected-on-com-port-in-windows-1jok</link>
      <guid>https://forem.com/dessad07/troubleshooting-arduino-not-detected-on-com-port-in-windows-1jok</guid>
      <description>&lt;h2&gt;
  
  
  Overview:
&lt;/h2&gt;

&lt;p&gt;This guide provides step-by-step troubleshooting for when your Arduino isn't showing up on COM ports in Windows, particularly useful if you’re seeing errors in the Arduino IDE like: avrdude: stk500_recv(): programmer is not responding&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;When connecting your Arduino to your computer, it should be listed in &lt;strong&gt;Device Manager&lt;/strong&gt; under &lt;strong&gt;Ports (COM &amp;amp; LPT)&lt;/strong&gt; or &lt;strong&gt;Unknown Devices&lt;/strong&gt;. If it’s not showing up, this could indicate issues with the cable, driver, or USB port configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Possible Causes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Faulty or power-only USB cable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Driver issues (e.g., CH340 USB-to-Serial drivers)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;USB port issues&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;COM port conflicts on Windows&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Check the USB Cable
&lt;/h3&gt;

&lt;p&gt;Ensure you’re using a data-capable USB cable, as some cables only provide charging capabilities.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Try a different USB cable.&lt;/li&gt;
&lt;li&gt;Test the cable with another data device if possible.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 2: Try a Different USB Port or Computer
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Try different USB ports (both USB 2.0 and USB 3.0 if available).&lt;/li&gt;
&lt;li&gt;Test the Arduino on a different computer to see if it’s detected there.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 3: Install or Reinstall CH340 Driver
&lt;/h3&gt;

&lt;p&gt;If your Arduino board uses a CH340 chip (common in clone boards), you’ll need the CH340 driver.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download the latest CH340 driver from &lt;a href="https://sparks.gogo.co.nz/ch340" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Extract the file and locate &lt;strong&gt;CH341SER.inf&lt;/strong&gt; (or similar).&lt;/li&gt;
&lt;li&gt;Right-click the .inf file and select &lt;strong&gt;Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Restart your computer, then reconnect your Arduino.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 4: Update USB Drivers in Device Manager
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Device Manager&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Expand &lt;strong&gt;Universal Serial Bus controllers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Right-click each USB controller and select &lt;strong&gt;Update driver&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Search automatically for updated driver software&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 5: Disable USB Power Management
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;In &lt;strong&gt;Device Manager&lt;/strong&gt;, expand &lt;strong&gt;Universal Serial Bus controllers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Right-click each &lt;strong&gt;USB Root Hub&lt;/strong&gt; and select &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Go to the &lt;strong&gt;Power Management&lt;/strong&gt; tab and uncheck &lt;strong&gt;Allow the computer to turn off this device to save power&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Restart your computer.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 6: Install USB Serial Driver with Zadig
&lt;/h3&gt;

&lt;p&gt;If the Arduino still isn’t detected, try using &lt;a href="https://zadig.akeo.ie/" rel="noopener noreferrer"&gt;Zadig&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download and run Zadig.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Options&lt;/strong&gt;, select &lt;strong&gt;List All Devices&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Find your Arduino device in the dropdown (it might appear as “Unknown Device”).&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;USB Serial (CDC)&lt;/strong&gt; driver and click &lt;strong&gt;Install Driver&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 7: Reset COM Ports (Advanced)
&lt;/h3&gt;

&lt;p&gt;If previous COM port assignments are causing conflicts, reset them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Command Prompt&lt;/strong&gt; as Administrator.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;set devmgr_show_nonpresent_devices=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;Device Manager&lt;/strong&gt; &amp;gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;Show hidden devices&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expand &lt;strong&gt;Ports (COM &amp;amp; LPT)&lt;/strong&gt; and uninstall any greyed-out devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restart your computer and reconnect the Arduino.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;By following these steps, you should be able to resolve issues with your Arduino not showing up on COM ports in Windows. Most of the time, the problem is related to the USB cable or drivers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://support.arduino.cc/hc/en-us" rel="noopener noreferrer"&gt;Official Arduino Support&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sparks.gogo.co.nz/ch340" rel="noopener noreferrer"&gt;CH340 Driver Download&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zadig.akeo.ie/" rel="noopener noreferrer"&gt;Zadig USB Driver Tool&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>arduinouno</category>
      <category>electronics</category>
      <category>embeddedsystem</category>
    </item>
    <item>
      <title>Upgrading Node.js on Linux using NVM</title>
      <dc:creator>Dessad</dc:creator>
      <pubDate>Sun, 20 Oct 2024 15:09:30 +0000</pubDate>
      <link>https://forem.com/dessad07/upgrading-nodejs-on-linux-using-nvm-247</link>
      <guid>https://forem.com/dessad07/upgrading-nodejs-on-linux-using-nvm-247</guid>
      <description>&lt;p&gt;If you're trying to upgrade Node.js from version 12 to a more recent version (e.g., 18 LTS) on a Linux distribution like Parrot OS and encountering issues along the way, this guide is for you. It will cover each step in detail, including common problems and solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before you begin, make sure you have the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Linux distribution (e.g., Parrot OS)&lt;/li&gt;
&lt;li&gt;An existing installation of Node.js version 12&lt;/li&gt;
&lt;li&gt;Administrative access to your system&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Installing NVM
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Check your package manager:&lt;/strong&gt;&lt;br&gt;
Update your package manager to ensure you have the latest package information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install NVM (Node Version Manager)&lt;/strong&gt;: &lt;br&gt;
NVM will allow you to easily switch between Node.js versions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.bashrc # Source NVM in your current session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;List available Node.js versions&lt;/strong&gt;: &lt;br&gt;
See the available Node.js versions for installation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm ls-remote
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Upgrading Node.js
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Install Node.js version 18&lt;/strong&gt;: &lt;br&gt;
Replace &lt;code&gt;18&lt;/code&gt; with the version you want.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm install 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Set Node.js 18 as the default version&lt;/strong&gt;:&lt;br&gt;
To set it as the default:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm alias default 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, for the current session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm use 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Update npm (Node Package Manager)&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g npm@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Troubleshooting Common Issues
&lt;/h2&gt;

&lt;h3&gt;
  
  
  NVM Command Not Found
&lt;/h3&gt;

&lt;p&gt;If you encounter the "nvm command not found" error:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source NVM in your shell profile (e.g., &lt;code&gt;~/.bashrc&lt;/code&gt; or &lt;code&gt;~/.zshrc&lt;/code&gt;) or use the correct shell-specific configuration file.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Node.js Version Rolls Back to 12
&lt;/h3&gt;

&lt;p&gt;If Node.js version rolls back to 12 after closing the terminal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check that the NVM sourcing commands are present and correctly placed in your shell profile.&lt;/li&gt;
&lt;li&gt;Ensure the shell profile is sourced when opening a new terminal session.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Issues with .bashrc
&lt;/h3&gt;

&lt;p&gt;If you face issues with &lt;code&gt;~/.bashrc&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create the &lt;code&gt;~/.bashrc&lt;/code&gt; file if it doesn't exist.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Add the NVM sourcing commands to &lt;code&gt;~/.bashrc&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Source &lt;code&gt;~/.bashrc&lt;/code&gt; to apply changes to your current session.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] &amp;amp;&amp;amp; \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] &amp;amp;&amp;amp; \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;After you've saved the ~/.bashrc file, you need to source it to apply the changes to your current terminal session.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify NVM installation and set the default Node.js version.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These steps should help you upgrade Node.js and address common problems that may arise during the process. Remember to test your Node.js projects to ensure compatibility with the new version.&lt;/p&gt;

</description>
      <category>node</category>
      <category>nvm</category>
      <category>npm</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
