Arduino computer serial connection

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. I don't know how to do it. first I connected the servo motor, and 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.

What does the servo and space key have to do with your described project ?

I think that's how he got it to interact with his computer before and now he wants to do it through software.

It's easy to send data to the serial monitor, or you could even function as a keyboard and send the required button presses. You'd have to research how exactly to do that/get your computer to respond to that, but I know both are possible.

Hi, @faasasd
Welcome to the forum.

Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

what program do you use on the computer to play videos? is the computer Windows or Linux?
in a similar project using Raspberry Pi micros a Java program responds to commands to run videos using VLC video player
Edit: what programming language will you use on the host computer to read the incomming commands and start the video playing? e.g. C, C++, C#, Java, Python, etc

If using Arduino IDE, then data/command from UNO goes to the Serial Monitor of the IDE. now, you need to develop an application at the PC side that will interact with the Serial Monitor to pickup the arrived signal and then play the video.

yeah i use arduino ide. but i cannot send signal which is the play video. i dont know how to prepare this software\program.

my computer operation system is windows11. i use windows media player. it is standart\normal video player i think it doesnt matter. i write this program on arduino ide(c++). if is possible i write in python language but how connect the arduino to python ide. actually i need your help.

before i use servo motor. the servo motor hit the space key and the video play my windows player. now i want remove the servo. i want this with software but i dont know how can i do

Learn VB of Visual Studio.

I don't use Python at all! However a quick web search found:

  1. pyserial can access a COM port and receive/transmit characters - you need a call to a method which wait for the command from the Arduino
  2. call-external-programs-python - to execute the video player?

Hi Tom, thank you. i have same project. i am computer engineer. i know c++,arduino and phtyon programming language.

Hi,
Have you looked at Arduino keyboard emulation?
I don't know enough about it, so I'm dangerous.

Google.

arduino keyboard emulation

See if that will help with your communication.

Tom... :smiley: :+1: :coffee: :australia:

Will you be using a wire to connect the MCU to the PC or will it be wireless?

Running Eclipse MQTT Broker on the PC and using PubSubClient on the MCU one could do wireless bidirectional comms between the PC and the MCU. On the PC Node-Red can be used to create the interface between the things to do with the MCU's signal arrives.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.