Arduino 101 : the Course From the Tech Guy

by Romanovich0195 in Circuits > Arduino

223 Views, 1 Favorites, 0 Comments

Arduino 101 : the Course From the Tech Guy

Arduino Mega.jpg

I hope, that many people, especially newbies, who want to dive into the world of Arduino, will find out this and other my articles/Instructables (which I am going to post regularly) useful.

This wouldn't be like a regular Copy-&-Paste lessons. It would be much more than.

Hi! I'm Roman and I am a Middle PHP Developer.

This will get some pre-history, so if You would like to go next step - just scroll down to the Requirements.

I have started programming when I was 10 y.o. and it has done a really big impact on me. Because it was that interesting - I couldn't believe. Besides, not a lot of guys of the age of mine were able to show up such skills at school. It was even before we have started learning Informatics, as a subject, and Programming within the course.

So, I just wanted to help out people. To make their lives easier and provide some tools, which will help them go against the routine and solve some kind of problems. And 2 years ago I came up with Arduino, as an addition.

Then, I have decided to go up with some kind of course and create such things as this one. Later, I will be doing videos on Youtube, where You will be able to see, how to set up and do things to get a perfect match.

But here, You will get more about the code essentials from me. Hot to properly structure code, what are the principles of programming and why do they important. All the things we are doing - is Engineering. And there is no place for a mistake to be made. So, read clearly and if You will come up with some questions - just put it down into the comments.

Install Required Software/Get Required Hardware

To start the process of the development, You will need:

Software

- Visual Studio Code

- Platform.IO


Hardware

- One of the Arduino Boards (Mega 2560, Nano, Leonardo, etc)

- Breadboard

- Dupont wires (Male-to-Male)

- Resistors of various nominal

- RGB Leds

- Displays, etc

Programming Principles

If You would like to write an efficient and understandable code, You need to get know more about programming principles. In our project examples, we will be following the next principles:

- SOLID

- DRY (Don't Repeat Yourself)

- KISS (Keep It So Simple)

- YAGNI (You Aren't Gonna Need It)


What's SOLID are?

SOLID can be transcribed as:

- [S] Single Responsibility (Each class is responsible for one type of a kind)

- [O] Open-Closed Principle (Classes nor Objects are Open to be extended, but modified)

- [L] Liskov Substitution (Classes nor Objects could be replaced by their subtypes with no damage)

- [I] Interface segregation (Better to have more specialized interfaces, instead of having one universal)

- [D] Dependency Inversion (Classes should be built on abstractions)

What's DRY are?

DRY means Don't Repeat Yourself. So, when You do make some solution and You see, that there are some methods which are the same - just make a helper class with those methods (even possible to call statically) to keep it as simple as possible. But this one is another story.

What's KISS are?

KISS stands up for Keep It So Simple. It means, that all Your solutions should have as less lines of code as possible, but also to not overcomplicate the whole class.

What's YAGNI are?

YAGNI stands up for You Aren't Gonna Need It. It means, that You should build classes and functionality that way, what all of it, or mostly, will be in use. Because if it wouldn't be - then safely removed as You don't need it. Simple.

Try to keep up Your code as clean as possible.

Projects

This step will contain and going to be continued, because of a projects with examples and libraries, You would be able to fork and use.

Plus, I will try to create an extension for the VS Code to have You an ability to download needed libs into Your project.

Keep in mind, that projects with no links have no yet realization and would be done in the nearest future. I am trying to do as informative instructable as I can do. And later - I will be shooting a videos and adding them as instructions for You to follow up.

  • Simple LED Bulbs Controlling
  • LED's + Potentiometer (Dynamic mapping of the potentiometer values to the count of LED's)
  • Simple Weather station (v1; Humidity + Temperature)
  • Advanced Weather Station w/ LCD 1602 (v2)
  • Advanced Weather Station v2 + Settings (v3)
  • Advanced Weather Station v3 + IR (Infrared Remote) Control for display (v4)
  • Advanced Weather Station v4 + Showing the state with LED's (v5)
  • Simple RFID reader (v1)
  • Advanced RFID Reader v1 w/ Displaying data on LCD 1602 and 0.91' OLED Display (I2C) (v2)
  • Advanced RFID Reader v2 w/ Relay Control (v3)
  • Simple Single-SIM Station (v1)
  • Advanced Single-SIM Station w/ 0.91' OLED Display (v2)
  • Advanced Dual-SIM Station w/ 0.91' OLED Display (v1)
  • Advanced Dual-SIM Station v1 w/ SMS Sending
  • Vending Machine
  • Simple RGB Strip WS8212b Control (v1)
  • Advanced RGB Strip WS8212b Control v1 w/ Colors + Brightness control (Potentiometer + Buttons) (v2)
  • Advanced RGB Strip WS8212b Control v1 with IRVending Machine

All the projects and libraries will be available on GitHub.

Upcoming Projects to Be Published

7-8 March ’20
- Simple LED Bulbs Controlling
- LED's + Potentiometer (Dynamic mapping of the potentiometer values to the count of LED's)