Although the Arduino IDE uses C++ for Arduino programming, C and C++ are close enough related that C code usually works without change in a C++ compiler. So just write your C code and call it from the setup() and loop() routines and you're fine.
Although the Arduino IDE uses C++ for Arduino programming, C and C++ are close enough related that C code usually works without change in a C++ compiler. So just write your C code and call it from the setup() and loop() routines and you're fine.