user69830: As said no programming skills only started 2 days ago when Nano arrived.
Heads in bits. This is how far i got. Any help much appreciated..
int EMagnetPin = 8;
int solenoidPin = 9;
int ReedPin = 13;

void setup() 
{
  pinMode(EMagnetPin, OUTPUT);     // assign pin type
  pinMode(solenoidPin, OUTPUT);   // assign pin type
  pinMode(ReedPin, INPUT);        // assign pin type
  Serial.begin(9600);             //serial port open

void loop() 
{
Serial.print(digitalRead(ReedPin));
if (digital REad(ReeddPin)==0 ) {
digitalWrite(solenoidPin,HIGH);
                             
                  // Once magnet applied to Reed Switch Will activate the below

  digitalWrite(EMagnetPin, low);      
  delay(11000);                          
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(22500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);                          // Stops EMagnet
  digitalWrite(solenoidPin, HIGH);     //Start Solenoid   
  delay(500); 
  digitalWrite(solenoidPin, low);      
  delay(500); 
                    // Program Ends 


user10794: I presume you got some errors, like this:
/tmp/arduino_modified_sketch_836883/sketch_oct30a.ino: In function 'void setup()':
sketch_oct30a:13:3: error: a function-definition is not allowed here before '{' token
   {
   ^
sketch_oct30a:37:17: error: expected '}' at end of input
       delay(500);
                 ^
exit status 1
a function-definition is not allowed here before '{' token

You have to read those. At the end of a function you need a closing brace. So, setup for example would look like this:
void setup() 
{
  pinMode(EMagnetPin, OUTPUT);     // assign pin type
  pinMode(solenoidPin, OUTPUT);   // assign pin type
  pinMode(ReedPin, INPUT);        // assign pin type
  Serial.begin(9600);             //serial port open
}   // <------- ADD THIS

Ditto for the end of the loop function.
The next problem is this line:
    if (digital REad(ReeddPin) == 0 ) {

The function "digitalRead" is spelt like that, not as two words. Also you misspelt "ReedPin" as "ReeddPin".
You have to go carefully through your code, look at the error messages, and fix them one by one. C++ is case-sensitive, you can't just thrown in extra spaces in the middle of words, and you have to be consistent with your variable names (ie. not misspell them).

I suggest you do a C++ tutorial, or find an Arduino tutorial. These are basic coding mistakes made by beginners. With a bit of practice, and some working through examples, you will stop making them.

user69739: #include <Arduino.h>
int EMagnetPin = 8;
int solenoidPin = 9;
int ReedPin = 13;

void setup()
{
  pinMode(EMagnetPin, OUTPUT);  // assign pin type
  pinMode(solenoidPin, OUTPUT); // assign pin type
  pinMode(ReedPin, INPUT);      // assign pin type
  Serial.begin(9600);           //serial port open
}

void loop()
{
  Serial.print(digitalRead(ReedPin));
  if (digitalRead(ReedPin) == 0)//it is known as digitalRead
  {
    digitalWrite(solenoidPin, HIGH);

    // Once magnet applied to Reed Switch Will activate the below

    digitalWrite(EMagnetPin, LOW);
    delay(11000);
    digitalWrite(EMagnetPin, HIGH);
    delay(500);
    digitalWrite(EMagnetPin, LOW);
    delay(500);
    digitalWrite(EMagnetPin, HIGH);
    delay(500);
    digitalWrite(EMagnetPin, LOW);
    delay(22500);
    digitalWrite(EMagnetPin, HIGH);
    delay(500);
    digitalWrite(EMagnetPin, LOW);
    delay(500);                      // Stops EMagnet
    digitalWrite(solenoidPin, HIGH); //Start Solenoid
    delay(500);
    digitalWrite(solenoidPin, LOW);
    delay(500);
  }
}// please close all loops 
// Program Ends

please remember to close all loops ,enter right spelling
I would suggest you to take a tutorial and also use a program like platformio or Arduino on vscode which will help you to write the code as it has auto code completion so you will always speel the right name for variables and also type the right function names.
Hope this helps.

user31105: Note that others already gave good answers; this is just a way to make your code more elegant.
This part:
  digitalWrite(EMagnetPin, low);      
  delay(11000);                          
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(22500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);                          // Stops EMagnet
  digitalWrite(solenoidPin, HIGH);     //Start Solenoid   
  delay(500); 
  digitalWrite(solenoidPin, low);      
  delay(500); 

You see there is a lot of duplication (digitalWrite plus delay).
The only things changing are the pin number, the pin state and the delay time (which is mostly 500).
You can create a new function for this, e.g. digitalWriteWithDelay:
void digitalWriteWithDelay(int pinNumber, int pinState, int delayTime = 500)
{
    digitalWrite(pinNumber, pinState);
    delay(delayTime);
}

Now you can rewrite
  digitalWrite(EMagnetPin, low);      
  delay(11000);                          
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 

to
digitalWriteWithDelay(EMagneticPin, LOW, 11000);
digitalWriteWithDelay(EMagneticPin, HIGH);

and all subsequent lines similarly. Btw, it's best to use LOW and HIGH (keep the capitalization consequent). As you can see in the last line, 500 need not to be passed as it is the default value.

69830: <p>As said no programming skills only started 2 days ago when Nano arrived.
Heads in bits. This is how far i got. Any help much appreciated..<a href="https://i.stack.imgur.com/Sz2IS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sz2IS.jpg" alt="enter image description here" /></a></p>
<pre><code>int EMagnetPin = 8;
int solenoidPin = 9;
int ReedPin = 13;

void setup() 
{
  pinMode(EMagnetPin, OUTPUT);     // assign pin type
  pinMode(solenoidPin, OUTPUT);   // assign pin type
  pinMode(ReedPin, INPUT);        // assign pin type
  Serial.begin(9600);             //serial port open

void loop() 
{
Serial.print(digitalRead(ReedPin));
if (digital REad(ReeddPin)==0 ) {
digitalWrite(solenoidPin,HIGH);
                             
                  // Once magnet applied to Reed Switch Will activate the below

  digitalWrite(EMagnetPin, low);      
  delay(11000);                          
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(22500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);                          // Stops EMagnet
  digitalWrite(solenoidPin, HIGH);     //Start Solenoid   
  delay(500); 
  digitalWrite(solenoidPin, low);      
  delay(500); 
                    // Program Ends 
</code></pre>
 10794: <p>I presume you got some errors, like this:</p>
<pre class="lang-none prettyprint-override"><code>/tmp/arduino_modified_sketch_836883/sketch_oct30a.ino: In function 'void setup()':
sketch_oct30a:13:3: error: a function-definition is not allowed here before '{' token
   {
   ^
sketch_oct30a:37:17: error: expected '}' at end of input
       delay(500);
                 ^
exit status 1
a function-definition is not allowed here before '{' token
</code></pre>
<p>You have to read those. At the end of a function you need a closing brace. So, setup for example would look like this:</p>
<pre><code>void setup() 
{
  pinMode(EMagnetPin, OUTPUT);     // assign pin type
  pinMode(solenoidPin, OUTPUT);   // assign pin type
  pinMode(ReedPin, INPUT);        // assign pin type
  Serial.begin(9600);             //serial port open
}   // &lt;------- ADD THIS
</code></pre>
<p>Ditto for the end of the loop function.</p>
<p>The next problem is this line:</p>
<pre><code>    if (digital REad(ReeddPin) == 0 ) {
</code></pre>
<p>The function &quot;digitalRead&quot; is spelt like that, not as two words. Also you misspelt &quot;ReedPin&quot; as &quot;ReeddPin&quot;.</p>
<p>You have to go carefully through your code, look at the error messages, and fix them one by one. C++ is case-sensitive, you can't just thrown in extra spaces in the middle of words, and you have to be consistent with your variable names (ie. not misspell them).</p>
<hr />
<p>I suggest you do a C++ tutorial, or find an Arduino tutorial. These are basic coding mistakes made by beginners. With a bit of practice, and some working through examples, you will stop making them.</p>
 69739: <pre><code>#include &lt;Arduino.h&gt;
int EMagnetPin = 8;
int solenoidPin = 9;
int ReedPin = 13;

void setup()
{
  pinMode(EMagnetPin, OUTPUT);  // assign pin type
  pinMode(solenoidPin, OUTPUT); // assign pin type
  pinMode(ReedPin, INPUT);      // assign pin type
  Serial.begin(9600);           //serial port open
}

void loop()
{
  Serial.print(digitalRead(ReedPin));
  if (digitalRead(ReedPin) == 0)//it is known as digitalRead
  {
    digitalWrite(solenoidPin, HIGH);

    // Once magnet applied to Reed Switch Will activate the below

    digitalWrite(EMagnetPin, LOW);
    delay(11000);
    digitalWrite(EMagnetPin, HIGH);
    delay(500);
    digitalWrite(EMagnetPin, LOW);
    delay(500);
    digitalWrite(EMagnetPin, HIGH);
    delay(500);
    digitalWrite(EMagnetPin, LOW);
    delay(22500);
    digitalWrite(EMagnetPin, HIGH);
    delay(500);
    digitalWrite(EMagnetPin, LOW);
    delay(500);                      // Stops EMagnet
    digitalWrite(solenoidPin, HIGH); //Start Solenoid
    delay(500);
    digitalWrite(solenoidPin, LOW);
    delay(500);
  }
}// please close all loops 
// Program Ends
</code></pre>
<p>please remember to close all loops ,enter right spelling</p>
<p>I would suggest you to take a tutorial and also use a program like platformio or Arduino on vscode which will help you to write the code as it has auto code completion so you will always speel the right name for variables and also type the right function names.</p>
<p>Hope this helps.</p>
 31105: <p>Note that others already gave good answers; this is just a way to make your code more elegant.</p>
<p>This part:</p>
<pre><code>  digitalWrite(EMagnetPin, low);      
  delay(11000);                          
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(22500);
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
  digitalWrite(EMagnetPin, low);      
  delay(500);                          // Stops EMagnet
  digitalWrite(solenoidPin, HIGH);     //Start Solenoid   
  delay(500); 
  digitalWrite(solenoidPin, low);      
  delay(500); 
</code></pre>
<p>You see there is a lot of duplication (<code>digitalWrite</code> plus <code>delay</code>).</p>
<p>The only things changing are the pin number, the pin state and the delay time (which is mostly 500).</p>
<p>You can create a new function for this, e.g. <code>digitalWriteWithDelay</code>:</p>
<pre><code>void digitalWriteWithDelay(int pinNumber, int pinState, int delayTime = 500)
{
    digitalWrite(pinNumber, pinState);
    delay(delayTime);
}
</code></pre>
<p>Now you can rewrite</p>
<pre><code>  digitalWrite(EMagnetPin, low);      
  delay(11000);                          
  digitalWrite(EMagnetPin, HIGH);       
  delay(500); 
</code></pre>
<p>to</p>
<pre><code>digitalWriteWithDelay(EMagneticPin, LOW, 11000);
digitalWriteWithDelay(EMagneticPin, HIGH);
</code></pre>
<p>and all subsequent lines similarly. Btw, it's best to use LOW and HIGH (keep the capitalization consequent). As you can see in the last line, 500 need not to be passed as it is the default value.</p>
