WiFi模塊為esp8266
可以通過連接阿里云,控制RGB,電機,步進電機等。
注意:WiFi名和密碼需修改成自己的。連接阿里云的相關參數要修改成自己的。
單片機源程序如下:
- #include "stm32f10x.h"
- #include "led.h"
- #include "delay.h"
- #include "motor.h"
- #include "uart.h"
- #include "stdio.h"
- #include "string.h"
- #include "makedata.h"
- #include "rgbled.h"
- #include "dht11.h"
- #include "wifi.h"
- #include "MQTT.h"
- #include "stepmotor.h"
- #include "oled.h"
- int main(void)
- {
- uint8_t buf[50]={0};
-
-
- // TYPE_DATA value={0};
- // TYPE_DHT11 dht11={0};
- uint8_t ret;
-
- LedInit( );//LED初始化
- MotorInit( );
- RGBPinInit( );
- uart1_init(72,115200);
- Uart2Init(115200);
- DHT11PinInit( );
- StepMotorPinInit( );
- OLEDInit( );
- Display( );
-
- while(1)
- {
-
-
-
- }
- }
復制代碼
所有資料51hei提供下載:
阿里云.7z
(84.21 KB, 下載次數: 156)
2019-12-31 00:42 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
|