<?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 inegm.dev on Medium]]></title>
        <description><![CDATA[Stories by inegm.dev on Medium]]></description>
        <link>https://medium.com/@inegm?source=rss-4265bc4244be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NNPaHAzIxgQHn5bedF9WUg.png</url>
            <title>Stories by inegm.dev on Medium</title>
            <link>https://medium.com/@inegm?source=rss-4265bc4244be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:31:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@inegm/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[Oh My Zsh! I ZSH]]></title>
            <link>https://inegm.medium.com/oh-my-zsh-i-zsh-f2890c72da8c?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2890c72da8c</guid>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Tue, 03 Feb 2026 00:17:22 GMT</pubDate>
            <atom:updated>2026-11-19T05:55:51.076Z</atom:updated>
            <content:encoded><![CDATA[<p>MY best Shell so far!</p><h3>Installing ZSH in Ubuntu</h3><pre>sudo apt install zsh -y</pre><h3>Installing Oh My Zsh</h3><p>Go to the OMZ website <a href="https://ohmyz.sh/">Oh My Zsh</a>, go to install, and you should see the installation command like the following (might be updated in the future, so please check the website):</p><pre>sh -c &quot;$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)&quot;</pre><h3>Installing Power10K theme</h3><h4>Cloning</h4><pre>git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k</pre><h4>In ~/.zshrc</h4><p>Add this line or replace the current variable.</p><pre>ZSH_THEME=&quot;powerlevel10k/powerlevel10k&quot;</pre><h3>Installing zsh-autosuggestions</h3><h4>Cloning</h4><pre>git clone --depth 1 -- https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions</pre><h4>In ~/.zshrc</h4><p>Add the zsh-autosuggestions to the plugins.</p><h3>Installing zsh-syntax-highlighting</h3><h4>Cloning</h4><pre>git clone --depth 1 -- https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting</pre><h4>In ~/.zshrc</h4><p>Add the zsh-syntax-highlighting to the plugins.</p><h3>Installing fzf (fuzzy finder)</h3><h4>Cloning</h4><pre>git clone --depth 1 -- https://github.com/junegunn/fzf.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fzf</pre><h4>Invoking the installer for the binary</h4><pre>${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fzf/install</pre><p>Accept yes for the next prompts.</p><h4>In ~/.zshrc</h4><ul><li>Add the fzf to the plugins.</li><li>Add the following export:</li><li>export FZF_BASE=${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fzf</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2890c72da8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Persistent names for USB-serial devices in Linux (/dev/ttyUSBx -> /dev/custom-name)]]></title>
            <link>https://inegm.medium.com/persistent-names-for-usb-serial-devices-in-linux-dev-ttyusbx-dev-custom-name-fd49b5db9af1?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd49b5db9af1</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[udev]]></category>
            <category><![CDATA[serial]]></category>
            <category><![CDATA[usb]]></category>
            <category><![CDATA[hacks]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Sun, 17 May 2020 14:44:04 GMT</pubDate>
            <atom:updated>2020-05-17T14:44:04.895Z</atom:updated>
            <content:encoded><![CDATA[<h3>Motivation</h3><p>Did you get bored for each time you re-connect the USB-serial device you have to check if it is the right one or not? This can be solved now with the udev command, let’s see in the upcoming paragraphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W8tc-AHvqbXWDtpt86f3eg.png" /></figure><h3>What is `udev`?</h3><p>Udev is the device manager for the Linux kernel. Udev dynamically creates or removes device node files at boot time in the /udev directory for all types of devices.</p><h4>`udev` Rules File</h4><p>Udev rules are defined into files with the .rules extension. There are two main locations in which those files can be placed: /usr/lib/udev/rules.d it’s the directory used for system-installed rules, /etc/udev/rules.d/ is reserved for custom “user” made rules.</p><p>The files in which the rules are defined are conventionally named with a number as prefix (e.g 50-udev-default.rules) and are processed in lexical order independently of the directory they are in. Files installed in /etc/udev/rules.d/, however, override those with the same name installed in the system default path.</p><h3>Using `udevadm` to extract information from the USB-serial devices</h3><p>Using the following command you will get all the info you need for the device name /dev/ttyUSBx , where x is the device number</p><pre>$ udevadm info --name=/dev/ttyUSBx --attribute-walk</pre><p>This will give you a lot of info, you can use any of these for your rules next in the rules file. I recommend you to save the log of this command to a file and use a comparing tool to find where the devices diverge and differ in attributes.</p><h3>Writing the rules file</h3><p>Use any text editor to create a new file in this path /etc/udev/rules.d/99-usb-serial.rules , note that any .rules file will get parsed in lexical order. I will use vim (with sudo).</p><pre>$ sudo vim /etc/udev/rules.d/99-usb-serial.rules</pre><p>I’ve populated my file with the following</p><pre>SUBSYSTEM==&quot;tty&quot;, ATTRS{idVendor}==&quot;0403&quot;, ATTRS{serial}==&quot;FTAK3IN7&quot;, SYMLINK+=&quot;rah-m4&quot;</pre><pre>SUBSYSTEM==&quot;tty&quot;, ATTRS{idVendor}==&quot;0403&quot;, ATTRS{idProduct}==&quot;6001&quot;, ATTRS{serial}==&quot;FTAK3AE8&quot;, SYMLINK+=&quot;rah-a35&quot;</pre><pre>SUBSYSTEM==&quot;tty&quot;, ATTRS{idVendor}==&quot;1a86&quot;, ATTRS{idProduct}==&quot;7523&quot;, SYMLINK+=&quot;rah-ctrl&quot;</pre><p>These attributes I have extracted it as mentioned before using udevadm info , I will highlight some points:</p><ul><li>I have 3 USB-serial cables connected</li><li>I have 2 identical cables from the same vendor but I could differentiate between them using the ATTRS{serial} as this attribute should be unique for each cable</li><li>SYSLINK+=&quot;name&quot; this will command udev to assign this name for this device and you can access it using this device node /dev/name</li></ul><h3>Apply these changes without restart</h3><p>Just run this command</p><pre>$ sudo udevadm control --reload-rules &amp;&amp; sudo udevadm trigger</pre><p>And that is it. You will not run again in this problem, even if the machine has started or even if you have re-connected the cables in different ports.</p><p>I hope this article is helpful for you, please share if you like it.</p><p>If you have any questions, comment down below and I will try my best to answer them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd49b5db9af1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Publicly Access a Local Server From the Internet]]></title>
            <link>https://inegm.medium.com/how-to-publicly-access-a-local-server-from-the-internet-a514549c4346?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/a514549c4346</guid>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[esp8266]]></category>
            <category><![CDATA[ddns]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Fri, 27 Apr 2018 23:58:32 GMT</pubDate>
            <atom:updated>2018-05-11T14:21:35.561Z</atom:updated>
            <content:encoded><![CDATA[<h3>Motivation</h3><p>Last week I’ve been trying to figure out how to connect to my ESP local server from any place in the world. So I’ve read some documents and articles here and there to figure out the solution. And boy it was so easy, but not directly available on the internet. So here’s my experience</p><h3>Starting Point</h3><p>I’ve now my ESP 8266 (which is a microprocessor chip that is associated with a WiFi module) programmed with a simple code that giving me a hello world when I am requesting <a href="http://localhost/">http://localhost</a>/ , <a href="http://192.168.1.1/">http://192.168.1.1</a>/ or <a href="http://127.0.0.1/">http://127.0.0.1/</a> .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*gS5VggAy1g4lf-S_nZcQZw.png" /><figcaption>Server is running locally at port 80 (HTTP Port)</figcaption></figure><p>And the code is :</p><pre>#include &lt;ESP8266WiFi.h&gt;<br>#include &lt;WiFiClient.h&gt;<br>#include &lt;ESP8266WebServer.h&gt;</pre><pre>const char* ssid = &quot;ssid name&quot;;<br>const char* password = &quot;ssid password&quot;;<br>const int led = 2;</pre><pre>ESP8266WebServer server(80);</pre><pre>void handleRoot() {<br>  server.send(200, &quot;text/plain&quot;, &quot;hello from esp8266!&quot;);<br>}</pre><pre>void handleNotFound(){<br>  digitalWrite(led, 1);<br>  String message = &quot;File Not Found\n\n&quot;;<br>  message += &quot;URI: &quot;;<br>  message += server.uri();<br>  message += &quot;\nMethod: &quot;;<br>  message += (server.method() == HTTP_GET)?&quot;GET&quot;:&quot;POST&quot;;<br>  message += &quot;\nArguments: &quot;;<br>  message += server.args();<br>  message += &quot;\n&quot;;<br>  for (uint8_t i=0; i&lt;server.args(); i++){<br>     message += &quot; &quot; + server.argName(i) + &quot;: &quot; + server.arg(i) + &quot;\n&quot;;<br>  }<br>  server.send(404, &quot;text/plain&quot;, message);<br>}<br>void setup(void){<br>pinMode(led, OUTPUT);<br>digitalWrite(led, HIGH);  // It&#39;s negative logic LED<br>Serial.begin(115200);<br>WiFi.mode(WIFI_STA);<br>WiFi.begin(ssid, password);<br>Serial.println(&quot;ESP has Started.&quot;);<br>Serial.print(&quot;Connecting&quot;);<br>// Wait for connection<br>  while (WiFi.status() != WL_CONNECTED) {<br>    delay(500);<br>    Serial.print(&quot;.&quot;);<br>  }<br>  Serial.println(&quot;&quot;);<br>  Serial.print(&quot;Connected to &quot;);<br>  Serial.println(ssid);<br>  Serial.print(&quot;IP address: &quot;);<br>  Serial.println(WiFi.localIP());<br>  server.on(&quot;/&quot;, handleRoot);<br>  server.onNotFound(handleNotFound);<br>  server.begin();<br>  Serial.println(&quot;HTTP server started&quot;);<br>}</pre><pre>void loop(void){<br>  server.handleClient();<br>}</pre><h4>Problem 1 : Set the IP for the ESP as a Static IP</h4><p>WiFi.config() allows you to configure a static IP address as well as change the DNS, gateway, and subnet addresses on the WiFi shield/ESP8266.</p><ol><li>So first we make an IP array using the IPAddress Class</li><li>Calling the the WiFi.config(ip, gateway, subnet) before connecting to WiFi, using WiFi.begin(ssid, pass); .</li></ol><ul><li>* I’ll post the final code at the end of the article *</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/196/1*fMIeW152KQc1qIRb7qhJTw.png" /><figcaption>Serial Monitor showing that the ESP has successfully assigned the static IP to its self</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/219/1*1qECBfTSAJMVjYzbFoJs4Q.png" /><figcaption>Working like a charm (static IP 192.168.1.222)</figcaption></figure><p>So, we’ve figured out the static IP problem. Now, time to move on!</p><h4>Problem 2 : Accessing ESP from public IP address</h4><ul><li>Get your IP address from a service like <a href="https://whatismyipaddress.com/">What’s my IP address?</a></li><li>Typing your public IP in your browser, and this is what happens, it’s your gateway IP (your Router)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*G_GlDQEVrgthq53bjLpAHw.png" /></figure><ul><li>So the problem is that you can’t access the ESP local IP directly, you have to <strong>port forward it</strong>, this means that the default 80 port is reserved by the gateway router server.</li><li>So we’ll make our ESP server work at (say: port 3355)</li><li>I’ll edit the code and go to my router to configure the <strong>port forwarding</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7IRXCK2R9ISnwVzHz6YmfA.png" /></figure><p>Code edited to :</p><pre>ESP8266WebServer server(3355);</pre><h4>Problem 3: Public IP is dynamic and we need to make it fixed</h4><p>You can for sure have a static public IP, but this comes with extra fees on your ADSL bill, because by default your ISP gives you a dynamic IP (meaning that every time you re-connect the router to your ADSL service you’ll be give a new IP). But of course you can pay for static IP.</p><p>I’m not going to use this, I’ll use the DDNS service Dynamic Domain Name Service.</p><p>Here’s a quote :</p><blockquote>DDNS stands for dynamic DNS, or more specifically dynamic Domain Name System. It’s a service that maps internet domain names to IP addresses. It’s a DDNS service that lets you access your home computer from anywhere in the world.<br>DDNS serves a similar purpose to the internet’s Domain Name System (DNS) in that DDNS lets anyone hosting a web or FTP server advertise a public name to prospective users.<br>However, unlike DNS that only works with static IP addresses, DDNS is designed to also support dynamic (changing) IP addresses, such as those assigned by a DHCP server.</blockquote><p>I’ve investigated this service with my router and found that my router doesn’t support a working DDNS service. So, I’ve installed the client Updater for the Dynu.com.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*xkKMA6mNqj5n5DD7UHFAQA.png" /></figure><p>I’ll try to update the article with more information about how to setup the router. But for now this solution works well for me :)</p><p>Here’s the result from my phone (I was using the 3G network to access the IP from a different IP)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*J_a9v03KGRceuUFuqXRJTA.png" /></figure><p>That’s all for now. Thanks for reading.</p><p>PS : Here’s the full Code</p><pre>#include &lt;ESP8266WiFi.h&gt;<br>#include &lt;ESP8266WebServer.h&gt;<br>// Static IP Address<br>IPAddress ip(192, 168, 1, 222);<br>IPAddress subnet(255, 255, 255, 0);<br>IPAddress gateway(192, 168, 1, 1);</pre><pre>const char* ssid = &quot;ssid name&quot;;<br>const char* password = &quot;ssid password&quot;;</pre><pre>ESP8266WebServer server(3355);</pre><pre>void handleRoot() {<br>  server.send(200, &quot;text/plain&quot;, &quot;hello from esp8266!&quot;);<br>}<br>void handleNotFound(){<br>  String message = &quot;File Not Found\n\n&quot;;<br>  message += &quot;URI: &quot;;<br>  message += server.uri();<br>  message += &quot;\nMethod: &quot;;<br>  message += (server.method() == HTTP_GET)?&quot;GET&quot;:&quot;POST&quot;;<br>  message += &quot;\nArguments: &quot;;<br>  message += server.args();<br>  message += &quot;\n&quot;;<br>  for (uint8_t i=0; i&lt;server.args(); i++){<br>    message += &quot; &quot; + server.argName(i) + &quot;: &quot; + server.arg(i) + &quot;\n&quot;;<br>  }<br>  server.send(404, &quot;text/plain&quot;, message);<br>}</pre><pre>void setup(void){<br>  Serial.begin(115200);<br>  WiFi.mode(WIFI_STA);<br>  WiFi.begin(ssid, password);<br>  Serial.println(&quot;ESP has Started.&quot;);<br>  Serial.print(&quot;Connecting&quot;);<br>  // Before connecting configure the static IP<br>  if(! WiFi.config(ip, gateway, subnet)) {<br>    Serial.println(&quot;Cannot set static IP&quot;); <br>  }<br>  // Wait for connection<br>  while (WiFi.status() != WL_CONNECTED) {<br>    delay(500);<br>    Serial.print(&quot;.&quot;);<br>  }<br>  Serial.println(&quot;&quot;);<br>  Serial.print(&quot;Connected to &quot;);<br>  Serial.println(ssid);<br>  Serial.print(&quot;IP address: &quot;);<br>  Serial.println(WiFi.localIP());</pre><pre>  server.on(&quot;/&quot;, handleRoot);<br>  server.onNotFound(handleNotFound);</pre><pre>  server.begin();<br>  Serial.println(&quot;HTTP server started&quot;);<br>}<br>void loop(void){<br>  server.handleClient();<br>}</pre><p>PS : I’ll update the article in the future</p><p>PS : I didn’t check my grammar, so feel free to comment me any note</p><p>:)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a514549c4346" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Programming Concepts : Immutability (Part 1)]]></title>
            <link>https://medium.com/jsplayground/programming-concepts-immutability-part-1-bb48f2fb6964?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb48f2fb6964</guid>
            <category><![CDATA[concept]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Sun, 03 Sep 2017 13:40:21 GMT</pubDate>
            <atom:updated>2017-09-03T14:15:43.543Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Immutability in plain English according to dictionaries means : “unchanging over time or unable to be changed”, for example when I say “Earth is orbiting the sun, it’s an immutable fact”.</blockquote><h3>Intro to the immutability in programming “constant and not changing”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*pLZCly0nF1Xi5u8J1na2Uw.png" /></figure><p><strong>In programming</strong> the Immutability is meant to be making variables, objects <strong>not changing</strong>. This is done in most of the programming languages by adding a constant (or const) keyword in front of the variable/object that is being declared/initialized so that we define it as a read-only value. But this’s not the case in JS.</p><p>Let’s consider this example :</p><pre>const obj = {<br> prop1 : ‘val1’, <br> prop2 : ‘val2’<br>}</pre><p>so this means that obj is read only and we cannot alter the properties of it, I mean:</p><pre>obj.prop1 = &#39;value1 Changed&#39;;</pre><p>This should throw an error or give a warning at least, but guess what happens the object actually changes! So it comes to our mind “What the heck is the const for?”. Well, actually it means “don’t change the reference of the object to something else”, look at the following examples:</p><pre>const obj = { prop1:&#39;val1&#39;, prop2:&#39;val2&#39; }<br>obj.prop1 = &#39;value changed&#39;; <br>console.log(obj); // { prop1:&#39;value changed&#39;, prop2:&#39;val2&#39; }<br>obj = { prop1: &#39;value changed again&#39;, prop2:&#39;val2&#39; } // this will give an error </pre><p>The last line will give you a type error that’s like this</p><pre>TypeError: Assignment to constant variable.</pre><p>So JS handles the immutability differently, there’re immutable datatypes which are:</p><ul><li>Boolean</li><li>Number</li><li>String</li><li>Symbol</li><li>Null</li><li>Undefined</li></ul><p>which means that any type from the above ones cannot be changed if you&#39;ve used the const word.</p><p>And the following are mutable “can change content but cannot change reference”:</p><ul><li>Object</li><li>Array</li><li>Function</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FIslamNegm%2Fembed%2Fpreview%2FrzRLYr%3Fheight%3D600%26slug-hash%3DrzRLYr%26default-tabs%3Djs%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io%26embed-version%3D2&amp;url=https%3A%2F%2Fcodepen.io%2FIslamNegm%2Fpen%2FrzRLYr%3Feditors%3D0010&amp;image=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fi.cdpn.io%2F343446.rzRLYr.small.55bcc16b-00ba-4636-bcf5-4d37fbf3539a.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ea10846cb4abbbe0533c8beba2f6171/href">https://medium.com/media/5ea10846cb4abbbe0533c8beba2f6171/href</a></iframe><p>In part 2 we’ll be discussing the following:</p><ul><li>how to implement immutability in plain JS</li><li>and how to use more sophisticated library (<a href="https://facebook.github.io/immutable-js/">immutable.js</a>) to do the magic for you, especially in large programs</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb48f2fb6964" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jsplayground/programming-concepts-immutability-part-1-bb48f2fb6964">Programming Concepts : Immutability (Part 1)</a> was originally published in <a href="https://medium.com/jsplayground">jsPlayground</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teachers’ Passion’s Very Vital]]></title>
            <link>https://inegm.medium.com/teachers-passion-s-very-vital-16f3be9c6ae3?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/16f3be9c6ae3</guid>
            <category><![CDATA[role-models]]></category>
            <category><![CDATA[passion]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[teaching]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Tue, 28 Feb 2017 09:54:01 GMT</pubDate>
            <atom:updated>2017-02-28T09:58:31.482Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*LhLBHSy4K3eJUV6ByF1XTw.png" /><figcaption>Bruce Yeany playing with toy made from electrostatic laws of physics</figcaption></figure><p>Bruce Yeany is an American Physics Teacher for high school students. He’s one of the most passionate teachers I’ve seen. The reason behind why I am typing this small article is to spot the light on these good examples to follow.</p><p>I’ve discovered this <a href="https://www.youtube.com/user/YeanyScience/about">YouTube channel</a>, 3 months ago. Since this time, I’ve been dedicated to watching this channel because of its awesome homemade ideas that can anyone apply and learn what’s the physical explanation behind it.</p><p>Here’s some of my favorite videos:</p><h4>1. Electrostatic Floating Rings</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FU6bKDaZiy_k%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DU6bKDaZiy_k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FU6bKDaZiy_k%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bb82595cc9e9bb45a8e18f7cce9d4d8/href">https://medium.com/media/7bb82595cc9e9bb45a8e18f7cce9d4d8/href</a></iframe><h4>2. Understanding the Air Pressure Concept</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FkRR0CluqaX4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkRR0CluqaX4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkRR0CluqaX4%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b657c504f70cc43ef716617a8088598/href">https://medium.com/media/1b657c504f70cc43ef716617a8088598/href</a></iframe><h4>3. Does paper make you bleed?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FgVrvyIHFxHI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgVrvyIHFxHI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FgVrvyIHFxHI%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b53ce1247f79eade1f07f869cc52a76c/href">https://medium.com/media/b53ce1247f79eade1f07f869cc52a76c/href</a></iframe><p>And more you can find on his channel.</p><p>Have a good time ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16f3be9c6ae3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Timer 555 vs. Micro-controllers at Long Timing Applications (hours): Technical Overview & Tips]]></title>
            <link>https://inegm.medium.com/555-vs-microcontrollers-for-low-frequencies-a65e88270489?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/a65e88270489</guid>
            <category><![CDATA[microcontrollers]]></category>
            <category><![CDATA[hardware]]></category>
            <category><![CDATA[electronics]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[timer-555]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Mon, 17 Oct 2016 02:10:57 GMT</pubDate>
            <atom:updated>2016-10-17T02:21:30.837Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*jt75_UHlINjgXTfL.GIF" /></figure><p>There was a question on a group that I’ve been following on Facebook. The question was highlighting a critical application for the famous timer 555.</p><p>The question was: <br>“ If I’ve a load that I want to turn it on for 8 hours and off for 16 hours, is that possible by a circuit based on 555 ic? and it will be for industrial environment.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*capjuXVAcgp2WLpi.jpg" /><figcaption>Image courtesy: amandaghassaei @ instructable.com</figcaption></figure><p>Short answer for the question (in my opinion) is : “NO”</p><p>In the long answer I will go through some technicalities about the timer 555 and the micro-controllers in general.</p><blockquote><strong>PS : all the information here are based on my opinion, I don’t clam that my answer is perfect. So, please enrich my knowledge with your precious comments :)</strong></blockquote><h3>The Long Answer</h3><p>Let’s break the question into pieces to be able to focus on every problem by itself. When I am breaking a problem to be solved, I am asking myself some questions. And here’s my questions and main headlines:</p><ol><li>Does the <strong>timer 555 support</strong> stability at <strong>low frequencies?</strong></li><li>How I can <strong>test </strong>my prototype?</li><li>Engineering tip : “Do it with the <strong>lowest cost</strong> and the <strong>highest achievable quality</strong> ”</li><li>For <strong>industrial environment</strong>, what are the <strong>precautions </strong>that should I take?</li><li>Other solutions?</li></ol><h3>Timer 555 and Low Frequencies</h3><p>If you’ve checked how the timer 555 work you’ll find that it works in two modes, of course we’ll stick with the “astable mode” that doesn’t have stable state (also known as square wave mode) as we are going to repeat ourselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/0*pBoWeu87EL6chU09.gif" /><figcaption>Astable mode operation timer 555 — Picture courtesy : 555-timer-circuits.com</figcaption></figure><p>As we know the timer 555 timing is based on an RC circuits. So, technically I didn’t find any papers or sources that limits the lowest frequency. But I will elaborate why it’s a hard thing to determine this.</p><h4>1. The R &amp; C tolerances</h4><p>The first problem in timing the timer is the RC tolerances, in best cases if you’ve used metal film resistors and good capacitors with very low leakage currents.</p><p>You’ll have at least ±0.1% factory tolerance add to this the non-linear value change with temperature. So it’s always a wise habit to not to deal with changing quantities with temperature (the industrial environment can change in temperature a lot).</p><h4>2. The capacitor leakage current</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/0*wVLtdlv-CBd0IfYh.gif" /></figure><p><strong>The leakage current is an indication of the insulation resistance.</strong> The insulation resistance is expressed as a parallel resistor with the capacitance.</p><p>So if you’ve an ideal capacitor, you’ll have the insulation resistance is infinity, and the leakage current = 0. But this isn’t the case in real life. The leakage current will try to <strong>discharge </strong>the capacitor, <strong>so if the charging current isn’t enough -which is the case by the way when you use timer 555 for large intervals, you seem to use larger resistors-. This will make it impossible for the timer to reach the 2/3 volt to switch the state of the output wave.</strong></p><h4>3. Power of timer 555 is interrupted = time reset</h4><p>If the power cable for the timer circuitry is interrupted for some reason, you’ll find your self restarting the whole timing process, which is very frustrating!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*jt75_UHlINjgXTfL.GIF" /></figure><h4>4. Cost of circuitry &amp; frequency division</h4><p>If we’ve managed somehow to find the proper components with accepted tolerances and leakage currents then managed to isolate it from the effect of temperature. The question is “How much will it cost?”.</p><p>Let’s say if I’ve managed to make the timer 555 to output square wave of 1/600 Hz (T= 10 min), this means that I need something like frequency divider.</p><p>The frequency dividers that can be used are:</p><ol><li>Binary counters, not decade ones</li><li>T flip-flops</li></ol><p>As I will divide the frequency by 2 at each stage, this means that I want about 96 divisions or (binary bits). This means that I will use <strong>96 T-flip-flops(12 Octal T-flip-flops) </strong>or (12 binary counter).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/1*hFG9DriGJFMTf49uGYh3sQ.png" /></figure><p>It’s cumbersome to do all the connections and worse when making the payment!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*_xZ7gIevNc06DVlp.jpg" /></figure><h4>5. Testing time = 16 hours</h4><p>If you’re planning to test you circuit, I think you’ll spend the worst 16 hour of your life. You’re torturing yourself to test it? Come on!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*to68bQiACVQJc_l6.jpg" /></figure><p>From all the above problems, it’s a very wrong decision to depend on the timer 555 to do this job for you.</p><h3>Solutions?</h3><p>Yes, there’re lots of solutions using the micro-controllers, you can use one of these small and low cost micro-controllers:</p><ol><li>PIC 10F200 / PIC 12F675</li><li>ATiny 4 / ATtiny 25 /45/85</li></ol><p>I will post some tips to consider.</p><h4>1. Basic solution: using delays and some while loops</h4><p>You can go simple as programming delays with the largest time you can type (always set by the parameter type</p><h4>2. Nested loops</h4><p>If can’t make it up for big periods just use nested loops, as nested loops are multiplied in each other. Ex:</p><pre>for(i=0; i&lt;300;i++)<br>   for(j=0; j&lt;200; j++)<br>      // code will be executed 200*300 times</pre><h4>3. Use low level assembly code</h4><p>Write the program using <strong>simple assembly code</strong> that the supplier will provide, this will make you able to <strong>calculate</strong> <strong>the time </strong>of loops overhead and calculate how exactly every line will take to execute. This is the power of assembly code!</p><h3>More Robust solution</h3><p>If it’s up to me to do this project I will use the lowest cost microcontroller that have both<strong> ROM and RTC (Real Time Clock)</strong> interface protocol and just program it and I will <strong>not worry</strong> about the <strong>precision</strong> and the<strong> power interrupts</strong>, yes It might be costy compared with the microcontroller solution, but it worth it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*31vISeHvD3lDOjq5da5UMw.png" /><figcaption>RTC Real Time Clock and EEPROM DS3231 AT24C32 Module with SPI Interface</figcaption></figure><h3>More Tips to Consider When Designing for Industrial Environment</h3><p>You should take care when you’re designing your circuits for the industrial environment</p><h4>1. Good ventilation &amp; dirt immune</h4><p>You can choose a box that has good holes and ventilations in the right angle that will not make the dirt and sand pass with ease.</p><h4>2. Vibration immune</h4><p>If your circuit will be fixed on a vibrating surface (maybe near a rotating motor), you should double check that your connections won’t be lose if the circuit is vibrating.</p><p>You can use damping balls that’re used in damping the vibrations in the FPV (First Person View) cameras.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*u-LvuO56IG0c33ew6GP25A.png" /><figcaption>Vibration damping balls</figcaption></figure><h4>3. EMI (Electromagnetic Interference) Shielding [will be updated]</h4><p>I don’t have any time to write this section, so it will be updated soon.</p><h3>Summary</h3><p>We have talked about the inappropriateness of using timer 555 for large periods of time. And we have discussed the suitable microcontroller based solutions. And in the last sections is about tips for industrial environment circuit design.</p><p>If you’ve any comments or feedback, please write it down in the comment section :). I am looking forward to read your precious comments.</p><p>Alsalam Alaikom</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a65e88270489" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I get entertained with science and improve my English listening (with these 5 YouTube channels)]]></title>
            <link>https://inegm.medium.com/how-i-get-entertained-with-science-and-improve-my-english-listening-with-these-5-youtube-channels-699d373ea3a0?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/699d373ea3a0</guid>
            <category><![CDATA[entertainment]]></category>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[learn-english]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[science]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Sat, 08 Oct 2016 18:29:49 GMT</pubDate>
            <atom:updated>2016-10-09T18:41:33.888Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMIiOkcbE84CiRfOCI4GVA.jpeg" /></figure><p>I had a friend of mine who asked me to tell him how I improved my English listening. So I write this post to be able to help him and to help anyone needs some tips I used to improve my English listening.</p><p>PS : I don’t claim that every tip will work best for you, you’ve to find your own methods. The purpose of this article is to share the experience.</p><p>Without any further introduction, here I will present some YouTube channels I like to help me improve the listening and speaking -by imitating the host- of my English.</p><h4><a href="https://www.youtube.com/user/Vsauce">1. Vsause</a></h4><p>Vsause is one of my favorite channels ever, “Michel” the host speaking is very engaging, and always starts with the curious question then take you to a journey in science.</p><p>One of the coolest videos he made is about the word “Random”:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9rIy0xY99a0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9rIy0xY99a0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9rIy0xY99a0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ecb0e7c832ad747beddc8c167250e4f7/href">https://medium.com/media/ecb0e7c832ad747beddc8c167250e4f7/href</a></iframe><h4><a href="https://www.youtube.com/user/coldfustion">2. Cold-Fusion</a></h4><p>The guy who’s behind this channel do fantastic job in making documentary-like YouTube videos, he’s a master in this aspect. He’s Indian by the way, but I really liked his accent.</p><p>One of my favorite videos is:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FtCUuvyVwbJs%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtCUuvyVwbJs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FtCUuvyVwbJs%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0036ce30cab4af9057b148dafcf57fa1/href">https://medium.com/media/0036ce30cab4af9057b148dafcf57fa1/href</a></iframe><h4><a href="https://www.youtube.com/user/colinfurze">3. Colin Furze</a></h4><p>Colin is a British garage inventor / video maker. He’s very talented in making ideas into real things. His accent is great (I love both the British and Australian accents :D).</p><p>I really encourage you to see his video, they’re stunning and if you’re an engineer -like me-, you’ll love them. Here’s one I like:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FsoxxPyaAT1k%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DsoxxPyaAT1k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FsoxxPyaAT1k%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fbb55e49a2b3e011f8d6eb5623d1ffc9/href">https://medium.com/media/fbb55e49a2b3e011f8d6eb5623d1ffc9/href</a></iframe><h4><a href="https://www.youtube.com/user/Vsauce3">4. Vsause 3</a></h4><p>I didn’t repeat that, this is another science-based channel. I like the host “Jake” as he’s one of the greatest cinematographers ever. He can mix science with astonishing video capturing and editing. He’s a pure talent.</p><p>Without any more words, ladies and gentlemen I present to you Jake!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBIePWBgKaXw%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBIePWBgKaXw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBIePWBgKaXw%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/311f2a9bb486fea47a15d67630e116f1/href">https://medium.com/media/311f2a9bb486fea47a15d67630e116f1/href</a></iframe><h4><a href="https://www.youtube.com/channel/UCUi4aspUAMcEG5ZEdnOrBQg">5. Freeze HD</a></h4><p>If you love tech gadgets that looks like they’re from the future, then you’ll like this channel. If you’re familiar with “<a href="http://www.kickstarter.com/%E2%80%8E">Kick Starter</a>” website you’ll find this channel very familiar. The videos of every 10 product or so are combined together in one video. Anyway it’s very inspiring channel to see.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcsoUVZfM4Jg%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcsoUVZfM4Jg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcsoUVZfM4Jg%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2e50d27e655ba1bca80c6b1ddf4cc99/href">https://medium.com/media/c2e50d27e655ba1bca80c6b1ddf4cc99/href</a></iframe><h3>So what to do now?</h3><p>Don’t forget that YouTube CC “Closed Captions” service that makes you either see the English subtitles that the user has uploaded or it generates text based on (speech-to-text recognition system).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*5bXRBpSAPe1VCh2bYhQ1SQ.png" /><figcaption>YouTube Closed Caption Option is really helpful to learn English</figcaption></figure><p>Relax and have some fun with these channels that I pet you’ll like it. Please share in the comments if you’ve any other interesting YouTube channels. :)</p><p>Salam ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=699d373ea3a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solution of Prolific PL2302 (USB to Serial TTL) Driver Problem with Windows 10]]></title>
            <link>https://inegm.medium.com/pl2302-driver-2b46db75e60c?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b46db75e60c</guid>
            <category><![CDATA[driver]]></category>
            <category><![CDATA[usb]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[windows-10]]></category>
            <category><![CDATA[ttl]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Fri, 22 Jul 2016 00:50:55 GMT</pubDate>
            <atom:updated>2016-07-22T00:52:09.109Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello again! My friends and I wanted some USB to TTL converters. We were searching for available converters in local electronics shops but we didn’t find any of the available FTDI based converters and there was an expensive cable (about 150 L.E). After a while we did find the Prolific PL2302 based converter, which appears in the picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*GZLt_MfkguaXAj7bUU1NOQ.png" /><figcaption>Profilic PL2303 based USB to Serial TTL converter</figcaption></figure><p>And after some research I found the solution, here in the post I’ll try to organize them to help other people save their valuable time.</p><h3>The Problem?</h3><p>The problem is that this device doesn’t work under Windows 10, so it’s pretty annoying (even Windows 10 installs the latest drives if you’re connected to internet).</p><p>The problem is that the latest driver doesn’t work and you’ve to downgrade according to user “ThierryDAVROUX” reply in the <a href="http://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/prolific-usb-to-serial-comm-port-windows-10/0a4f8e48-7135-4434-9d10-349c9ce87fcf?auth=1">Microsoft answers community.</a></p><h3>So, What is The Solution?</h3><p>You’ll find the solution clear here: <a href="http://domoticx.com/pl2303-usb-to-uart-bridge-drivers-windows/">http://domoticx.com/pl2303-usb-to-uart-bridge-drivers-windows/</a></p><h3>Does it work?</h3><p>Yeah, I’ve downgraded the driver to 3.3 version and it worked like a charm for me :D, and I’ve programmed a Bluetooth module with it using AT commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*YLnYWr6W9s4xI2xVyR50lg.png" /></figure><h3>A bonus !!</h3><p>If you’re interested in programming the Bluetooth Module HC-05 or HC-06 you can read this instructable.</p><p><a href="http://www.instructables.com/id/AT-command-mode-of-HC-05-Bluetooth-module/?ALLSTEPS">http://www.instructables.com/id/AT-command-mode-of-HC-05-Bluetooth-module/?ALLSTEPS</a></p><p>Please share this post if you find it useful, and leave a comments if you’ve any other questions or even opinions about the style of writing.</p><p>Peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b46db75e60c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Start to Simple DAQ System using PLX-DAQ Excel & Arduino]]></title>
            <link>https://inegm.medium.com/quick-start-to-simple-daq-system-using-plx-daq-excel-arduino-d2457773384b?source=rss-4265bc4244be------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2457773384b</guid>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[data-acquisition]]></category>
            <category><![CDATA[plx-daq]]></category>
            <dc:creator><![CDATA[inegm.dev]]></dc:creator>
            <pubDate>Sat, 16 Jul 2016 17:21:07 GMT</pubDate>
            <atom:updated>2016-07-16T21:41:30.028Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*vd8u8Ua5gRlVqWb0YNvYig.png" /></figure><p>From about two days I’ve been asked to edit a graduation project that relies on two Arduinos that are used for the data acquisition purpose in two different areas and the communication channel was the XBee WiFi module.</p><p>It was a straight forward project but when I was checking it I found that they’re using a cool add-on for DAQ (Data Acquisition). They were using <a href="https://www.parallax.com/downloads/plx-daq">PLX-DAQ</a>.</p><h3>What’s PLX-DAQ?</h3><p>PLX-DAQ is a simple add-on for Microsoft Excel that make it easy to simply create log excel sheets for laboratory purpose or other DAQ purposes. You simply install it and open the sample excel file then you access the VBA code (Visual Basic for Applications) -which is implementation of VB to be used inside Office Suite-.</p><h3>So, How PLX-DAQ Is Useful?</h3><p>Let’s say if you simply want to gather the data of sensors and then use Excel to draw charts or diagrams for experiment you want, so PLX-DAQ and Arduino are super easy to use and start.</p><h3>1. Installing PLX-DAQ</h3><p>First you need to download the ZIP file from the <a href="https://www.parallax.com/downloads/plx-daq">website here.</a> After that un-Zip it and then enter the setup and follow along the installation process after that you’ll find that there’s a desktop folder called “PLX-DAQ”. Enter it and then open the Excel file.</p><h3>2. Enabling the Macro and Active-X</h3><p>As we know that Macro is a small program that automates steps you use in order to boost productivity, but beware! Don’t try to run any macro you don’t know the source of it, because it maybe a virus that will delete all your office files. So, Excel doesn’t allow macros to run by default. In order to enable it you will have to do the following:</p><ol><li>Show the hidden (Developer tab).</li><li>Enable the Macros.</li></ol><h4>1. Show The Hidden “Developer Tab”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*B3EMPRG3tgH2qsMiQueNNw.png" /></figure><ol><li>Click the <strong>File</strong> tab.</li><li>Click <strong>Options</strong>.</li><li>Click <strong>Customize Ribbon</strong>.</li><li>Under <strong>Customize the Ribbon</strong> and under <strong>Main Tabs</strong>, select the <strong>Developer</strong> check box.</li></ol><h4>2. Enable Macros</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*phhFPC5XpPTw2qRYhPa4qg.png" /></figure><h3>3. Arduino Code</h3><p>PLX-DAQ relies on the UART serial communication thus you’ve to use the Serial.print() and other functions from the serial class.</p><p>Here’s a simple program that sends both:</p><ol><li>Time in milliseconds form the moment the Arduino resets</li><li>Voltage on the analog input A0.</li></ol><pre>unsigned long int milli_time;    //variable to hold the time</pre><pre>float voltage;         //variable to hold the voltage form A0</pre><pre>void setup() {<br>  Serial.begin(128000);               //Fastest baudrate<br>  Serial.println(&quot;CLEARDATA&quot;);        //This string is defined as a <br>                                      // commmand for the Excel VBA <br>                                      // to clear all the rows and columns<br>  Serial.println(&quot;LABEL,Computer Time,Time (Milli Sec.),Volt&quot;);  <br>                                      //LABEL command creates label for <br>                                      // columns in the first row with bold font<br>}</pre><pre>void loop() {<br>  milli_time = millis();<br>  voltage = 5.0 * analogRead(A0) / 1024.0;<br>  Serial.print(&quot;DATA,TIME,&quot;);<br>  Serial.print(milli_time);<br>  Serial.print(&quot;,&quot;);<br>  Serial.println(voltage);<br>    <br>  delay(100);                    //Take samples every one second<br>}</pre><p>Then upload this code to your Arduino.</p><h3>4. Running the PLX-DAQ</h3><p>In Excel you’ll have only to open the file “PLX-DAQ” then automatically it Excel notify you that there’s an Active-X macro wants to run, hit OK then a view like this should happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*GklHHdnITCTBZdBWqbv_GQ.png" /><figcaption>PLX-DAQ configuration</figcaption></figure><p>You’ll have to choose the correct port and baud-rate, in my case “COM 9” and “128000”, then hit “Connect”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*DD9we0mFNfPSvbLpCz68UQ.png" /><figcaption>PLC-DAQ successfully connected and logging data in Excel columns</figcaption></figure><p>After some seconds you’ll have a lot of data to play with. Let’s draw some curves :D.</p><h3>5. Making Use of Excel Power (Drawing Charts)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*YzIKwAIvdjRiSWmONsgADA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*T9vYgzPkmeS4owUGbdzGKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*B-oEL4q6-lfCu2xc3Tuz-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*ta-8Nyfo5fq8WmTjRROvzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*b5e_AjDa6IZQYEvX-2cI4w.png" /></figure><p>Then click “OK”. You’ll have the line drawn like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*m0xo99rzTIyPYUxI6a3kSw.png" /></figure><p>This isn’t good becuase the X-axis still have an automatic counter and we want the time (per millis) to be on that axis. so here’s how you do it.</p><p>You’ll have to edit the type of this axis to be “data axis” as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*WDwG4F75RXR-Rqe0WwMxrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*vYwivHoRXKU7Bl-Ozw_ylQ.png" /></figure><p>Then voila! You’ll have your chart ready</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*6RFT78_LJOBKqT-dw_iIYA.png" /></figure><h3>Advanced Techniques</h3><p>You can add the power of VB in your excel DAQ and do all other interesting stuff like playing a sound when a long process of “DAQing” is complete ,fire an alarm if something went wrong (based on the data values) or alter the user form in a way that has a lot of features and other things.</p><p>This will be the topic for another post about it, if you’ve any ideas that can be implemented don’t hesitate and comment them here.</p><h3>That’s all for now!</h3><p>That’s all for now if you found this helpful please share it. And if you have any comments or ideas that you want to build please leave them in the comments.</p><p>Thanks for your time, see you later!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2457773384b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>