Go Down

Topic: Arduino Trigger (Read 346 times) previous topic - next topic

Pablitoeas

Hi guys, I was wondering if anyone could help me.
I have two computers with two diferentes programms and I needed a trigger device which would run the especific function on these programms, but i need them to start at the same time, I've been cracking my head over this and haven't come up with anything, I've blanked out'. I just have no clue how to do it and which arduino would be mostra fitted for this project, by the way it's a science project.


Thanks guys, I hope someone can help me.
:)

rw950431

Welcome to the forum! 

What starts the program(s) on the computer(s) now?  Is it a button press?  A mouse click?  A signal from a switch? 

What do you mean by " start at the same time"?  within 1 minute? within 1 second?  within 1 microsecond?

You need to be more specific about what you are trying to do before anyone can help you

carlosjulian

I have the same problem.

2trillion

#3
Jul 30, 2016, 01:12 am Last Edit: Jul 30, 2016, 04:51 pm by 2trillion
Arduino #1 on one computer would have to be connected to Arduino #2 on the other computer and digital I/O communication would have to be added to each Arduino code.  I would try to use the smallest micro controller possible.

This is a simple outline.

Computer #1

Code: [Select]
int pinA = 3;
.
.
.
pinMode(pinA,OUTPUT);
.
.
.
digitalWrite(pinA,High);
trigger device


Computer #2

Code: [Select]
int pinB = 4
.
.
.
pinMode(pinB,INPUT);
.
.
.
val = digitalRead(pinB);
.
.
.
if (val >0)
{
trigger device}
.
.
.
If you want to send me an email, please mark it somehow.  Otherwise, I might delete it.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy