最近把Arduino的API移植到了STM32平台下(STM32F103系列)。' |- b. o6 w/ C* F6 ` 现在可以像编写Arduino板子一样来给STM32编程了。 Github地址:http://github.com/MakerLabMe/MakerLabBoard( i8 b" g; L! ?6 p# H, R. o 实现一个LED闪烁只需要10行代码:, w. a( ]4 i( W! m% X int led = 13; ( D5 e5 B' y; I& A // the setup routine runs once when you press reset: B( V3 ?$ H2 ^ void setup() {- J$ H2 T& [0 ~ // initialize the digital pin as an output.5 ^6 v" a( b, o pinMode(led, OUTPUT);( ^8 S4 k( F& k1 F' t0 R8 z- E } ( u3 L: ]+ n% ^, Y5 a$ y // the loop routine runs over and over again forever:( b% b2 d5 B8 S& u7 Z4 H void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW& f, D9 C0 V: E3 F0 q delay(1000); // wait for a second, f* }+ ` t: K" M7 E: X' K( K3 b } |
RE:不知道大家对Arduino IDE编写STM32代码有没有兴趣
RE:不知道大家对Arduino IDE编写STM32代码有没有兴趣
先安装在 Windows的Arduino1.5.4
不知道ST的开发板能否使用.