Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,208,945 members, 8,004,433 topics. Date: Saturday, 16 November 2024 at 04:07 PM

Free Arduino Tutorial - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Free Arduino Tutorial (4551 Views)

New And Hot: Lithium Battery Level Indicator With Arduino And LCD / Sine Wave Inverter Using Arduino / Hub360 Arduino Starter Kit (2) (3) (4)

(1) (2) (Reply) (Go Down)

Free Arduino Tutorial by princejude(m): 1:12pm On Feb 09, 2018
If you are interested in learning arduino programming, then this thread is for you.

1 Like

Re: Free Arduino Tutorial by rhothymie(m): 1:15pm On Feb 09, 2018
following
Re: Free Arduino Tutorial by princejude(m): 1:19pm On Feb 09, 2018
rhothymie:
following
Welcome on-board
Re: Free Arduino Tutorial by princejude(m): 1:30pm On Feb 09, 2018
Introduction to the Arduino platform

The Arduino platform is a hardware board that offers a hardware-software
integrated creative device development platform. The Arduino boards can be
interfaced with openly available peripheral devices and custom programs can
be written and loaded (embedded) into the Arduino development board:

1 Like

Re: Free Arduino Tutorial by princejude(m): 12:00pm On Feb 10, 2018
Commonly used C sketch functions

pinMode(PIN-NUMBER,I/O-MODE)
This function is used to specify whether a particular Arduino pin will be used in Input or Output mode.

digitalRead(PIN-NUMBER)
This function is used to read digital input from a digital pin. The input value is either LOW or HIGH and can be stored in a Boolean type variable.

digitalWrite(PIN-NUMBER,SIGNAL-LEVEL)
Use this function to send a digital LOW or HIGH signal on a particular pin.

analogRead(PIN-NUMBER)
This function is used to read analog input from analog pins. The input value can be stored in an integer type variable.

analogWrite(PIN-NUMBER,SIGNAL-VALUE)
Use this function to send an analog signal on a particular pin. The signal value can be specified as an integer between 0 and 1023.

delay(MILLI-SECONDS)
This function is used for halting the program execution for the specified number of milliseconds.

delayMicroseconds(MICROSECONDS)
This function can be used to halt the program execution for the specified number of microseconds.

Serial.begin(BAUD-RATE)
This function sets the baud rate for communication between the Arduino board and Arduino IDE's Serial Monitor window (also with any serial port communication program)

Serial.println("MESSAGE"wink.
This method is used to output a string message to the Serial Monitor. It results in printing each message in a separate line.

Serial.print("MESSAGE"wink.
This method is used to output a string message to the Serial Monitor. All messages sent are printed one after the other on the same line.

isnan(VALUE)
This in-built function is used to determine whether a specified value is a number or not.

tone(PIN-NUMBERFREQUENCY, MILLI-SECONDS)
Use this function to play a sound of a particular frequency on a buzzer connected to a particular pin.

pulseIn(PIN-NUMBER,LOGIC-LEVEL)
Use this function to read and measure the duration of an input signal on a particular pin. Based on the logic level specified as a parameter to the function, it will wait for and read the signal until its logic level changes. For example, when reading a HIGH signal, it waits for a HIGH input signal and measures the duration until the signal level changes to LOW.

millis()
This function returns the number of milliseconds since the Arduino board was powered on and the program started running.

1 Like

Re: Free Arduino Tutorial by kingvicky(m): 2:05pm On Feb 10, 2018
following
Re: Free Arduino Tutorial by cool318(m): 4:58pm On Feb 12, 2018
Following , Good Topic
Re: Free Arduino Tutorial by Douche: 11:46am On Mar 08, 2018
If only you werr in Lagos
Re: Free Arduino Tutorial by princejude(m): 10:36pm On Sep 22, 2018
Yes, get ready. i am about to make this lively..
Re: Free Arduino Tutorial by CodeHouse: 11:40am On Sep 24, 2018
Glad someone is talking hardware, I program arduino too..for those just starting out, I have a complete arduino kit for sale, let me know if you are interested.
Re: Free Arduino Tutorial by princejude(m): 12:01pm On Sep 26, 2018
Topic 1: The (HC-SR04) Ultrasonic sensor

Description
The HC-SR04 ultrasonic sensor uses sonar (high-frequency inaudible sound) to determine distance to an object like bats do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package.
From 2cm to 400 cm or 1” to 13 feet. Its operation is not affected by sunlight or black material like sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module.

Features

• Power Supply :+5V DC
• Quiescent Current : <2mA
• Working Current: 15mA
• Effectual Angle: <15°
• Ranging Distance : 2cm – 400 cm/1″ – 13ft
• Resolution : 0.3 cm
• Measuring Angle: 30 degree
• Trigger Input Pulse width: 10uS
• Dimension: 45mm x 20mm x 15mm

1 Like

Re: Free Arduino Tutorial by princejude(m): 12:49am On Oct 17, 2018
How Does it Work?
The ultrasonic sensor uses sonar to determine the distance to an object. Here’s what happens:
1. The transmitter (trig pin) sends a signal: a high-frequency sound.
2. When the signal finds an object, it is reflected and…
3. … the receiver (echo pin) receives it.

The time between the transmission and reception of the signal allows us to know the distance to an object. This is possible because we know the sound’s velocity in the air.

Arduino with HC – SR04 Sensor

This sensor is really cool and popular among the Arduino tinkerers. So, here we provide an example on how to use the HC-SR04 ultrasonic sensor with the Arduino. In this project the ultrasonic sensor reads and writes the distance to an object in the serial monitor.
The goal of this project is to help you understand how this sensor works. Then, you can use this example in your own projects.

Parts Required

• Arduino UNO http://www.jutronix.com/shop/arduino-uno
• Ultrasonic Sensor (HC-SR04) http://www.jutronix.com/shop/hc-sr04-ultrasonic-sensor
• Breadboard http://www.jutronix.com/shop/mini-breadboard
• Jumper wires http://www.jutronix.com/shop/arduino-jumper-wire

Re: Free Arduino Tutorial by princejude(m): 1:27am On Oct 17, 2018
Arduino Uno and HC-SR04 Ultrasonic sensor circuit

Ultrasonic Trig Pin connected to D7, Echo Pin to D8 then GND to GND and VCC to VCC

Re: Free Arduino Tutorial by princejude(m): 1:35am On Oct 17, 2018
Code


/*
* Ultrasonic Sensor HC-SR04 code
*
Ultrasonic sensor Pins:
VCC: +5VDC
Trig : Trigger (INPUT) - Pin 7
Echo: Echo (OUTPUT) - Pin 8
GND: GND
*/

int trigPin = 7; // Trigger
int echoPin = 8; // Echo
long duration, cm, inches;

void setup() {
//Serial Port begin
Serial.begin (9600);
//Define inputs and outputs
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}

void loop() {
// The sensor is triggered by a HIGH pulse of 10 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// Read the signal from the sensor: a HIGH pulse whose
// duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);

// Convert the time into a distance
cm = (duration/2) / 29.1; // Divide by 29.1 or multiply by 0.0343
inches = (duration/2) / 74; // Divide by 74 or multiply by 0.0135

Serial.print(inches);
Serial.print("in, "wink;
Serial.print(cm);
Serial.print("cm"wink;
Serial.println();

delay(250);
}
Re: Free Arduino Tutorial by EngrBouss(m): 8:15pm On Oct 17, 2018
Do one with omron d6t interfacing with processing software
Re: Free Arduino Tutorial by princejude(m): 2:32am On Oct 18, 2018
EngrBouss:
Do one with omron d6t interfacing with processing software
Re: Free Arduino Tutorial by xpert8(m): 2:51pm On Oct 18, 2018
ok
Re: Free Arduino Tutorial by lookyzy: 12:01pm On Oct 24, 2018
following
Re: Free Arduino Tutorial by brisstone(m): 2:24pm On Oct 24, 2018
Please who have an idea where I can learn Arduino programming in Ilorin, Kwara state.?
Re: Free Arduino Tutorial by princejude(m): 12:47pm On Oct 25, 2018
brisstone:
Please who have an idea where I can learn Arduino programming in Ilorin, Kwara state.?

Contact us we can help you...
Re: Free Arduino Tutorial by brisstone(m): 12:16am On Oct 26, 2018
princejude:

Contact us we can help you...
your phone number?
Re: Free Arduino Tutorial by princefemo01(m): 9:00am On Oct 26, 2018
princejude:
Code


/*
* Ultrasonic Sensor HC-SR04 code
*
Ultrasonic sensor Pins:
VCC: +5VDC
Trig : Trigger (INPUT) - Pin 7
Echo: Echo (OUTPUT) - Pin 8
GND: GND
*/

int trigPin = 7; // Trigger
int echoPin = 8; // Echo
long duration, cm, inches;

void setup() {
//Serial Port begin
Serial.begin (9600);
//Define inputs and outputs
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}

void loop() {
// The sensor is triggered by a HIGH pulse of 10 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// Read the signal from the sensor: a HIGH pulse whose
// duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);

// Convert the time into a distance
cm = (duration/2) / 29.1; // Divide by 29.1 or multiply by 0.0343
inches = (duration/2) / 74; // Divide by 74 or multiply by 0.0135

Serial.print(inches);
Seri
al.print("in, "wink;
Serial.print(cm);
Serial.print("cm"wink;
Serial.println();

delay(250);
}



please I need your help on a particular code that has ultrasonic sensor features in it but its not working to to expected performance.....please can I get your whatsapp number?
Re: Free Arduino Tutorial by princejude(m): 11:30am On Oct 26, 2018
princefemo01:




please I need your help on a particular code that has ultrasonic sensor features in it but its not working to to expected performance.....please can I get your whatsapp number?

Whatsapp no. 08030674883

http://www.jutronix.com/contact-us
Re: Free Arduino Tutorial by princejude(m): 2:26pm On Nov 07, 2018
DHT11 & DHT22 Temperature and Humidity Sensor with Arduino
The DHT sensors are inexpensive sensors for measuring temperature and humidity. These sensors contain a chip that does analog to digital conversion and spits out a digital signal with the temperature and humidity.
These signals are easy to read with any microcontroller (MCU).

Specifications for DHT11 and DHT22
There are two versions of the DHT sensor.

DHT11

Range: 20-90%
Absolute accuracy: ±5%
Repeatability: ±1%
Long term stability: ±1% per year

DHT22

Range: 0-100%
Absolute accuracy: ±2%
Repeatability: ±1%
Long term stability: ±0.5% per year

As you can see from the specs above, the DHT22 is a bit more accurate.

Re: Free Arduino Tutorial by princejude(m): 4:40am On Nov 13, 2018
DHT11 Pins Connection:

Pin 1 >>> VCC (3V to 5V)
Pin 2 >>> Data OUT
Pin 3 >>> Don’t connect
Pin 4 >>> GND

Source code
We will use a DHT sensor Library for this project:

Installing the DHT sensor library
1. Download the adafruit DHT Sensor library from here: https://github.com/adafruit/DHT-sensor-library. You should have a .zip folder in your Downloads folder
2. Unzip the .zip folder and you should get DHT-sensor-library-master folder
3. Rename your folder from DHT-sensor-library-master to DHT_sensor_library (you really need to replace those "-" with "_"wink
4. Move the DHT_sensor_library folder to your Arduino IDE installation
libraries folder
5. Re-open your Arduino IDE
6. Go to Files / Examples / DHT_SENSOR_LIB / DHT Tester
Upload the code
Re: Free Arduino Tutorial by Prinzecharlez(m): 3:56pm On Nov 14, 2018
Please what are the future prospects or benefits of learning the stuff? I've heard about this somewhere and I'm kinda curious. Or is it a course in electrical engineering?
Re: Free Arduino Tutorial by princejude(m): 11:59am On Nov 16, 2018
We are rolling out state-of-the-art Embedded system designs Courses...

Re: Free Arduino Tutorial by Kokaine(m): 4:30pm On Apr 01, 2020
Where? Your number
Re: Free Arduino Tutorial by princejude(m): 6:05pm On Apr 01, 2020
Kokaine:
Where? Your number
Which of the course are you interested in?
Re: Free Arduino Tutorial by CodeHouse: 6:09pm On Apr 01, 2020
Re: Free Arduino Tutorial by Kokaine(m): 7:10pm On Apr 01, 2020
princejude:

Which of the course are you interested in?
I will need your guidance on this question.
I started a hone automation project where an app controls an led using arduino on Proteus using a Bluetooth module. I followed a YouTube video to copy the arduino code and connect the diagram. I used MIT app inventor to make the app. But the app is not connecting to my device. I get an error message 507 not connected. Is device on?

I want you to assist me with a course that will help me design other circuits as well as complete this one. So what should I do next. I am ready to buy the videos you send me because I am in kano state. Tell me what I need to learn, some projects I could design after the course, the cost and when you are ready to deliver.
I contacted someone on this but he is using covid saga to delay me. I want to use this period to do a project if possible
Re: Free Arduino Tutorial by princejude(m): 7:51am On Apr 02, 2020
Kokaine:

I will need your guidance on this question.
I started a hone automation project where an app controls an led using arduino on Proteus using a Bluetooth module. I followed a YouTube video to copy the arduino code and connect the diagram. I used MIT app inventor to make the app. But the app is not connecting to my device. I get an error message 507 not connected. Is device on?

I want you to assist me with a course that will help me design other circuits as well as complete this one. So what should I do next. I am ready to buy the videos you send me because I am in kano state. Tell me what I need to learn, some projects I could design after the course, the cost and when you are ready to deliver.
I contacted someone on this but he is using covid saga to delay me. I want to use this period to do a project if possible

For the Bluetooth project, I will advice you to get an Arduino board and Bluetooth module because Proteus may fail. My original Arduino board is #3500 and Bluetooth module is #3000. If you buy the hardware from us, I will send a working Bluetooth - App inventor code to you.

For the training course, you can start with the Arduino project design. Presently I am in Lagos but we do online DIY training.
You will not regret having a course with us

(1) (2) (Reply)

Any Assembly Language Programmer Here? / Challenge For Javascript Beginners/intermidiate / Google Code Jam Contest 2013

Viewing this topic: 1 guest(s)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 49
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.