# Relay with arduino, string lighting

#### Brinamo

Joined Mar 29, 2021
42
Ok, as now i have this sorted, looking to add DF MP3 player to the mix. Not yet got the code for that.
Also like to go further, also to add an IR remote to the mix also, if find the coding's out, would someone be good enough co mix it in with the above? Know asking a lot, but this project taken a while to do. This is the biggest brain hurt.
Regards

#### Brinamo

Joined Mar 29, 2021
42
Ok, as now i have this sorted, looking to add DF MP3 player to the mix. Not yet got the code for that.
Also like to go further, also to add an IR remote to the mix also, if find the coding's out, would someone be good enough co mix it in with the above? Know asking a lot, but this project taken a while to do. This is the biggest brain hurt.
Regards
Hmm think this be the code for the DF player. Not interested in pause, stop, just one MP3 file in a loop, just to control volume up and down
Thanks
Code:
//-----------------------------------------------------------------------
//DFPlayer: Mini mp3 Player
//Library by: Angelo qiao: https://github.com/DFRobot/DFRobotDFPlayerMini
//-----------------------------------------------------------------------
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
//---------------------------------------------------
SoftwareSerial softwareSerial(10, 11);
DFRobotDFPlayerMini player;
//===========================================================
void setup()
{
pinMode(2,INPUT); pinMode(3,INPUT); pinMode(4,INPUT);
pinMode(5,INPUT); pinMode(6,INPUT); pinMode(7,INPUT);
pinMode(9,OUTPUT);
//---------------------------------------------------
softwareSerial.begin(9600);
player.begin(softwareSerial);
}
//===========================================================
void loop()
{
//---------------------------------------------------
{
delay(200); player.next();
}
//---------------------------------------------------
{
delay(200); player.previous();
}
//---------------------------------------------------
{
delay(200);
digitalWrite(9, HIGH);
while(1)
{
player.pause();
}
digitalWrite(9, LOW);
}
}

Joined Jan 15, 2015
6,544
Good things come to those who wait and look.

Ron

#### Brinamo

Joined Mar 29, 2021
42
Good things come to those who wait and look.

Ron
Aye, Starting to get how its structured. But still way ofer ones head to start even programming, but taking other examples and playing. Had a IR module lying about, give a go, managed to get couple things programmed to turn on off with tv remote.
Hmm Know its a big ask and doubt anyone would. But if get each device working, to how sort of want it, in individual sketches. Could then be good enough to compile into one?
Thanks