-
Notifications
You must be signed in to change notification settings - Fork 0
/
Blink.ino
38 lines (36 loc) · 1.18 KB
/
Blink.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
[BLUEPILL Pinout]
----------
BAT-| STM32F |-3V3
LED=PC13-| 103C |-GND
OSC32IN=PC14-| |-5V
OSC32OUT=PC15-| |-PB9(~)
PA0(~)-| |-PB8(~)
PA1(~)-| |-PB7(~)=SDA
PA2(~)-| |-PB6(~)=SCL
PA3(~)-| |-PB5
NSS=PA4-| |-PB4
SCK=PA5-| |-PB3
MISO=PA6(~)-| |-PA15
MOSI=PA7(~)-| |-PA12=USB+
PB0(~)-| |-PA11=USB-
PB1(~)-| |-PA10(~)=RX
PB10-| |-PA9(~)=TX
PB11-| |-PA8(~)
NRST-| |-PB15
3V3-| |-PB14
GND-| -- |-PB13
GND-| | | |-PB12
----------
*/
#define ledPin PC13
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop() {
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}