Pages: [1]   Go Down
Author Topic: Control Arduino Via C Software  (Read 636 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

Good day!

I'm new to using Arduino or any micro-controller of the sort and I would like to create a program in C that would allow me to communicate with the Arduino board via the USB port on the board itself.

Can anyone help me out with this.

To be more precise, I want to be able to read input and activate outputs from the computer (Mac or PC).

Thanks!!
Logged

Fred Carle
www.3facto.ca

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16558
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Check out the Arduino playground for interfacing with software, they have information on C and many of it's near cousins further down in the listed software.

 

http://arduino.cc/playground/Main/InterfacingWithSoftware
Logged

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

I understand this but even if lets say I try this one:

http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/

They don't explain how it communicates with the board. I tried the example they give but nothing comes of it. I don't see anything going to the arduino (Tx not showing anything going to the board).
Logged

Fred Carle
www.3facto.ca

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16558
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So many details in the C program and/or the Aruino sketch could be the reason it's not working for you. If you can connect your arduino to the PC and able to down load sketches like blink, then all your Arduino hardware is working correctly. The rest is programming and I'm probably not the best resource to help you with that. Having seen people that do know their stuff around here, the first thing they would have you do is post your Arduino code and post your C code. Otherwise it's theoretical answers for a non theoretical situation.

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23839
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

Tx is the arduino output to the PC - your description appears to treat that as the input to the arduino.
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.

Pages: [1]   Go Up
Jump to: