Go Down

Topic: Programming Arduino in plain C or C++ (Read 2 times) previous topic - next topic

xSmurf

Quote
Anyway, I want to thank you. That Makefile was really useful. I now understand how it all works. ;)


Pretty much the only thing it doesn't do that the IDE does is auto prototypes, "hot linking" of libraries and burning the bootloader (but there's already a makefile for that). So yeah, use at will!
"Pilots believe in a clean living... they never drink wisky from a dirty glass."

xSmurf

#11
Feb 12, 2008, 10:04 pm Last Edit: Feb 12, 2008, 10:09 pm by xSmurf Reason: 1
(Sorry for the double post)

Quote
Yes, the program will use functions like pinMode, digitalWrite, digitalRead to interface with multiple Arduinos, collecting data, processing it and then sending data. I'm planning to use one thread per board...


I'm still not sure I got this... Which program? The one that runs on the host machine? If so, that's not possible. What you're compiling is AVR object code. It will not run on a PC (x86) and talk to the parallel/serial port...
"Pilots believe in a clean living... they never drink wisky from a dirty glass."

mem

Quote
Quote
Hi COde7, I am intrigued by your question but am a little confused on what you want to do.
Are you planning to interface your control program with the arduino using low level functions like pinMode, digitalWrite, digitalRead etc? If not, how would you use these functions in your control program?

Just curious, it sounds like an interesting project.


Yes, the program will use functions like pinMode, digitalWrite, digitalRead to interface with multiple Arduinos, collecting data, processing it and then sending data. I'm planning to use one thread per board...

If  the purpose of the arduinos is to perform i/o on behalf of the central control program then I can't see that using  those low level commands is the best way to do it. Why not interface at a higher level with commands like move, turn, get position etc and let the arduinos map these to physical i/o devices.

Go Up