title: How do I reset my Arduino Mega2560 with my C# application?
body: <p>I noticed the Arduino IDE automatically resets on startup/exit by the built in serial application due to </p>
  
  <blockquote>
    <p>one of the hardware flow control lines (DTR) of the FT232RL is connected to the reset line of the ATmega1280 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip.</p>
  </blockquote>
  
  <p>I noticed that behaviour does not happen with my serial C# application. I would like the reset feature to work with my C# application. What am I not doing to get my Arduino Mega to reset by my C# application?</p>
  
  <p><strong>Working Code for Arduino and C#:</strong>  </p>
  
  <p>I got it working in about 5 minutes by hooking up a wire from PWM Port12 to the RESET Port. On the Arduino, I checked for the text RESET on the incoming SerialEvent3. When RESET is found do:</p>
  
  <pre><code>pinMode(7, OUTPUT);  
  digitalWrite(7, LOW);
  </code></pre>
  
  <p>As for as the C# it was as simple as:</p>
  
  <pre><code>if (serialPort1.IsOpen)
  { 
      serialPort1.Write("RESET"); 
  }
  </code></pre>
  
  <p>Reset seems to work as expected.</p>