树莓派5蓝牙通信与相机项目全解析
1. 智能手机蓝牙控制LED项目
在这个项目中,我们要通过安卓智能手机的蓝牙通信来控制连接到树莓派5的LED。
- 项目描述 :LED通过470欧姆的限流电阻连接到树莓派5的GPIO 21端口(引脚40)。可以从安卓智能手机发送特定命令来控制LED的开关。
- L1 :打开LED
- L0 :关闭LED
- 程序代码(blueled.py)
#=======================================================
#
# LED CONTROL BY BLUETOOTH
#
#========================
#
# In this project an LED is connected to GPIO 21.The LED
# LED is controlled by sending commands from an Android
# smart phone using a Bluetooth apps.
#
# Valid commands are:
# L1 Turn ON the LED
# L0 Turn OFF the LED
#
# Author: Dogan Ibrahim
# File : blueled.py
# Date : October, 2023
#================================================
超级会员免费看
订阅专栏 解锁全文
122

被折叠的 条评论
为什么被折叠?



