
最近把Arduino的API移植到了STM32平台下(STM32F103系列)。# ^" w# ^( l/ u4 } 现在可以像编写Arduino板子一样来给STM32编程了。 Github地址:http://github.com/MakerLabMe/MakerLabBoard! o. s4 `2 n" d$ E& X 实现一个LED闪烁只需要10行代码: int led = 13;2 I, B, n- l/ P( h2 M # _8 J1 [/ S6 I9 n* q, c9 M) S/ i7 y // the setup routine runs once when you press reset:! Y B. W5 _( x3 w9 c void setup() {* U, t. N5 u. W# I6 ^5 D // initialize the digital pin as an output." J, P# ]& m8 |: N5 z/ S0 e pinMode(led, OUTPUT); }( |" h/ W9 E* y5 S+ u' C8 ~4 w* l , X* R1 E1 L- J. |0 J( K6 I/ \5 g // the loop routine runs over and over again forever:/ o, Q% u" U% i* E" x+ p4 d void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)4 K2 F1 H( _. S delay(1000); // wait for a second* ]) d$ N! J- p5 w0 A digitalWrite(led, LOW); // turn the LED off by making the voltage LOW9 m7 Z/ f, w3 u* a" ?9 }" v% b delay(1000); // wait for a second } |
RE:不知道大家对Arduino IDE编写STM32代码有没有兴趣
RE:不知道大家对Arduino IDE编写STM32代码有没有兴趣
先安装在 Windows的Arduino1.5.4
不知道ST的开发板能否使用.