<?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>DEV Community: Denys Shabelnyk</title>
    <description>The latest articles on DEV Community by Denys Shabelnyk (@snorri1986).</description>
    <link>https://dev.to/snorri1986</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%2F381845%2F7a5e6dfb-fb54-4721-88d3-2c7f32f3be0b.jpeg</url>
      <title>DEV Community: Denys Shabelnyk</title>
      <link>https://dev.to/snorri1986</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snorri1986"/>
    <language>en</language>
    <item>
      <title>Replace delay()</title>
      <dc:creator>Denys Shabelnyk</dc:creator>
      <pubDate>Wed, 06 Aug 2025 18:30:56 +0000</pubDate>
      <link>https://dev.to/snorri1986/replace-delay-2k4f</link>
      <guid>https://dev.to/snorri1986/replace-delay-2k4f</guid>
      <description>&lt;p&gt;Hi, guys!&lt;br&gt;
Following one of Arduino course on Udemy platform I found very useful, in my opinion, advice how to avoid using &lt;code&gt;delay()&lt;/code&gt; function, because it is not good (I am beginner in Arduino world). The lector suggest to use two variables with &lt;code&gt;millis()&lt;/code&gt; function as start mark and current time inside &lt;code&gt;loop()&lt;/code&gt; function. Code example is below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dtb380g8nwlvy991wnb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dtb380g8nwlvy991wnb.png" alt=" " width="800" height="849"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can trust in code above and believe that I have real 500 ms between part of my programm.&lt;/p&gt;

&lt;p&gt;Are you agree ?&lt;br&gt;
Happy coding!&lt;/p&gt;

&lt;p&gt;Best regards, Denys&lt;/p&gt;

</description>
      <category>arduino</category>
    </item>
    <item>
      <title>Time functions in Arduino Uno</title>
      <dc:creator>Denys Shabelnyk</dc:creator>
      <pubDate>Wed, 30 Jul 2025 18:31:02 +0000</pubDate>
      <link>https://dev.to/snorri1986/time-functions-in-arduino-uno-31a5</link>
      <guid>https://dev.to/snorri1986/time-functions-in-arduino-uno-31a5</guid>
      <description>&lt;p&gt;Arduino Uno has minimum two functions which help to get current time mark from the beginning: &lt;code&gt;millis()&lt;/code&gt; and &lt;code&gt;micros()&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;millis()&lt;/code&gt; returns time marks in milliseconds.&lt;br&gt;
&lt;code&gt;micros()&lt;/code&gt; returns time marks in microseconds.&lt;br&gt;
These two functions can be very useful if you work with sensors.&lt;br&gt;
And, do not forget to save output on a variable with type &lt;code&gt;unsigned long&lt;/code&gt;&lt;br&gt;
Happy coding!&lt;/p&gt;

</description>
      <category>arduino</category>
    </item>
    <item>
      <title>trap for beginners in C++</title>
      <dc:creator>Denys Shabelnyk</dc:creator>
      <pubDate>Thu, 24 Jul 2025 18:53:27 +0000</pubDate>
      <link>https://dev.to/snorri1986/trap-for-beginners-in-c-3k7f</link>
      <guid>https://dev.to/snorri1986/trap-for-beginners-in-c-3k7f</guid>
      <description>&lt;p&gt;Following one of C++ course I found one interesting example how to correctly use combination &lt;code&gt;std::cin&lt;/code&gt; together with &lt;code&gt;std::getline()&lt;/code&gt;.&lt;br&gt;
Look at firts example below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy14dckz3sbsek7x3ro23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy14dckz3sbsek7x3ro23.png" alt=" " width="490" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What do you think the output will be ?&lt;br&gt;
Your age is &lt;br&gt;
Your name is &lt;br&gt;
but not. Output is below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsizefkjsvqmwm7ls7nim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsizefkjsvqmwm7ls7nim.png" alt=" " width="691" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To avoid this strange behaviour always use &lt;code&gt;std::cin.get()&lt;/code&gt; before &lt;code&gt;std::cin&lt;/code&gt; and &lt;code&gt;std::getline()&lt;/code&gt; like on the code snippet below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgcvgdks15f44t6wmjpn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgcvgdks15f44t6wmjpn.png" alt=" " width="467" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you will get correct output.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fle0ufxi0op2o19l1o7v0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fle0ufxi0op2o19l1o7v0.png" alt=" " width="678" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Be careful and happy coding!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cpp</category>
    </item>
    <item>
      <title>Arduino library has few delay function: 1. delay() - as a parameter you should pass a value on milliseconds; 2. delayMicroseconds() - as a parameter you should pass a value on microseconds. I see that really first time.</title>
      <dc:creator>Denys Shabelnyk</dc:creator>
      <pubDate>Wed, 23 Jul 2025 19:59:40 +0000</pubDate>
      <link>https://dev.to/snorri1986/arduino-library-has-few-delay-function-1-delay-as-a-parameter-you-should-pass-a-value-on-4m1i</link>
      <guid>https://dev.to/snorri1986/arduino-library-has-few-delay-function-1-delay-as-a-parameter-you-should-pass-a-value-on-4m1i</guid>
      <description></description>
      <category>arduino</category>
      <category>programming</category>
    </item>
    <item>
      <title>LED frequency manipulation via COM port</title>
      <dc:creator>Denys Shabelnyk</dc:creator>
      <pubDate>Wed, 23 Jul 2025 19:48:42 +0000</pubDate>
      <link>https://dev.to/snorri1986/led-frequency-manipulation-via-com-port-15bg</link>
      <guid>https://dev.to/snorri1986/led-frequency-manipulation-via-com-port-15bg</guid>
      <description>&lt;p&gt;`#define LED_PIN 12&lt;/p&gt;

&lt;p&gt;int blinkDelay = 500;&lt;br&gt;
int LEDState = LOW; &lt;/p&gt;

&lt;p&gt;void setup() {&lt;br&gt;
   Serial.begin(9600);&lt;br&gt;
   Serial.setTimeout(10);&lt;/p&gt;

&lt;p&gt;pinMode(LED_PIN,OUTPUT);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;void loop() {&lt;/p&gt;

&lt;p&gt;if(Serial.available() &amp;gt; 0) {&lt;br&gt;
    int data = Serial.parseInt();&lt;br&gt;
    if ((data &amp;gt;= 100) &amp;amp;&amp;amp; (data &amp;lt;= 1000)) {&lt;br&gt;
    blinkDelay = data;&lt;br&gt;
    }&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;if(LEDState == LOW) {&lt;br&gt;
    LEDState = HIGH;&lt;br&gt;
  } else {&lt;br&gt;
    LEDState = LOW;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;digitalWrite(LED_PIN,LEDState);&lt;br&gt;
  delay(blinkDelay);&lt;br&gt;
}`&lt;/p&gt;

</description>
      <category>arduino</category>
      <category>snippet</category>
      <category>hardware</category>
      <category>programming</category>
    </item>
    <item>
      <title>#myArduino What baud rate is optimal for serial communication. The correct answer is 9600 or 115200</title>
      <dc:creator>Denys Shabelnyk</dc:creator>
      <pubDate>Wed, 23 Jul 2025 19:10:04 +0000</pubDate>
      <link>https://dev.to/snorri1986/myarduino-what-baud-rate-is-optimal-for-serial-communication-the-correct-answer-is-9600-or-4oai</link>
      <guid>https://dev.to/snorri1986/myarduino-what-baud-rate-is-optimal-for-serial-communication-the-correct-answer-is-9600-or-4oai</guid>
      <description></description>
      <category>arduino</category>
      <category>hardware</category>
      <category>discuss</category>
    </item>
    <item>
      <title>@myArduino What baud rate is optimal for serial communication. The correct answer is 9600 or 115200</title>
      <dc:creator>Denys Shabelnyk</dc:creator>
      <pubDate>Wed, 23 Jul 2025 19:08:34 +0000</pubDate>
      <link>https://dev.to/snorri1986/myarduino-what-baud-rate-is-optimal-for-serial-communication-the-correct-answer-is-9600-or-ga1</link>
      <guid>https://dev.to/snorri1986/myarduino-what-baud-rate-is-optimal-for-serial-communication-the-correct-answer-is-9600-or-ga1</guid>
      <description></description>
      <category>arduino</category>
      <category>network</category>
      <category>hardware</category>
    </item>
  </channel>
</rss>
