Arduino

Hans-Petter Halvorsen

What is Arduino?

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs, like light sensors, activating a motor, turning on an LED, etc.

A lots of different Arduino boards exists, but Arduino UNO is the most popular and used Arduino board.

Arduino is very popular in IoT projects and applications.

Introduction to Arduino (YouTube) + PowerPoint (PDF)

 

Arduino Home Page: https://www.arduino.cc

Download Arduino Software (free)

Want to buy an Arduino? You can buy it many places online, e.g., Kjell & Company (Norway), Elfa, RS, Sparkfun, DigiKey, ebay, etc.

You can either buy an Arduino Starter Kit or just the board (e.g., Arduino UNO), but then you need USB-cable, a breadboard, different sensors, etc. in addition. An Arduino Starter Kit includes everything you need to get started with Arduino.

 

Programming with Arduino (Textbook)

Below you find my Textbook "Programming with Arduino":

Programming with Arduino (PDF) (ISBN: 978-82-691106-3-0)

Programming with Arduino- PowerPoint Slides (PDF)

Arduino Videos (YouTube Playlist)

 

Arduino Programming - In Norwegian (Textbook)

Below you find my Textbook "Arduino Programming" (in Norwegian):

Arduino Programmering (PDF) (ISBN: 978-82-691106-2-3) - In Norwegian

Arduino Programmering - PowerPoint Slides (PDF) - In Norwegian

 

 

 

 

Arduino UNO R4

In mid 2023 a new version of the popular Arduino UNO R3 was released, this new version is called Arduino UNO R4. Arduino UNO R4 comes in 2 different versions: Arduino UNO R4 Minima and Arduino UNO R4 WiFi.

Arduino UNO R4 Tutorial (PDF) - This Tutorial introduces the new Arduino UNO R4and some of the new features.

Arduino UNO R4 WiFi and ThingSpeak Tutorial (PDF) - ThingSpeak is an IoT Cloud Platform for Datalogging and Monitoring.

 

 

 

Arduino Serial Monitor and Plotter

Arduino Serial Monitor and Plotter (YouTube) + PowerPoint (PDF)

Serial Communication between Arduino and LabVIEW (YouTube) + PowerPoint (PDF)

 

 

 

Arduino Classes and Libraries

Video: Create your own Arduino Classes and Libraries:

Note! Error in the Example: The formula should be Tc = (Tf-32)*((float)5/9); The reason for this is the the Arduino compiler treats dividing 2 constants like an integer, this means 5/9 is always 0. By including (float) you forces the compiler to treat it like a float value.

 

The video is also available from my official YouTube Channel: https://www.youtube.com/IndustrialITandAutomation

PowerPoint:

Create your own Arduino Classes and Libraries

Code:

Download Example Library (Fahrenheit)

 

 

Internet of Things (IoT)

Cloud services and IoT solutions are becoming increasingly popular. Arduino is popular to use in different IoT applications.

 

ThingSpeak

ThingSpeak is an IoT platform service that lets you collect and store sensor data in the cloud and develop Internet of Things (IoT) applications.

Arduino and ThingSpeak (YouTube) + PowerPoint (PDF)

 

IoT Sensors

DHT11/DHT22 Temperature and Humidity Sensor

The DHTXX sensors are temperature and humidity sensors and they comes in 2 flavours: DHT11 and DHT22. They contains a chip inside that does some analog to digital conversion and spits out a digital signal with the temperature and humidity. Read more.

Arduino and DHT22 Temperature and Humidity Sensor (YouTube) + PowerPoint (PDF)

 

DS18B20 Temperature Sensor

DS18B20 is a 1-Wire Digital Temperature Sensor, this means the Sensor only need 1 Pin for Communication (+ one pin for GND and one pin for 5V). Accuracy +/−0.5℃.

Arduino and DS18B20 1-Wire Temperature Sensor (YouTube) + PowerPoint (PDF)

 

AM2320 Temperature and Humidity Sensor

The AM2320 sensorss is a temperature and humidity sensor with I2C. Read more.

Arduino and AM2320 Temperature and Humidity Sensor (YouTube) + PowerPoint (PDF)

Note! If you get a "NaN" issue reading both the Temperature value and the Humidity value, see here. This issue is also explained in the video.

 

 

 

Control Engineering

Arduino Control System (YouTube) + PowerPoint (PDF)

Arduino Control Library (YouTube) + PowerPoint (PDF)

 

 

 

LabVIEW LINX Toolkit with Arduino

Here we will use the LabVIEW LINX Toolkit in combination with the Arduino UNO device.

This Tutorial shows how we can use Arduino in combination with the LabVIEW Programming environment. LabVIEW LINX Toolkit is an add-on for LabVIEW which makes it possible to program the Arduino device using LabVIEW. In that way we can create Data Logging Applications, etc. without the need of an expensive DAQ device. If you don’t have LabVIEW Professional Software, you may use the LabVIEW Community Edition (free for non-commercial use). Then you will get a very low-cost DAQ/Datalogging System!

Tutorial:

LabVIEW LINX with Arduino Tutorial

 

Videos:

Introduction to LabVIEW LINX and Arduino (YouTube)

LabVIEW LINX Arduino DAQ System (YouTube)

LabVIEW LINX Arduino Temperature Sensors (YouTube)

 

Code:

Download Code

 

Additional LabVIEW LINX Resources:

LabVIEW LINX, Arduino and ThingSpeak (YouTube) + PowerPoint (PDF)

LabVIEW LINX and Arduino using SPI and I2C (YouTube) + PowerPoint (PDF)

 

 

IoT Applications with MATLAB

You can also use MATLAB when working with Internet of Things (IoT), Arduino and Rapberry Pi.

Arduino Support Package for MATLAB

Here you find more information about Raspberry Pi.

 

 

Additional Resources

Digital to Analog Converter (DAC)

Arduino and DAC (YouTube) + PowerPoint (PDF)

 

Arduino Pulse Width Modulation (PWM)

Arduino Pulse Width Modulation (PWM)

 

SPI

Using MCP49xx DAC chip in Arduino

Additional Resources

Below you will find more interesting resources


IoT

Internet of Things

Raspberry Pi

Raspberry Pi resouces





IoT Projects

Here you find lots of interesting IoT Projects, etc.

Programming

Programming Resources