简体   繁体   English

用 Python 控制 Arduino

[英]Controlling an Arduino with Python

I'm creating facial recognition software that needs to activate a motor when a face is detected.我正在创建需要在检测到面部时激活电机的面部识别软件。 Currently, I have the code in the Arduino IDE that controls the servo motor, and I have the facial recognition software in Visual Studio using OpenCV (built in python) that prints out a message when a face is found.目前,我在 Arduino IDE 中有控制伺服电机的代码,我在 Visual Studio 中有面部识别软件,使用 OpenCV(python 内置),当找到面部时会打印出一条消息。 I want to be pointed in the right direction on how to control an arduino with python.我想指出如何使用 python 控制 arduino 的正确方向。

Not sure you can run facial recognition software on Arduino as it is used only for controlling some peripheral like LEDs and motors.不确定您是否可以在 Arduino 上运行面部识别软件,因为它仅用于控制一些外围设备,如 LED 和电机。

I think Raspberry Pi is better choice for you as RPi is more efficient microcomputer with own OS.我认为 Raspberry Pi 对您来说是更好的选择,因为 RPi 是具有自己操作系统的更高效的微型计算机。 You can plug in special RPi camera to RPi for facial recognition.您可以将特殊的 RPi 摄像头插入 RPi 以进行面部识别。 You can control motor with RPi as well.您也可以使用 RPi 控制电机。 In case you need Arduino for controlling motor you can plug Arduino to RPi.如果您需要 Arduino 来控制电机,您可以将 Arduino 插入 RPi。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM