+15 Arduino Projects for Beginners  List ‚Ė∑ 2021

Arduino is very well known for being a platform that can be used by anyone to develop open source hardware and software.. The objective of this company is create digital or interactive devices using hardware boards.

An Arduino board serves a wide variety of tasks. Works through Arduino IDE, where you can use its programming language to write instructions on the circuits covered by that board.

The reason why we made this post, It can vary according to the needs and uses that you want to give it. Here are the most prominent and feasible Arduino projects you can use.

List of the best Arduino projects for beginners that you can do yourself

Arduino

With these projects, you will learn some of the most basic concepts regarding the creation of programs and interaction devices, as well as the use of different components, so that you can start designing exceptional systems for your own benefit.

Go for it:

Make a battery tester

Make a battery tester

If you want to see how much power is left in one of your batteries, You can do this project to build your ideal battery tester. By means of some elements like a Arduino UNO board and some LEDs, you will have the benefit of building and testing the life of a battery that is below 5 watts.

You will need for this project an Arduino UNO board, a temperature sensor; humidity and pressure; Adafruit BME680, an Adafruit INA169 monitor board, a 1k ohm resistor, a capacitor, a sparkfun plug, and a cable kit to join all the elements to the board.

Once you have all these products and have assembled as the image shows, you will have to enter the Arduino programming environment and record these instructions:

#include "Arduino.h"

#include "Board.h"

#include "Helium.h"

#include "HeliumUtil.h"

#include "TimeLib.h"

#include "BlueDot_BME680.h"

#include "TimerSupport.h"

#define CHANNEL_NAME "GCIoTCore"

#define XMIT_PERIOD_MS 20000

#define VOLTS_SAMPLE_RATE_MS 250

Helium helium(&atom_serial);

Channel channel(&helium);

BlueDot_BME680 bme680 = BlueDot_BME680();

#define TS_BUF_SIZE 40

char TSbuf[TS_BUF_SIZE];

char *TSbuf_ptr = TSbuf;

char buffer[HELIUM_MAX_DATA_SIZE];

#define ADC_VOLTS_PER_BIT 0.00488

int ADCValue = 0;

struct helium_info info;

time_t timestamp;

TimeElements tm;

long highCurrentSamples = 0;

long lowCurrentSamples = 0;

float peakCurrent = 0;

float peakVoltage = 0;

#define MAX_JSON_FORMAT_STR 7

char JSON_FORMATS[][MAX_JSON_FORMAT_STR] = {

"{"i":",

","T":",

","H":",

","DT":",

","V":",

","IP":",

","IA":",

"}"

};

int addToBuffer(char *insertionPoint, int maxLen, char *src)

{

snprintf(insertionPoint, maxLen, src);

return strlen(insertionPoint);

}

void sendInfoViaHelium()

{

static unsigned long i = 0;

float t = 0;

float h = 0;

float v = 0;

float ip = 0;

float ia = 0;

char *buf_ptr = buffer;

char tmpBuf[11];

long totalSamples = highCurrentSamples + lowCurrentSamples;

i++;

print(F("i = "));

println(i);

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[0]);

snprintf(tmpBuf, 11, "%lu", i);

buf_ptr += addToBuffer(buf_ptr, sizeof(tmpBuf), tmpBuf);

writeCTRLMeas();

t = bme680.readTempC();

print(F("Temp = " ));

print

println(F(" degrees C"));

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[1]);

dtostrf(t, 3, 2, tmpBuf);

buf_ptr += addToBuffer(buf_ptr, 6, tmpBuf);

h = bme680.readHumidity();

print(F("Humidity = " ));

print(h);

println(F(" %"));

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[2]);

dtostrf(h, 3, 2, tmpBuf);

buf_ptr += addToBuffer(buf_ptr, 6, tmpBuf);

info(&info);

timestamp = info.time;

print(F("timestamp = "));

println(timestamp);

breakTime(timestamp, tm);

snprintf(TSbuf_ptr, TS_BUF_SIZE, ""%d-%d-%d %d:%d:%d"", tm.Year + 1970, tm.Month, tm.Day, tm.Hour, tm.Minute, tm.Second);

print(F("TSbuf is "));

println(TSbuf);

print(F("TSbuf length is "));

println(strlen(TSbuf));

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[3]);

buf_ptr += addToBuffer(buf_ptr, TS_BUF_SIZE, TSbuf);

v = peakVoltage;

print(F("Voltage = "));

print(v);

println(F(" Volts"));

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[4]);

dtostrf(v, 3, 2, tmpBuf);

buf_ptr += addToBuffer(buf_ptr, 6, tmpBuf);

ip = peakCurrent;

print(F("Curr pk = "));

print(ip);

println(F(" Amps"));

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[5]);

dtostrf(ip, 4, 3, tmpBuf);

buf_ptr += addToBuffer(buf_ptr, 6, tmpBuf);

ia = peakCurrent * highCurrentSamples / totalSamples;

print(F("Curr avg = "));

print(ia);

println(F(" Amps"));

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[6]);

dtostrf(ia, 8, 6, tmpBuf);

buf_ptr += addToBuffer(buf_ptr, 9, tmpBuf);

buf_ptr += addToBuffer(buf_ptr, MAX_JSON_FORMAT_STR, JSON_FORMATS[7]);

println(buffer);

print(F("buffer length is "));

println(strlen(buffer));

channel_send(&channel, CHANNEL_NAME, buffer, strlen(buffer));

}

void measureBattery()

{

float val = 0;

float threshold = 0;

ADCValue = analogRead(A1);

val = ADCValue * ADC_VOLTS_PER_BIT;

if (val > peakCurrent)

{

peakCurrent = val;

}

if (peakCurrent > 0)

{

threshold = peakCurrent / 4.0;

if (val > threshold)

{

highCurrentSamples++;

}

if (val <= threshold)

{

lowCurrentSamples++;

}

}

else

{

lowCurrentSamples++;

}

if (!down_timer_running(READ_VOLTS_timer))

{

init_down_timer(READ_VOLTS_timer, VOLTS_SAMPLE_RATE_MS);

ADCValue = analogRead(A0);

val = ADCValue * (ADC_VOLTS_PER_BIT * 4);

if (val > peakVoltage)

{

peakVoltage = val;

}

}

}

void resetBatteryVars()

{

highCurrentSamples = 0;

lowCurrentSamples = 0;

peakCurrent = 0;

peakVoltage = 0;

}

void setup()

{

int retVal;

int i;

begin(9600);

DBG_PRINTLN(F("Starting"));

begin(HELIUM_BAUD_RATE);

helium_connect(&helium);

channel_create(&channel, CHANNEL_NAME);

parameter.I2CAddress = 0x77;

parameter.sensorMode = 0b01;

parameter.IIRfilter = 0b100;

parameter.humidOversampling = 0b101;

parameter.tempOversampling = 0b101;

parameter.pressOversampling = 0b000;

retVal = bme680.init();

if (retVal != 0x61)

{

DBG_PRINT(F("BME680 could not be found... Chip ID was 0x"));

DBG_PRINT(retVal, HEX);

DBG_PRINTLN(F(" instead of 0x61"));

}

init_down_timer(SEND_timer, XMIT_PERIOD_MS);

init_down_timer(READ_VOLTS_timer, VOLTS_SAMPLE_RATE_MS);

resetBatteryVars();

}

void loop()

{

measureBattery();

if (!down_timer_running(SEND_timer))

{

init_down_timer(SEND_timer, XMIT_PERIOD_MS);

DBG_PRINT(F("highCurrentSamples = "));

DBG_PRINTLN(highCurrentSamples);

DBG_PRINT(F("lowCurrentSamples = "));

DBG_PRINTLN(lowCurrentSamples);

sendInfoViaHelium();

resetBatteryVars();

}

}

Build a Clock

Build a Clock

With the use of an Arduino you can design different types of clocks, that are adapted according to the need you have. For example, a very simple alarm clock that you can make with basic components. To join all the components you will need to be guided by the circuit diagram in the image.

Then, you are going to have to enter the IDE environment and enter these commands:

#include <LiquidCrystal.h> //

#include <Button.h> //

#include <DS3231.h> // RTC

int zumbador  =  13 ;

uint8_t hh  =  0 ,  mm  =  0 ,  ss  =  0 ;

uint8_t timerMode  =  0  , setMode = 0 ,  setAlarm = 0 ,  alarmMode = 0  ;

uint8_t alarmaHH  = 0  , alarmaMM  = 0  , alarmaSS = 0 ;

uint8_t timerhh = 0 ,  timermm = 0 ,  timerss  = 0 ;

LiquidCrystal lcd ( 12 ,  11 ,  5 ,  4 ,  3 ,  2 );

DS3231 rtc ( SDA , SCL );

Tiempo t ;

#define DN_PIN 7

#define UP_PIN 8

#define SET_PIN 9

#define ALR_PIN 10

#define PULLUP true

#define INVERT true

#define DEBOUNCE_MS 20

#define REPEAT_FIRST 500

#define REPEAT_INCR 100

//Declare push buttons

Button btnDN(DN_PIN, PULLUP, INVERT, DEBOUNCE_MS);

Button btnUP(UP_PIN, PULLUP, INVERT, DEBOUNCE_MS);

Button btnSET(SET_PIN, PULLUP, INVERT, DEBOUNCE_MS);

Button btnALR(ALR_PIN, PULLUP, INVERT, DEBOUNCE_MS);

enum {WAIT, INCR, DECR};

uint8_t STATE;

int count;

int lastCount = -1;

unsigned long rpt = REPEAT_FIRST;

void setup() {

begin(9600);

begin(16,2);

pinMode(buzzer,OUTPUT);

begin();

setCursor(0,0);

print("Welcome Shaqib!");

delay(2000);

clear();

}

