我如何将信号发送到计算机
对你们每个人的问候。我需要你的帮助。我正在从事一个项目。当A&gt时,我需要大于5,Arduino向计算机发送信号,并开始在计算机上播放视频。我的计算机操作系统是Windows111。我想在Windows Media Player或其他任何内容上播放视频。每次我的计算机都开放,并且在媒体播放器上进行视频准备就绪。我不知道该怎么做。首先,我连接了伺服电机,伺服电机旋转了70度,并击中了计算机的“空间”键。现在,我想进一步开发它。当它进入“如果”期间时,它将发送信号并开始自动播放视频。
greetings to each of you. I need your help. I am working on a project. I need that when a > is greater than 5, the arduino sends a signal to the computer and starts playing the video on the computer. my computer operation system is Windows11. I want play video on windows media player or anything. everytime my computer is open and video on media player ready to play. I don't know how to do it. first I connected the servo motor, the servo motor rotated 70 degrees and hit the computer's "space" key. now I want to develop it further. When it enters the "if" period, it will send a signal and start playing the video automatically.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不需要如此复杂。使用Java,C#或Python,您可以编码脚本,在其中可以读取值并在串行端口上采取操作。对于Arduino侧用途
serial.begin(9600);
在setup()
中,然后在loop
as中写入您的代码:当您的
时
大于5,我们将1
值发送到串行端口。现在,我将继续解释Python。您进行测试并在
中写代码
部分。You don't need to think so complicated. With Java, C# or Python, you can code scripts where you can read values and take actions over the serial port. For Arduino side use
Serial.begin(9600);
in thesetup()
and write your code inloop
as:While your
a
greater than 5 we send1
value to serial port. Now I will continue to explain over python.You do your test and write your code in
try
section.