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
| #include "stm32f10x.h" // Device header
#include "OLED.h"
#include "LEDonStm32.h"
#include "SG90control.h"
#include "Delay.h"
int main(void) //本程序为点灯小程序且不需要库函数支持。在其他程序运行前可以 借用本程序来 测试单片机链接情况
{
LEDonStm32_Init();
OLED_Init();
LEDonStm32_on();
Pwm_Init();
SG90_SetAngle1(0);
Delay_ms(200);
SG90_SetAngle2(120);
Delay_ms(200);
SG90_SetAngle3(120);
Delay_ms(200);
SG90_SetAngle4(120);
Delay_ms(200);
OLED_ShowString(1, 3, "HelloWorld!");
while(1)
{
}
}
|