void loop() {

t=rtc.getTime();

hh=t.hour,DEC;

mm=t.min,DEC;

ss=t.sec,DEC;

read();

read();

read();

read();

if(setMode==0 && setAlarm==0 ){

tunjukJamTemp();

tunjukTimer();}

if(setMode!=0 && setAlarm==0 && alarmMode==0 ){delay(100);}

if(setMode==1 && setAlarm==0 && alarmMode==0 ){lcd.setCursor(7,1);lcd.print(" ");delay(100);tunjukJamTemp();tunjukTimer();}

if(setMode==2 && setAlarm==0 && alarmMode==0 ){lcd.setCursor(10,1);lcd.print(" ");delay(100);tunjukJamTemp();tunjukTimer();}

if(setMode==3 && setAlarm==0 && alarmMode==0 ){lcd.setCursor(13,1);lcd.print(" ");delay(100);tunjukJamTemp();tunjukTimer();}

if(setMode==4 && setAlarm==0 && alarmMode==0 ){tunjukJamTemp();tunjukTimer();stepDown();delay(1000);}

if(setMode==0 && setAlarm!=0 && alarmMode==0 ){delay(100);}

if(setMode==0 && setAlarm==2 && alarmMode==0 ){lcd.setCursor(0,0);lcd.print(" ");delay(100);    setCursor(0,0);

if(alarmHH<10){lcd.print("0");}

print(alarmHH);lcd.print(":");

if(alarmMM<10){lcd.print("0");}

print(alarmMM);lcd.print(":");

if(alarmSS<10){lcd.print("0");}

print(alarmSS);lcd.setCursor(0,1);

print("Set Your Alarm");}

if(setMode==0 && setAlarm==3 && alarmMode==0 ){lcd.setCursor(3,0);lcd.print(" ");delay(100);    setCursor(0,0);

if(alarmHH<10){lcd.print("0");}

print(alarmHH);lcd.print(":");

if(alarmMM<10){lcd.print("0");}

print(alarmMM);lcd.print(":");

if(alarmSS<10){lcd.print("0");}

print(alarmSS);lcd.setCursor(0,1);

print("Set Your Alarm");}

if(setMode==0 && setAlarm==4 && alarmMode==0 ){lcd.setCursor(6,0);lcd.print(" ");delay(100);    setCursor(0,0);

if(alarmHH<10){lcd.print("0");}

print(alarmHH);lcd.print(":");

if(alarmMM<10){lcd.print("0");}

print(alarmMM);lcd.print(":");

if(alarmSS<10){lcd.print("0");}

print(alarmSS);lcd.setCursor(0,1);

print("Set Your Alarm");}

if(setMode==0 && setAlarm==5 && alarmMode==0 ){alarmMode=1;setAlarm=0;}

setupAlarm();

Alarm(alarmHH,alarmMM);

read();

read();

read();

read();

switch (STATE) {

case WAIT:

if (btnSET.wasPressed())

{ setMode = setMode+1;}

if (btnALR.wasPressed())

{ setAlarm = setAlarm+1;}

if (btnUP.wasPressed())

STATE = INCR;

else if (btnDN.wasPressed())

STATE = DECR;

else if (btnUP.wasReleased())

rpt = REPEAT_FIRST;

else if (btnDN.wasReleased())

rpt = REPEAT_FIRST;

else if (btnUP.pressedFor(rpt)) {

rpt += REPEAT_INCR;

STATE = INCR;

}

else if (btnDN.pressedFor(rpt)) {

rpt += REPEAT_INCR;

STATE = DECR;

}

break;

case INCR:

if (setMode==1 && setAlarm==0 && alarmMode==0 && timerhh<23)timerhh=timerhh+1;

if (setMode==2 && setAlarm==0 && alarmMode==0 && timermm<59)timermm=timermm+1;

if (setMode==3 && setAlarm==0 && alarmMode==0 && timerss<59)timerss=timerss+1;

if (setMode==0 && setAlarm==2 && alarmMode==0 && alarmHH<23)alarmHH=alarmHH+1;

if (setMode==0 && setAlarm==3 && alarmMode==0 && alarmMM<59)alarmMM=alarmMM+1;

if (setMode==0 && setAlarm==4 && alarmMode==0 && alarmSS<59)alarmSS=alarmSS+1;

STATE = WAIT;

break;

case DECR:

if (setMode==1 && setAlarm==0 && alarmMode==0 && timerhh>0)timerhh=timerhh-1;

if (setMode==2 && setAlarm==0 && alarmMode==0 && timermm>0)timermm=timermm-1;

if (setMode==3 && setAlarm==0 && alarmMode==0 && timerss>0)timerss=timerss-1;

if (setMode==0 && setAlarm==2 && alarmMode==0 && alarmHH>0)alarmHH=alarmHH-1;

if (setMode==0 && setAlarm==3 && alarmMode==0 && alarmMM>0)alarmMM=alarmMM-1;

if (setMode==0 && setAlarm==4 && alarmMode==0 && alarmSS>0)alarmSS=alarmSS-1;

STATE = WAIT;

break;

}

}

void stepDown() {

if (timerss > 0) {

timerss -= 1;

} else {

if (timermm > 0) {

timerss = 59;

timermm -= 1;

} else {

if (timerhh > 0) {

timerss = 59;

timermm = 59;

timerhh -= 1;

} else {

for(int i=0;i<30;i++){

setCursor(0,0);

print(rtc.getTimeStr());

setCursor(10,0);

print(rtc.getTemp());

print("C");

read();

if(btnSET.wasPressed()){digitalWrite(buzzer,LOW);i=30;}else{

digitalWrite(buzzer,HIGH);

delay(500);

digitalWrite(buzzer,LOW);

delay(500);}

}

setMode=0;

}

}

}

}

void tunjukTimer(){

setCursor(0, 1);

print("Timer:");

print(" ");

(timerhh < 10) ? lcd.print("0") : NULL;

print(timerhh);

print(":");

(timermm < 10) ? lcd.print("0") : NULL;

print(timermm);

print(":");

(timerss < 10) ? lcd.print("0") : NULL;

print(timerss);

}

void tunjukJamTemp(){

setCursor(0,0);

print(rtc.getTimeStr());

setCursor(10,0);

print(rtc.getTemp());

print("C");

}

