akiyoshi oguro
/
Nucleo_Hall_Set_import
Hall Sensor PCB mounting
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut myled(LED1); 00004 Serial pc(USBTX,USBRX); 00005 00006 00007 DigitalIn H1(PA_15); 00008 DigitalIn H2(PB_3); 00009 DigitalIn H3(PB_10); 00010 00011 AnalogOut Hout(PA_4); 00012 unsigned int U; 00013 unsigned int V; 00014 unsigned int W; 00015 00016 int main() { 00017 pc.baud(128000); 00018 00019 while(1) { 00020 myled = !myled; 00021 00022 U=H1; V=H2; W=H3; 00023 00024 pc.printf("%d,%d,%d \r" ,U,V,W); 00025 00026 } 00027 }
Generated on Mon Aug 1 2022 00:05:03 by 1.7.2