How to control an output pin...and how to find out what the compiler name for the pin is.

Dependencies:   mbed

main.cpp

Committer:
captaintim
Date:
2015-12-20
Revision:
0:e3b48fea2164
Child:
1:0e26c8d5e834

File content as of revision 0:e3b48fea2164:

#include "mbed.h"

/*comments: testing turning on and off of Pin 26 
using https://developer.mbed.org/users/synvox/notebook/lpc1768-pinout-with-labelled-mbed-pins/ 
by Nenad Milosevic as a guide to the complier name (P2_0) for pin 26 
verification: put the black lead of a multimeter on pin 1 (gnd)
and put the red lead on pin 26, voltage varies between +3.28VDC and 0VDC */


int main() {
int on = 1;
int off = 0;
int i = 5;

while(1){
 DigitalOut (P2_0, on); //pin 26
 wait (i);
  DigitalOut (P2_0, off);
 wait (i);
   }
}