Hall Sensor PCB mounting

Dependencies:   mbed

main.cpp

Committer:
oguro
Date:
2017-03-09
Revision:
0:f8b3b7c6c71b
Child:
1:5636e2520744

File content as of revision 0:f8b3b7c6c71b:

#include "mbed.h"

DigitalOut myled(LED1);
Serial pc(USBTX,USBRX);


DigitalIn  H1(PA_15);
DigitalIn  H2(PB_3);
DigitalIn  H3(PB_10);

AnalogOut Hout(PA_4);

int main() {
    pc.baud(128000);
    
    while(1) {
        myled = !myled;
        
        U=H1; V=H2; W=H3;

        pc.printf("%d,%d,%d \r" ,U,V,W);
     
    }
}