i am using the same concept in my program of frequency counter in which i am not able to use void setup or void loop function cos its causing some error hence i am using int main function......
i have made a program to take intput from serial port as file name and saving it in void setup and loop format it is working fine but when i change it to int main function it is printing only two letters and stops tried using init() function works but it is disturbing my frequency counting process(totaly disrupting the process) getting some random readings on my frequency
here is my file save program..... how can i dignose it without using setup ,loop , init() function
IT OUTPUT I AM GETTING IS en and stops
Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.
Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool. I recommend you to use the standard IDE instead.
Please remove unnecessary blank lines from your code before posting to the forum. One or two to separate code into logical sections is fine but large spaces for no reason just make for more scrolling when we're trying to read your code.
Using main() in Arduino is only for advanced users. Clearly you're not an advanced user so you need to go back to using setup() and loop() and fix these mysterious errors.
Write your code using setup() and loop()
Post the code USING CODE TAGS (</> button on the toolbar).
When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).
indrajeettambe:
i am using the same concept in my program of frequency counter in which i am not able to use void setup or void loop function cos its causing some error hence i am using int main function......
That is silly. Just fix the problems that are preventing the use of setup() and loop()