Sir Boateng
  • ELECTRONICS
  • TUTORIALS
  • ARDUINO
  • EDUCATION
    • GES Resources
    • NTC Resources
  • APPLIED ELECTRICITY
No Result
View All Result
Sir Boateng
  • ELECTRONICS
  • TUTORIALS
  • ARDUINO
  • EDUCATION
    • GES Resources
    • NTC Resources
  • APPLIED ELECTRICITY
No Result
View All Result
Sir Boateng
No Result
View All Result

Arduino Uno Programming for Beginners Part 2

by Boateng
24th November 2022
in Arduino Projects, Tutorials
109 7
0
arduino uno programming

arduino uno programming

133
SHARES
416
VIEWS
Share on FacebookShare on TwitterShare on WhatsApp

Well, you can’t access the world wide web without having a connecting medium, can you? It is equally true that you can’t enjoy the benefits of the Arduino Uno board without knowing how to program the Arduino development board.

Arduino hardware and software work hand-in-hand. As the hardware allows you to connect other peripherals (sensors and other components) so that it can interact with the outside world, the software directs the hardware with a series of instructions and dynamic routines.

This part is about a brief introduction to the programming language, IDE and also installing the necessary software and drivers.

This tutorial is part of a series “Arduino Uno Programming for Beginners”. To get started you may need to read the first part here (overview of the Arduino hardware).

It is practically impossible to socialize with someone who doesn’t understand your language and enjoy it fully. For this reason, talking, texting and of course, sign languages are all part of enjoyable socialization.

You may also like the following articles hand-picked for you based on your page interactions.

  • Arduino Uno Programming for Beginners Part 1
  • New GES Curriculum for Basic Schools
  • Download SHS Syllabus in PDF | For Ghana Schools
  • Top 8 Arduino Projects in Proteus with Source Code
  • ESP8266 Development Board Programming with Arduino IDE

Computers and other embedded systems do talk and oh yes! in their own language (binary codes). But I must confess that there is a vast difference between a computer and human languages in terms of their flexibility. Humans are able to comprehend language with grammatical errors, mixed dialogue, and broken phrases.

Unlike humans, machine languages are very strict and sensitive. To talk to machines, you have to follow a set of rules and procedures (which can be analogized to grammatical rules) in a form of instructions. These instructions are what we called the programming language.

To code (communicate and control machines), one needs to learn a programming language.

wikipedia.org

Article Navigation

  • What is a Programming Language?
  • Arduino Uno Programming: IDE and Text Editors
  • The Arduino Programming Language Reference
  • Arduino Uno Programming: Structure
  • Data Types or Values (variables and constants)
  • Arduino Uno Programming: Functions.

What is a Programming Language?

A programming language is a set of grammatical rules, commands, instructions, and other syntax used to create a software program and also for instructing a computer or computing device to perform specific tasks. 
There are two main types of programming language namely: High level and Low level. A high-level programming language is used to program the Arduino Uno.

SEE ALSO:  Proteus 8.12 Latest Version Download for Free

A high-level language (HLL) is a programming language that enables a programmer to write programs that are more or less independent of a particular type of computer. Such languages are considered high-level because they are closer to human languages and mathematical notation.
Examples include C, C++, Java, Pascal, Python, and Visual Basic.

Low-level languages are used to write programs that relate to the specific architecture and hardware of a particular type of computer. They are closer to the native language of a computer (binary code), making them harder for programmers to understand.
Examples include Assembly Language, and Machine Code.

comparing top level and low level language
high and low-level programming code

The diagram above illustrates how high and low-level programming language is done. You will bear with me that low-level programming languages are very difficult to learn. It is, therefore, NOT surprising to see most (if not all) developers are only conversant with high-level programming languages.

The diagram below shows some of the common Programming Languages available

arduino uno: some common languages
some common languages and their capability

Arduino Uno Programming: IDE and Text Editors

IDE stands for “integrated development environment”. they contain compilers that change the high-level programming language to machine codes.  They also come with a text editor for writing the codes.

Common IDEs are Arduino IDE (Eclipse), MPLAB, Visual Studio, and Android Studio. Choosing an IDE depends on the type of programming language you want to use. Since we are learning Arduino, we will be using the Arduino IDE.

The Arduino IDE is installed the same way most windows applications are done. They are free to download and open source so there is no need to worry about a license key. Go to https://www.arduino.cc/en/Main/Software and download the latest version for your specific operating system.

arduino uno ide
Arduino IDE

