title: Need help understanding going from one Arduino to another
body: <p>The last microcontroller I used was an MSP430</p>
  
  <p>Which used code like</p>
  
  <pre><code>WDTCTL = WDTPW | WDTHOLD;   // Stop watchdog timer
  P2REN = 0;
  P2DIR = 0;
  P1DIR = (BIT0 | BIT1 | BIT2);// this sets up the output pin 1.0 1.1 1.2 to be able to be turned on
  P2DIR |= (BIT0 | BIT1);// this allows the pin 2.0 and 2.1 to be able to be read from
  </code></pre>
  
  <p>I am now using STM32F103C8T6
  or STM32 as most sites/videos call it.</p>
  
  <p>I am looking for a means to when a sensor is tripped or "ON" to intercept that via a pin and output an action via another pin.</p>
  
  <p>i.e. for</p>
  
  <p>If (reads input pin)</p>
  
  <p>(does action to output pin)</p>
  
  <p>From what I can tell from all the research I have done the STM32 is more "complex" but "dumber" at the same time where before I could just read a pin and do an action it now seems very complex in what I have to do to do the same thing that was just a simple process before.</p>
  
  <p>Any ideas or hints to point me in the right direction? If you can give me an example of how a code block sample would be laid out I learn best by reverse engineering examples and testing to see how it works.</p>