Putting code together

Ok so i have my Arduino uno and i have two different pieces of code and i want both pieces of code to be on one Arduino. one code is for my RFID Door lock and the other is for a 1Meter strip of Radio Shack Neopixles (don’t know if thats how you spell it)
none of the pins interfere so all i want is for both codes to be one big code on my Arduino uno. so what i’m really asking for is for someone to point me in the right direction on how to accomplish my goal. You have to get the attachment from this Question/ whatever els this is.

RFID_the_original.ino (19.9 KB)

Neopixle_light_code.ino (14.1 KB)

You might want to put both together in one sketch and for each piece of code put in the "void loop()" area, just call them as a function then go"void loop(){
oneBitOfCodeHere;
anotherBitOfCodeHere;
}"

Other than that I cant think of any other way to do this.

Robin2 posted this thread as a guide to doing exactly what Eosti suggests.

What are the requirements for the combined program? Splicing code together that does completely different things doesn't make sense without some context (also known as requirements).

ok so i tried the thread you suggested @ JimboZA and i got an error saying that the code wasn’t declared in scope so what do i do now??? and by the way i just want the code to be on one Arduino i don’t want the code to interact with each other.
here is my attempt on merging the code: have to download it.

attempt.ino (34 KB)

  void ledcode(); {

This is not how you begin a function. What is the semi colon doing there ?

Yours combined code is not likely to work properly anyway because you have several delay()s in it during which time nothing else will happen. This maybe OK if you want the Arduino to run one program but if you want it to say run a program to flash LEDs but also be able to react quickly to external input, such as the RFID reader, then it will not be acceptable. You need to restructure your program to remove delay()s and use millis() timing instead as in the BlinkWithoutDelay example.

I think you should practice merging codes with some simple stuff - or at least something short.

It’s not a good idea to wait until something complex is nearly complete before you try out an essential part of it.

With regard to getting rid of the delay()s you might like to look at the demo several things at a time

…R