i want convert this c code to Arduino IDE code

please help me

main.c (10.8 KB)

please help me

Head on over to Gigs and Collaboration, if you want to hire someone. Here, we have this not-unrealistic expectation that you have tried something. Clearly, you haven't. Do you even know what that code does?

Arduino is C (or C++ anyway). So you don't need to "convert" it.

That code calls a lot of functions which are not defined in the file and which look like part of a non-Arduino runtime environment. Mixing two different runtime environments is a very bad idea since they will both be trying to manage the hardware resources - as well as doubling up the runtime overhead. In order to convert that code to run within the Arduino runtime you would need to identify all the functions, types, variables and values which are not defined in [u]your[/u] code (and are therefor assumed to come from your runtime), and replace them with the Arduino equivalent. The replacement my involve more than just substituting one name with another since the two runtimes are likely to provide very different APIs. You will need to understand the code, understand how it is using the 'old' API, and work out how to achieve that same thing using the Arduino API.

As a very first step, you should divide your existing main() function into a setup() function which does the one-off initialisation, and a loop() function that contains the code currently inside your while(true) loop.

thanks dude