California, USA
Offline
Newbie
Karma: 0
Posts: 33
I'm a 13 year old that's interested in anything electronic/robotic! My ROBLOX username is 058606.
|
 |
« on: January 27, 2011, 11:42:34 am » |
First of all, I'm very new to Arduino, so this is probably an easily answered question. What is the easiest/cheapest way to control an Arduino from a PC?
|
|
|
|
|
Logged
|
const bool loveElectronicsRelatedThings = true;
|
|
|
|
Copenhagen, Denmark
Offline
God Member
Karma: 17
Posts: 827
Have you testrun your PDE file today?
|
 |
« Reply #1 on: January 27, 2011, 11:53:13 am » |
Via the USB cable.
I suspect you are asking for something else....
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 71
Posts: 6813
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #2 on: January 27, 2011, 12:09:34 pm » |
Write a program in VB/C/C#/whatever that sends commands to the Arduino via the USB. Write a program on the Arduino that parses these commands.
______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 272
Posts: 25439
Solder is electric glue
|
 |
« Reply #3 on: January 27, 2011, 12:45:57 pm » |
My take on "whatever" is to use a language called Processing, it is free to download and use and remarkably similar to the Arduino code. Well not so remarkable actually as the Arduino was derived from it.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
God Member
Karma: 9
Posts: 895
Twitter: @simonmonk2
|
 |
« Reply #4 on: January 27, 2011, 01:55:29 pm » |
@058686 - I translated you. The message says: My Instructables username is RoboGeekDude12! http://home2.paulschou.net/tools/xlate/
|
|
|
|
|
Logged
|
|
|
|
|
Cumming, Ga
Offline
Edison Member
Karma: 12
Posts: 1388
Ultimate DIY: Arduino
|
 |
« Reply #5 on: January 27, 2011, 02:19:06 pm » |
I know this might not seem helpful, but the answer is "You control the Arduino with bi-directional RS232 SERIAL DATA transfers".
So.... any progamming or scripting language that supports RS232 Serial interfacing is how you control the arduino, so as Mike says... work with what you are comfortable with... or try Processing.
|
|
|
|
|
Logged
|
|
|
|
|
California, USA
Offline
Newbie
Karma: 0
Posts: 33
I'm a 13 year old that's interested in anything electronic/robotic! My ROBLOX username is 058606.
|
 |
« Reply #6 on: January 28, 2011, 03:12:04 pm » |
|
|
|
|
|
Logged
|
const bool loveElectronicsRelatedThings = true;
|
|
|
|
California, USA
Offline
Newbie
Karma: 0
Posts: 33
I'm a 13 year old that's interested in anything electronic/robotic! My ROBLOX username is 058606.
|
 |
« Reply #7 on: January 28, 2011, 03:13:53 pm » |
Yes, I'm asking for what language to use, and how to make it "tell" the Arduino what to do. Via the USB cable.
I suspect you are asking for something else....
|
|
|
|
|
Logged
|
const bool loveElectronicsRelatedThings = true;
|
|
|
|
California, USA
Offline
Newbie
Karma: 0
Posts: 33
I'm a 13 year old that's interested in anything electronic/robotic! My ROBLOX username is 058606.
|
 |
« Reply #8 on: January 28, 2011, 03:14:53 pm » |
May I have examples of those programs (Arduino and C#) please? Write a program in VB/C/C#/whatever that sends commands to the Arduino via the USB. Write a program on the Arduino that parses these commands.
______ Rob
|
|
|
|
|
Logged
|
const bool loveElectronicsRelatedThings = true;
|
|
|
|
California, USA
Offline
Newbie
Karma: 0
Posts: 33
I'm a 13 year old that's interested in anything electronic/robotic! My ROBLOX username is 058606.
|
 |
« Reply #9 on: January 28, 2011, 03:21:44 pm » |
May I have an example? My take on "whatever" is to use a language called Processing, it is free to download and use and remarkably similar to the Arduino code. Well not so remarkable actually as the Arduino was derived from it.
|
|
|
|
|
Logged
|
const bool loveElectronicsRelatedThings = true;
|
|
|
|
Sweden
Offline
Full Member
Karma: 10
Posts: 230
Arduino = The Best
|
 |
« Reply #10 on: January 28, 2011, 03:39:41 pm » |
I tried for a long time to interface my Arduino with C++ but I couldn't find any working library, so now I'm using processing every time I need a custom computer interface. Jan P.S. 058606: I'm almost the same age as you are (14, soon 15). EDIT: http://www.arduino.cc/playground/Main/InterfacingWithSoftware
|
|
|
|
« Last Edit: January 28, 2011, 03:41:34 pm by JanD »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 11
Arduino rocks
|
 |
« Reply #11 on: January 30, 2011, 05:34:12 am » |
Actually interfacing depends on your knowledge. Since Arduino is serial enabled you can send (and receive) serial messages through any serial enabled software on windows. You can use Telnet, Hyper Terminal, Putty and other similar programs to communicate directly with Arduino or you can create your own solution based on any serial enabled development platform. You can even use AutoIt3 to send and receive serial commands from you computer to your hardware.
In my personal opinion if you want to create your own interface for controlling devices the best way to go is Visual Studio (language depends on your experience). Visual Studio examples are plenty now-days so its easy to learn by searching on the web.
|
|
|
|
|
Logged
|
|
|
|
|
Vejen, Denmark
Offline
Edison Member
Karma: 7
Posts: 1177
RAWR! ^,..,^
|
 |
« Reply #12 on: January 30, 2011, 06:01:24 am » |
I am using C# to communicate with my arduino projects. Not sure if it is the easiest way there are, but it is easy for me because I can C#... How to read serial with C#: http://captain-slow.dk/2010/12/26/read-serial-from-an-arduino/
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 71
Posts: 6813
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #13 on: January 30, 2011, 06:57:04 am » |
I've used VB.net for this in the past and that's fairly easy. The best example I have is Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i As Long Dim s As String
If Not SerialPort1.IsOpen() Then SerialPort1.Open() End If
TextBox1.Text = "" TextBox1.Refresh() Do While i < 50 SerialPort1.Write("<hello>") s = SerialPort1.ReadLine() TextBox1.Text = TextBox1.Text + s + vbCrLf TextBox1.Refresh() i = i + 1 Loop
End Sub
Private Sub Form1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed If SerialPort1.IsOpen() Then SerialPort1.Close() End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SerialPort1.PortName = "Com33" SerialPort1.Open() End Sub End Class (I must clean this up one day to just echo characters). However the simplest thing to do is just use one of the terminal progs mentioned above, or even the IDE serial monitor. That way there's no PC programming to do at all. ______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 37
Posts: 974
Get Bitlash: http://bitlash.net
|
 |
« Reply #14 on: January 30, 2011, 07:05:17 am » |
You might also find it useful to take a look at Bitlash, http://bitlash.net -- Bitlash is a shell language interpreter that runs on the Arduino, and it is easily controlled from the PC side by typing or sending commands through the virtual serial port. You can store macros in EEPROM to automate small applications. Download and doc at http://bitlash.net, and some application thoughts on my blog at http://entropymouse.comHappy hacking, -br http://bitlash.nethttp://entropymouse.com
|
|
|
|
|
Logged
|
|
|
|
|
|