void Alarm(uint8_t alarmHH,uint8_t alarmMM){

if(alarmMode==1 && alarmHH==hh && alarmMM==mm){

for(int i=0;i<30;i++){

setCursor(0,0);

print(rtc.getTimeStr());

setCursor(10,0);

print(rtc.getTemp());

print("C");

setCursor(0, 1);

print("Timer:");

print(" ");

(timerhh < 10) ? lcd.print("0") : NULL;

print(timerhh);

print(":");

(timermm < 10) ? lcd.print("0") : NULL;

print(timermm);

print(":");

(timerss < 10) ? lcd.print("0") : NULL;

print(timerss);

read();

if(btnALR.wasPressed()){digitalWrite(buzzer,LOW);i=30;}else{

digitalWrite(buzzer,HIGH);

delay(500);

digitalWrite(buzzer,LOW);

delay(500);}

}

alarmMode=0;

setAlarm=0;

}}

void setupAlarm(){

if(setMode==0 && setAlarm==1 && alarmMode==0 ){

clear();

setCursor(0,1);

print("Set Your Alarm");

setCursor(0,0);

if(alarmHH<10){lcd.print("0");}

print(alarmHH);lcd.print(":");

if(alarmMM<10){lcd.print("0");}

print(alarmMM);lcd.print(":");

if(alarmSS<10){lcd.print("0");}

print(alarmSS);

}

}

Arduino traffic light

Through this project, we can use Arduino to build a semaphore. With the use of some components, we will be able to observe the red, yellow and green colors for cars in oncoming traffic directions. This can work, with the use of two pushbuttons to build a sensor that turns on and off indicating if any cars are approaching. So, when there is traffic the traffic light is red, and when not, green.

Backpack Alarm

Backpack Alarm

If you want to prevent thieves from stealing your backpack, you can make use of this alarm. Its construction is made with an Arduino board, an 80 decibel alarm and a three-axis accelerometer. The alarm will sound the moment someone wants to open the backpack without your authorization. Use the picture to assemble the Arduino UNO board, the triple axis accelerometer, the piezoelectric alarm, the audio connector, the 9v battery, the jumper cables and the 9 volt Jack connector.

Once you have this step done you will have to write the following in the IDE:

include <Wire.h>

#include <Adafruit_Sensor.h>

#include <Adafruit_LSM303_U.h>

#include <Adafruit_LSM303.h>

const int sens = 10;

Adafruit_LSM303_Mag_Unified mag = Adafruit_LSM303_Mag_Unified(12345);

void setup(void)

{

pinMode(13, OUTPUT);

if(!mag.begin())

{

// There was a problem detecting the LSM303 ... check your connections

digitalWrite(13, HIGH);

delay(500);

digitalWrite(13, LOW);

delay(500);

digitalWrite(13, HIGH);

delay(500);

digitalWrite(13, LOW);

delay(500);

while(1);

}

// Wait 5 seconds

delay(5000);

// Alert when started

digitalWrite(13, HIGH);

delay(500);

digitalWrite(13, LOW);

}

// function for getting the sensor value

int getDeg(void){

// Get a new sensor event

sensors_event_t event;

getEvent(&event);

float Pi = 3.14159;

float heading = int((atan2(event.magnetic.y,event.magnetic.x) * 180) / Pi);

if (heading < 0)

{

heading = 360 + heading;

}

return heading;

}

void loop(void)

{

int oldDeg = getDeg();

delay(1000);

int newDeg = getDeg();

if (newDeg < (oldDeg-sens) && oldDeg != 0 && newDeg != 0) {

// sound the alarm

digitalWrite(13, HIGH);

// Just for debugging

//Serial.println("Triggered");

//Serial.println("");

}else if (newDeg > (oldDeg+sens) && oldDeg!= 0 && newDeg != 0) {

// sound the alarm

digitalWrite(13, HIGH);

}

}

Arduino Voice Controlled Blinds

Arduino Voice Controlled Blinds

You can too use an Arduino board to move the blinds in your room or business. In such a short time and with the correct programming inserted, you will have the ability to open and close your blinds with a voice control system via Bluetooth. You are going to need an Arduino Nano R3 board and all the components you see in the image.

Then enter this program in the IDE:

int brillo  =  0 ;

int fadeAmount  =  5 ;

int led  =  3 ;

int inPin  =  4 ;

int inPin2  =  7 ;

int val2  =  0 ;

int val  =  0 ;

const int  motorPin1   =  11 ;

const int  motorPin2   =  10 ;

const int  motorPin3   =  8 ;

const int  motorPin4   =  9 ;

int estado ;  int  bandera = 0 ;

configuración vacía ()

{

pinMode ( motorPin1 , SALIDA );

pinMode ( motorPin2 , SALIDA );

pinMode ( motorPin3 , SALIDA );

pinMode ( motorPin4 , SALIDA );

pinMode ( inPin , INPUT );

pinMode ( inPin2 , ENTRADA );

pinMode ( led , SALIDA );

begin(9600);

delay(1000); }

void loop(){

analogWrite(led, brightness);

brightness = brightness + fadeAmount;

if (brightness <= 0 || brightness >= 255) {

fadeAmount = -fadeAmount;

}

delay(30);

val = digitalRead(inPin);

val2 = digitalRead(inPin2);

if(Serial.available() > 0)

{

state = Serial.read();

flag=0;

}

if (state == 'U' || val == LOW)

{

digitalWrite(motorPin1, HIGH);

digitalWrite(motorPin2, HIGH);

digitalWrite(motorPin3, HIGH);

digitalWrite(motorPin4, HIGH);

delay(2000);

digitalWrite(motorPin1, 0);

digitalWrite(motorPin2, 0);

digitalWrite(motorPin3, 0);

digitalWrite(motorPin4, 0);

println("Both Up");

state = 0;

}

else if (state == 'D' || val2 == LOW)

{

digitalWrite(motorPin1, HIGH);

digitalWrite(motorPin2, 0);

digitalWrite(motorPin3, 0);

digitalWrite(motorPin4, HIGH);

delay(2000);

digitalWrite(motorPin1, 0);

digitalWrite(motorPin2, 0);

digitalWrite(motorPin3, 0);

digitalWrite(motorPin4, 0);

println("Both Down");

state = 0;

}

if (state == 'W')

{

digitalWrite(motorPin1, HIGH);

digitalWrite(motorPin2, HIGH);

delay(2000);

digitalWrite(motorPin1, 0);

digitalWrite(motorPin2, 0);

println("Right Up");

state = 0;

}

else if (state == 'L')

{

digitalWrite(motorPin1, HIGH);

digitalWrite(motorPin2, 0);

delay(2000);

digitalWrite(motorPin1, 0);

digitalWrite(motorPin2, 0);

println("Right Down");

state = 0;

}

if (state == 'K')

{

digitalWrite(motorPin3, HIGH);

digitalWrite(motorPin4, HIGH);

delay(2000);

digitalWrite(motorPin3, 0);

digitalWrite(motorPin4, 0);

println("Left Up");

state = 0;

}

else if (state == 'I')

{

digitalWrite(motorPin3, 0);

digitalWrite(motorPin4, HIGH);

delay(2000);

escritura digital(motorPin3, 0);

digitalWrite (motorPin4, 0);

Serial . println ( "Izquierda abajo" );

estado =  0 ;

}

}

Chronometer

Chronometer

You can convert the Arduino board on a simple stopwatch with the use of few materials. For this, it requires two pushbuttons, some resistors, a plate and cables; In this way, you will be able to build this useful tool to count the time.

Assemble the connections according to the diagram that we show you and then write these programming codes in the Arduino environment:

#include <EEPROM.h>

#define interruptPin 2

#define eeAddress 0

hora de inicio flotante =  0 ;

float endtime = 0 ;

flotador resulttime = 0 ,  oldresulttime = 0 ;

configuración vacía () {

Serial . comenzar ( 9600 );

while ( ! Serial )  {

;

}

Serial . println ( "¬°Las comunicaciones en serie est√°n listas, se√Īor!: .. bip bip" );

attachInterrupt ( digitalPinToInterrupt ( interruptPin ), refreshTime ,  CHANGE );

}

bucle vacío () {

}

void refreshTime () {

if ( digitalRead ( interruptPin )) {

hora de inicio = milis ();

print("Start time: "); Serial.println(starttime);

}else

if(digitalRead(interruptPin)==LOW){

endtime=millis();

resulttime=endtime-starttime;

print("End time: "); Serial.println(endtime);

print("Result time: "); Serial.println(resulttime);

WhatsNewEeprom();

}

}

void WhatsNewEeprom(){

println("-----------checking eeprom");

get( eeAddress, oldresulttime );

print("oldresulttime");Serial.println(oldresulttime);

Serial . print ( "tiempo de resultado" ); Serial . println (tiempo de resultado );

if ( resulttime ! = oldresulttime ) {

EEPROM . put ( eeAddress ,  resulttime );

Serial . print ( "----- ¬°Ding! Nuevo tiempo registrado en eeprom:" ); Serial . println (tiempo de resultado );

} m√°s {

Serial . println ( "No se encontró una nueva hora, eeprom no fue perturbado" );

}

}

Tweet with Arduino

Tweet with Arduino

With Arduino you can apply incredible new uses to many things and even your Twitter account. If you program correctly, you can enable this function by connecting a switch and a relay to a board. You will have to have a UNO model, a 330 Ohm resistor, a sparkfun button, a 1Sheeld plate and cables. To unite all these components it will be necessary that you take into account the image that we show you.

Next, enter these programming sequences in IDE:

#define CUSTOM_SETTINGS

#define INCLUDE_TWITTER_SHIELD

#include <OneSheeld.h>

int buttonPin = 12;

int ledPin = 13;

void setup()

{

/* Start communication. */

begin();

/* Set the button pin as input. */

pinMode(buttonPin,INPUT);

/* Set the LED pin as output. */

pinMode(ledPin,OUTPUT);

}

void loop()

{

/* Always check the button state. */

if(digitalRead(buttonPin) == HIGH)

{

/* Turn on the LED. */

digitalWrite(ledPin,HIGH);

/* Tweet. */

tweet("Uso IPAP como plataforma para aprender");

/* Wait for 300 ms. */

delay(300);

}

else

{

/* Turn off the LED. */

digitalWrite(ledPin,LOW);

}

}

Bulb system

Bulb system

There are some more advanced items that you can use to turn the light bulbs in your home on and off. SThey need few materials so that you can create your own lighting system and control it with your hands. To do this, you will have to connect the resistors and relays to the board, as shown in the illustration. You will also have to do the same with the other components.

Once you have everything ready, write the codes:

#define CUSTOM_SETTINGS

#define INCLUDE_GPS_SHIELD

#define INCLUDE_TEXT_TO_SPEECH_SHIELD

#define INCLUDE_ORIENTATION_SENSOR_SHIELD

#define INCLUDE_VOICE_RECOGNIZER_SHIELD

#define INCLUDE_MIC_SHIELD

#define INCLUDE_DATA_LOGGER_SHIELD

#define INCLUDE_CAMERA_SHIELD

#include <OneSheeld.h>

String openpass¬† =¬† "contrase√Īa" ;

String lockpass  =  "bien entonces" ;

String lighton  =  "luz encendida" ;

String lightoff  =  "luz apagada" ;

String picture  =  "selfie" ;

int Light  =  22 ;

int LockMotor1  =  24 ;

int LockMotor2  =  25 ;

longitud flotante , latitud ;

int lock  =  0 ;  // 0 = cerrado, 1 = abierto

int orientación = 0 ;  // Verifique la orientación del teléfono. 1 = orientación confirmada.

configuración vacía ()

{

OneSheeld . comenzar ();

pinMode ( Luz , SALIDA );

digitalWrite ( Ligero , ALTO );  // El relé está activo BAJO (ALTO = La luz está apagada inicialmente)

pinMode ( LockMotor1 , SALIDA );

pinMode ( LockMotor2 , SALIDA );

digitalWrite ( LockMotor1 , LOW );

digitalWrite ( LockMotor2 , LOW );

retraso ( 2000 );

Logger . detener ();

}

bucle vacío ()

{

while ( 1 ) {

longitud =  GPS . getLongitude ();

latitud =  GPS . getLatitude ();

if ( longitud > = 78.05 &&  longitud <= 87.09  &&  latitud > = 88.60  &&  latitud <= 88.684 )

goto getpass ;

dem√°s

TextToSpeech . say ( "Para habilitar" );

OneSheeld . retraso ( 5000 );

}

conseguir pase :

TextToSpeech . decir ( "Do the Secret Twist" );

while ( orientación == 0 ) {

if (( OrientationSensor . getX () > 120 ) &&  ( OrientationSensor . getY () > 0 ))

{ orientación = 1 ;

romper ;}

dem√°s

OneSheeld . retraso ( 2000 );

}

TextToSpeech . say ( "Bloqueo de apertura" );

digitalWrite ( LockMotor1 , LOW );

digitalWrite ( LockMotor2 , HIGH );

retraso ( 5000 ); // Se necesitan aproximadamente 5 segundos para que la cerradura se abra por completo

digitalWrite ( LockMotor1 , LOW );

digitalWrite ( LockMotor2 , LOW );

retraso ( 1000 );

bloqueo =  1 ;

LogData ();

TextToSpeech . say ( "Bienvenido a IPAP" );

retraso ( 5000 );

OneSheeld . retraso ( 5000 );

while ( 1 ) {

VoiceRecognition . inicio ();

if ( VoiceRecognition . isNewCommandReceived () &&  VoiceRecognition . getCommandAsString () == lighton ) {

// Luces encendidas

TextToSpeech . say ( "Encendido de las luces" );

retraso ( 1000 );

digitalWrite ( Ligero , BAJO );

VoiceRecognition . clearCommand ();

OneSheeld . retraso ( 5000 ); // Este retraso se puede aumentar seg√ļn sus propios requisitos

}

if ( VoiceRecognition . isNewCommandReceived () &&  VoiceRecognition . getCommandAsString () == lightoff ) {

// Luz apagada

TextToSpeech . say ( "Apagar las luces" );

retraso ( 1000 );

digitalWrite ( Ligero , ALTO );

VoiceRecognition . clearCommand ();

OneSheeld . retraso ( 5000 );

}

if ( VoiceRecognition . isNewCommandReceived () &&  VoiceRecognition . getCommandAsString () == lockpass ) {

// Bloquear IPAP

TextToSpeech . decir ( "Luces apagadas" );

OneSheeld . retraso ( 2000 );

digitalWrite ( Ligero , ALTO );

OneSheeld . retraso ( 2000 );

// Cerrar cerradura lineal electrónica

TextToSpeech . say ( "Bloqueando" );

digitalWrite ( LockMotor1 , HIGH );

digitalWrite ( LockMotor2 , LOW );

retraso ( 5000 ); // Se necesitan aproximadamente 5 segundos para que la cerradura se cierre por completo

digitalWrite ( LockMotor1 , LOW );

digitalWrite ( LockMotor2 , LOW );

retraso ( 1000 );

bloqueo =  0 ;

LogData ();

OneSheeld . retraso ( 2000 );

TextToSpeech . say ( "Bloqueo completo. ¡Adiós!" );

VoiceRecognition . clearCommand ();

orientación = 0 ;

goto getpass ;

OneSheeld . retraso ( 5000 );

}

if ( Mic . getValue () > =  80 ) {

TextToSpeech . decir ( "No molestar a los dem√°s" );

retraso ( 2000 );

OneSheeld . retraso ( 5000 );

}

if ( VoiceRecognition . isNewCommandReceived () &&  VoiceRecognition . getCommandAsString () == imagen ) {

C√°mara . setFlash ( ENCENDIDO );

TextToSpeech . diga ( "C√°mara trasera encendida" );

C√°mara . rearCapture ();

OneSheeld . retraso ( 1000 );

TextToSpeech . diga ( "C√°mara frontal encendida" );

C√°mara . frontCapture ();

retraso ( 2000 );

VoiceRecognition . clearCommand ();

OneSheeld . retraso ( 5000 ); // Este retraso se puede aumentar seg√ļn sus propios requisitos

}

else {

retraso ( 100 );

OneSheeld . retraso ( 5000 );

}

}

}

else {

OneSheeld . retraso ( 5000 );

goto getpass ;

}

} // Fin del ciclo ()

void logdata ()

{

Logger . detener ();

OneSheeld . retraso ( 500 );

Logger . inicio ( "Entrada y Salida" );

if ( lock ==  1 ) {  // La cerradura se ha abierto

Logger . agregar ( "Entrada / Salida" , "Entrada" );

Logger . log (); }

else {  // El bloqueo se ha cerrado

Logger . agregar ( "Entrada / Salida" , "Salida" );

Logger . log (); }

Logger . detener ();

}

Morse emitter

Morse emitter

You can use your Arduino development board to turn it into a morse transmitter. By linking an Arduino board with an LED and a 22 Ohm resistor, an SOS message can be sent using morse language. For this you will need an Arduino UNO board, a generic led, a photocell and a buzzer. You must also include connectors and cables to join the elements.

When you have everything ready, look at the image to join the components and open the Arduino programming environment to enter the following:

const char* MorseTable[] = {

NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

// space, !, ", #, $, %, &, '

NULL, "-.-.--", ".-..-.", NULL, NULL, NULL, NULL, ".----.",

// ( ) * + , - . /

"-.--.", "-.--.-", NULL, ".-.-.", "--..--", "-....-", ".-.-.-", "-..-.",

// 0 1 2 3 4 5 6 7

"-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...",

// 8 9 : ; < = > ?

"---..", "----.", "---...", "-.-.-.", NULL, "-...-", NULL, "..--..",

// @ A B C D E F G

".--.-.", ".-", "-...", "-.-.", "-..", ".", "..-.", "--.",

// H I J K L M N O

"....", "..", ".---", "-.-", ".-..", "--", "-.", "---",

// P Q R S T U V W

".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--",

// X Y Z [  ] ^ _

"-..-", "-.--", "--..", NULL, NULL, NULL, NULL, "..--.-",

// ' a b c d e f g

NULL, ".-", "-...", "-.-.", "-..", ".", "..-.", "--.",

// h i j k l m n o

"....", "..", ".---", "-.-", ".-..", "--", "-.", "---",

// p q r s t u v w

".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--",

// x y z { | } ~ DEL

"-..-", "-.--", "--..", NULL, NULL, NULL, NULL, NULL,

};

int dotLength = 50;

int dashLength = dotLength*3;

void setup() {

// put your setup code here, to run once:

pinMode(13, OUTPUT);

begin(9600);

}

void loop() {

char ch;

if(Serial.available()){

ch = Serial.read();

flashDashDot(MorseTable[ch]);

delay(dotLength*2);

}

}

void flashDashDot(const char * morseCode)

{

int i = 0;

while(morseCode[i] != 0)

{

if(morseCode[i] == '.'){

dot();

} else if (morseCode[i] == '-'){

dash();

}

i++;

}

}

void dot()

{

digitalWrite(13, HIGH);

delay(dotLength);

digitalWrite(13, LOW);

delay(dotLength);

}

void dash()

{

digitalWrite(13, HIGH);

delay(dashLength);

digitalWrite(13, LOW);

delay(dotLength);

}

Keyboard blocker

Keyboard blocker

As we have seen before, Arduino can be used as a system to protect different types of things, such as locking the keyboard of your computer. You can also integrate a keyboard to your board to work more comfortably and take advantage of more functions. In this project you will need an Arduino UNO, a 1N4148 semiconductor, pins, 74HC595 shift register, switch, and cables. To unite all these components it will be necessary that you look at the image that we present to you.

After this you can write the instructions in the IDE program:

int rowData = 2; // shift register Data pin for rows

int rowLatch = 3; // shift register Latch pin for rows

int rowClock = 4; // shift register Clock pin for rows

int colA = A0;

int colB = A1;

int colC = A2;

int colD = A3;

int colE = A4;

int colF = A5;

int colG = 5;

int colH = 6;

byte shiftRows = B11111111;

long previousMillis = 0;

long interval = 5;

int lastKey = 0;

int keyReset = 0;

int keysPressed = 0;

bool caps = false;

bool rShift = false;

bool lShift = false;

bool shift = false;

bool ctrl = false;

bool spcl = false;

bool alt = false;

bool fn = false;

void setup() {

begin(9600);

pinMode(colA, INPUT_PULLUP);

pinMode(colB, INPUT_PULLUP);

pinMode(colC, INPUT_PULLUP);

pinMode(colD, INPUT_PULLUP);

pinMode(colE, INPUT_PULLUP);

pinMode(colF, INPUT_PULLUP);

pinMode(colG, INPUT_PULLUP);

pinMode(colH, INPUT_PULLUP);

// the outputs needed to control the 74HC595 shift register

pinMode(rowLatch, OUTPUT);

pinMode(rowClock, OUTPUT);

pinMode(rowData, OUTPUT);

updateShiftRegister(B11111111);

}

void loop() {

unsigned long currentMillis = millis();

if(currentMillis - previousMillis > interval) {

previousMillis = currentMillis;

checkKeyboard();

}

}

void updateShiftRegister(byte rows) {

digitalWrite(rowLatch, LOW);

shiftOut(rowData, rowClock, MSBFIRST, rows);

digitalWrite(rowLatch, HIGH);

}

void checkKeyboard() {

keysPressed = 0;

updateShiftRegister(B11111110);

if (digitalRead(colA) == LOW) {

keysPressed = keysPressed + 1;

if (lastKey != 1) {

if (fn == true) {

// no fn definition

} else if (spcl == true) {

// no spcl definition

} else if (alt == true) {

print(" ");

} else if (ctrl == true) {

print(" ");

} else if ((caps == true) && (shift == true)){

print(" "); // if shift is pressed while caps lock is active

} else if ((caps == true) || (shift == true)){

print(" "); // if either shift or caps lock are active, but not both

} else {

print(" "); // if no modifiers are active

}

lastKey = 1;

keyReset = 0;

}

}

if (digitalRead(colB) == LOW) {

}

if (digitalRead(colC) == LOW) {

}

if (digitalRead(colD) == LOW) {

}

if (digitalRead(colE) == LOW) {

fn = true;

} else {

fn = false;

}

if (digitalRead(colF) == LOW) {

}

if (digitalRead(colG) == LOW) {

}

if (digitalRead(colH) == LOW) {

}

//realiza el mismo procedimiento hasta el lastKey31 o hasta el que t√ļ prefieras programa

keyReset = 0;

}

}

if ((lShift) || (rShift)) {

shift = true;

} else {

shift = false;

}

updateShiftRegister(B11111111);

keyReset = keyReset + 1;

if (keyReset > 60) {

lastKey = 0;

keyReset = 0;

}

if (keysPressed == 0) {

lastKey = 0;

}

}

Parking sensor

Parking sensor

The objective of this project, is to develop, with the help of LEDs, a sound and light mechanism that detects the proximity or distance of a car when you want to park. You must have a UNO model of Arduino, a buzzer, an HC-SR04 ultrasonic sensor and cables that allow the union of the components according to the diagram that we show you.

Then, you will have to write these sequences to program your board:

#include <Ultrasonic.h>

Ultrasonic ultrasonic(6,5);

// pin 6 trig , pin 5 echo

const int buzzer = 7;

void setup(){

pinMode(buzzer,OUTPUT); // pin buzzer

}

void loop(){

int dist = ultrasonic.Ranging(CM);

if (dist < 100) { distance

tone(buzzer,1000);

delay(40);

noTone(buzzer);

delay(dist*4);

}

delay(100);

}

One dice simulator

If you want play some board game, but you don’t have a dice for it, you can create yours with an Arduino. With a 7-segment display, a plate, a button, 220 and 10 k resistors, you can make a cube that provide random numbers 1 through 6.

Robotic arm

You can make a robotic arm that has the ability to pick up objects with tweezersIn addition, you can add ultrasonic sensors to avoid collisions with obstacles. Creating a robotic arm with Arduino is a not so complicated but effective project.

Flashing lights

Flashing lights

With an Arduino board you can create a very simple program to make an LED blink. You are going to need a 10k ohm resistor, male to male jumper wires, and a generic led. Then you will have to join the components as shown in the image and, finally, open the programming platform.

In this software you will have to write:

configuración vacía () {

pinMode ( 13 , SALIDA ) ;

}

bucle vacío () {

escritura digital ( 13 , ALTA ) ;

retraso ( 1000 ) ;

digitalWrite ( 13 , BAJO ) ;

retraso ( 1000 ) ;

Movement repeater

Movement repeater

This project will allow you to practice the connections you can make between the Arduino board and other components. In this way you will have a device that reproduces your movements and gestures being able to increase or decrease the volume of the speaker.

After getting a Nano R3 model, a TPA81 8-pixel thermal array sensor, a HC-SR505 infrared PIR-type action sensor, a generic breadboard, a 0.96-inch OLED screen, and male-to-female jumper cables. To assemble all these elements you will have to be guided by the image that we show you.

When you have everything ready, you will have to write the following sequences in the Arduino programming environment:

#include <Wire.h>

#include <TPA81.h>

// Create new TPA81 instance

TPA81 tpa;

void setup() {

begin(9600);

// You need to begin the Wire library to use TPA81 library

begin();

}

void loop() {

// Print temperature light

print(tpa.getAmbient());

print(" ");

// Print all temperature point

for (int i = 1; i <= 8; i++)

{

print(tpa.getPoint(i));

print(" ");

}

println("n");

delay(500);

}

The most essential Arduino Kits to learn to develop Hardware from scratch

If you are looking to carry out any type of project, you must first have a team that you can use as a support for your work.

For this reason, we will present a list of the most used Arduino Kits so that you can make your designs with great ease:

Arduino Starter Kit for Beginners K030007

Arduino Starter Kit for Beginners K030007

This is one of the most prominent, since, It is the official Arduino starter kit. These elements will help you to better understand the basic and technical concepts so that you can enter the electronic world, with this kit you will start to design your projects without errors.

Among the components that you will find inside the kit is an Arduino UNO Rev3 board, various resistors, a set of pushbuttons, connector cables, lights of different colors of LEDs and sensors, among many more. Its manual is in Spanish and you can get it for an approximate price of ‚ā¨ 95.

ELEGOO ES-EL-KIT-008

The company ELEGOO, based on free hardware marketing, set out to create an Arduino starter kit for use by any type of developer, regardless of your level or where you are in the world.

Habitually, is considered one of the most complete and efficient of the company, and has an approximate of 200 materials to work on any project. If you don‚Äôt know what to start with do not worry!, because it also includes a list with more than 30 jobs to do. You can get it for ‚ā¨ 30 to ‚ā¨ 55, depending on the number of elements that the kit includes.

Mega 2560 Starter Kit Ultra

Another interesting option to start a project It is the Arduino Mega 2560 Starter Kit Ultra kit. It stands out for having a range of very useful elements, it has additional tools to use in basic circuits and in easy jobs. Like the previous two, includes a step-by-step help guide in Spanish, as well as specific tutorials within a CD for the development of any project. Its 220 elements can be bought for around ‚ā¨ 50.

If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will also be of great help to more members of the community. Thanks! ūüėČ

Mario Jose

Author: Mario José

Graduated in journalism, specialized in investigation, I seek the truth of all things. Now 100% focused on technology, computing and the Internet.

You may be interested:

Leave a Comment