Now that you have installed the IDE, let’s see what the Arduino language is and the syntaxes we can use to create amazing projects.

The Arduino Programming Language Reference

Just like we can identify parts of speech in the English language (noun, verb, adjective, etc.), the Arduino programming language can also be divided into three main parts. These are Structure, Values (variables and constants), and Functions.

SEE ALSO:  How to Register your SIM with Your Ghana Card

Arduino Uno Programming: Structure

The Arduino Structure is the element of Arduino (C++) code. This constitutes the syntax used in the C++ programming language. A structure must be specified exactly as used in the C++ library. The structure, therefore, defines the specific rules that must be followed to get the rest of the code working.

arduino uno structure
Arduino structure

Data Types or Values (variables and constants)

Arduino data types and constants. These are the types of values and constants that can be processed by Arduino. To understand Arduino variables and constants, we need to analogize the phenomena with the file format. For example, the VLC media player is specifically designed to play media file formats (such as mp3, mp4, Avi, etc.).

There is no way a vlc program will play an office file format (such as .doc, docx, pdf, etc.). As u can see, the type of file format associated with the Arduino language is the values. A value that can be changed/altered when the Arduino is executing the instructions is “Variable” and those that are fixed and cannot be altered during the program execution are “constants”.    

Arduino Data Types (variable and constants)

Arduino Uno Programming: Functions.

The function is used for controlling the Arduino board and also for performing computations. We will use a function to turn a pin ON or OFF or to set a pin to OUTPUT current or as INPUT to receive an incoming signal.

Arduino Uno functions
Arduino Functions

The three (parts) of the Arduino language are listed above. As you can see, they have been coloured to distinguish them from each other. The Arduino IDE uses the same colours to tell you the part in which a piece of code belongs. 

A code with orange color is a function, a bluecolored code is a value (variable or constant) and a code with green color is a structure. 

At sirboateng online, we learn by doing. Therefore I will explain in details the functions, variables and structure by doing mini projects with them.  You may also like this post Getting Started with LoRa RYLR998 and Arduino. It will help build wireless projects around the Arduino.

I hope by now, you have geared up for a higher level. Of course, we have a very huge mountain of projects to climb but until then, relax and have a stress-free day. farewell!. 

Join Our Tech & Edu Forum
Tags: arduino programmingarduino projects
Previous Post

Arduino Uno Programming for Beginners Part 1

Next Post

PayPal Account | How to Create a Fully Verified account

Boateng

Boateng

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

A picture of grammarly premium and grammerly free, get grammarly premium cookies for free - grammarly premium cookies daily updates free download - use grammarly premium free.png

How to Get Grammarly Premium Cookies for Free in 2023

23rd March 2023
This picture shows all Category C Schools In Ghana - Best Category C Schools in Ghana along with the regions of the location . jpg

Full List of Category C Schools in Ghana

2nd March 2023
A picture of grammarly premium and grammerly free, get grammarly premium cookies for free - grammarly premium cookies daily updates free download - use grammarly premium free.png

Get grammarly premium for free using Cookies

6th March 2023
How to start a blog and earn money online

How to start a blog and earn money online

2nd March 2023
Samsung Galaxy S23 Ultra 5G: All You Need to Know

Samsung Galaxy S23 Ultra 5G: All You Need to Know

Overview of High School Education in Ghana

Overview of High School Education in Ghana

24th February 2023

Categories

  • Applied Electricity & Electronics (4)
  • Arduino Projects (8)
  • Blogging (4)
  • Business (4)
  • Education (27)
  • Electronics (21)
  • GES Resources (12)
  • NTC Resources (3)
  • Product and Service Reviews (4)
  • Proteus (2)
  • Tutorials (21)
Sir Boateng Online

Sir Boateng Online is a platform for electronics projects, tutorials and educational resources. Aside creating tech tutorials, we also provide GES and NTC resources such as teaching syllabus, lesson notes, scheme of work and NTC trial questions.

Popular Categories

Applied Electricity & Electronics Arduino Projects Blogging Business Education Electronics GES Resources NTC Resources Product and Service Reviews Proteus Tutorials

Stay Connected

  • About Me (Sir Boateng Oduro)
  • Forum
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions

© 2023 Sir Boateng Online - Developed by Lizbotech.

No Result
View All Result
  • ELECTRONICS
  • TUTORIALS
  • ARDUINO
  • EDUCATION
    • GES Resources
    • NTC Resources
  • APPLIED ELECTRICITY

© 2023 Sir Boateng Online - Developed by Lizbotech.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In