I was working on a project in c . But now i want to link that code to arduino in such a way that if , the if condition in code doesnt work that well, it glows a red led . now i am thinking of generating events that can trigger the arduino . But i am unable to link that code to arduino . If anyone has any idea please help me with the code on how to link it !
Arduino is programmed with C/C++.
Post the code, using code tags ("</>") button.
@navtej_singh, do not cross-post. Other thread removed.
Ok ! But how the arduino code will be written in it ? Will it use avr programming? And which compiler will be used as i want both the outputs one on arduino and one a general hello world like output . And please tell what is cross post
A cross-post is where you post the same question in different parts of the forum.
It makes us very cross, because it wastes time.
Your other question is too vague to answer.
Sorry for that ! But the thing is i have only limited time for the deafline and so i can harfly understand what process i have to go with . If you could tell something in detail i would be very thankful to all
You've got five minutes before your next post.
Why don't you use that precious time (maybe go to ten or fifteen) to formulate a proper explanation of your problem?
I have already done a lot ! Got the customized ide in codeblocks and visual studio for the arduino which had both the c and arduino modules . i also tried downloading the plugin for arduino in eclipse . But somehow i dont know how, when my required event is generated how that arduino code will run as a sketch !And how will c also show a output for the same !
No, still no idea.
Heavy on jargon, light on detail.
navtej_singh:
I have already done a lot !
How about posting the C code that you want to run on your Arduino?
...R
PS please post your program using the code button </> so it looks like this
. See How to use the Forum
Man ! I’m saying i dont know how to link the c code to arduino how to use the standard libraries and the arduino libraries at one time ! How can i get the my led lighted just as the vondition goes wrong !
I'll come back tomorrow
Ok! So somehow got to know that i if i want to do this , i have to get it done through eeprom . Basically i have to aave that events in a file in the required format and then execute that commands from eeprom .Anyone has any idea about the format eeprom accepts so that i have to export that file from c and then get it automatically read from eeprom in arduino .And, how eeprom is accessed in arduino .
Anyone has any idea about the format eeprom accepts
It stores bytes.
And, how eeprom is accessed in arduino .
Try reading the reference page. Plenty of detail there.
navtej_singh:
Man ! I’m saying i dont know how to link the c code to arduino
Did you read Reply #9?
...R
Man ! I'm saying i dont know how to link the c code to arduino
-
Download the Arduino IDE and set it up on your computer.
-
Plug in your Arduino.
-
Start with this program and fill in the necessary details:
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
- Upload to your Arduino.