Pages: [1]   Go Down
Author Topic: How to set up Arduino Uno to receive inputs from a computer?  (Read 532 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am working on trying to get a robotic arm to move in relation to brainwave signals, and have a program that can output keystrokes when brainwave patterns are recognized, but I am not sure how to send this signal to the Uno itself. I thought I could send the signals through the USB cable, but I can't really find documentation on how to do that. If I were to get certain shields, would that make it easier to send signals from the computer to the Uno, or am I just missing something basic? Any help would be much appreciated.
 
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 517
Posts: 26291
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Connect Uno via serial cable to the PC.

Have sketch check for PC output, act on what's received:
Code:
void loop(){
if (Serial.avaliable()>0){
  keystroke = Serial.read();
  }
// do something based on keystroke recieved
}
This is simplest, you might want to look for something longer, or for certain variables, or send a message back, etc.
Can't help you on the PC side.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Sr. Member
****
Karma: 2
Posts: 254
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Your PC can communicate to the board anytime using a Serial connection via the USB cable.

There is a lot of great documentation under the "4. Communication" header on this page: http://arduino.cc/en/Tutorial/HomePage

For example, http://arduino.cc/en/Tutorial/ReadASCIIString

You can use any language you want to make the Serial connection, from Processing to C++ to Python.
Logged

Grad student, creative technologist, OSHW engineer
http://jason-webb.info

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or you could use this Serial messaging library for C# http://forum.arduino.cc/index.php?topic=186928.0. C# is a very easy and powerful language.

Disclaimer: I wrote the library, so I might be biased smiley-razz
Logged

Pages: [1]   Go Up
Jump to: