<?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: Sbstyn</title>
    <description>The latest articles on DEV Community by Sbstyn (@sbstyn).</description>
    <link>https://dev.to/sbstyn</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%2F371655%2F54035451-d711-4139-a5de-dee4f1858a29.png</url>
      <title>DEV Community: Sbstyn</title>
      <link>https://dev.to/sbstyn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sbstyn"/>
    <language>en</language>
    <item>
      <title>What's wrong with that Arduino wining?</title>
      <dc:creator>Sbstyn</dc:creator>
      <pubDate>Wed, 18 Nov 2020 16:09:39 +0000</pubDate>
      <link>https://dev.to/sbstyn/what-s-wrong-with-that-arduino-wining-507m</link>
      <guid>https://dev.to/sbstyn/what-s-wrong-with-that-arduino-wining-507m</guid>
      <description>&lt;p&gt;I am making a sensor that can sense 3 buttons separately, I wanted to print the number of the button I am pushing to the Serial Monitor, but I did something wrong wiring my Arduino. Here is my code (I think there's nothing wrong with that part of the project):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int LedPin = 12;
int buttonPin = 2;
int buttonPin2 = 3;
int buttonPin3 = 4;
//int buttonPin4 = 5;

int buttonState = 0;
int buttonState2 = 0;
int buttonState3 = 0;
//int buttonState4 = 0;

void setup() 
{
  Serial.begin(9600);
  pinMode(LedPin, OUTPUT);
  pinMode(buttonPin, INPUT);
  pinMode(buttonPin2, INPUT);
  pinMode(buttonPin3, INPUT);
  //pinMode(buttonPin4, INPUT);
}
void loop() 
{
  buttonState = digitalRead(buttonPin);
  buttonState2 = digitalRead(buttonPin2);
  buttonState3 = digitalRead(buttonPin3);
  //buttonState4 = digitalRead(buttonPin4);

  Serial.print(buttonState);
  Serial.print(buttonState2);
  Serial.println(buttonState3);

  //delay(1000);

  if (buttonState == HIGH) {
    //Serial.println("1");
    digitalWrite(LedPin, HIGH);
  } else {
    digitalWrite(LedPin, LOW);
  }

  if (buttonState2 == HIGH) {
    //Serial.println("2");
    digitalWrite(LedPin, HIGH);
  } else {
    digitalWrite(LedPin, LOW);
  }

  if (buttonState3 == HIGH) {
    //Serial.println("3");
    digitalWrite(LedPin, HIGH);
  } else {
    digitalWrite(LedPin, LOW);
  }

  /*if (buttonState4 == HIGH) {
    Serial.println("4");
    digitalWrite(Pin, HIGH);
  } else {
    digitalWrite(Pin, LOW);
  }*/
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Problem:&lt;/p&gt;

&lt;p&gt;And some pictures with Serial output (when I press any button it outputs 111, if I don't press anything it writes 000)&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F35kjviybfh95q4y0ml2h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F35kjviybfh95q4y0ml2h.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>help</category>
    </item>
    <item>
      <title>DEV logo with HTML and CSS</title>
      <dc:creator>Sbstyn</dc:creator>
      <pubDate>Tue, 22 Sep 2020 17:41:13 +0000</pubDate>
      <link>https://dev.to/sbstyn/dev-logo-with-html-and-css-4jc6</link>
      <guid>https://dev.to/sbstyn/dev-logo-with-html-and-css-4jc6</guid>
      <description>&lt;p&gt;Hey! I am going to show you how to make a simple CSS - HTML (mostly CSS) logo.&lt;/p&gt;

&lt;p&gt;First, simply make an HTML file with this code in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
    &amp;lt;title&amp;gt;DEV logo&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;main&amp;gt;
        &amp;lt;p&amp;gt;DEV&amp;lt;/p&amp;gt;
    &amp;lt;/main&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here we will just get "DEV" printed out on our webpage.&lt;/p&gt;

&lt;p&gt;Next, we have to make a file called style.css (we linked "style.css" before) and add some properties to form the text.&lt;/p&gt;

&lt;p&gt;First, we have to remove all automatically added margins, because it can scramble our code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*{
    margin: 0;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now we can work on the text itself, we have to make it thick with the font-weight operator, make the text bigger with the font-size operator and I found a font family that's similar to the DEV logo's style, so we can add that as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p{
    font-family: 'Trebuchet MS';
    font-weight: 900;
    font-size: 50px;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After that, we can put a rounded box around the text with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p{
    border: 5px solid black;
    border-radius: 10px;
    background-color: black;
    color: white;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And in the end we can put the logo in the middle of the screen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
    text-align: center;
}
main{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So the whole style.css would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*{
    margin: 0;
}
body {
    text-align: center;
}
main{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
}
p {
    font-family: 'Trebuchet MS';
    font-weight: 900;
    font-size: 50px;
    padding: 21px 5px;
    border: 5px solid black;
    border-radius: 10px;
    background-color: black;
    color: white;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And here is the finished DEV logo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OTp63AGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wcdn0znh1qbh8khw4n09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OTp63AGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wcdn0znh1qbh8khw4n09.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
    </item>
  </channel>
</rss>
