Call .ino function on a .c script

Hello,

I'm pretty nwbie in programming at all, so don't play hard on me haha

Im trying to send some sensor data to Azure's IOT Hub. To do so, I read every single tutorial and documentation online and im modifying an azure sample to send LDR data to the cloud.

The problem is that my .ino function:

int measureLight(){
const int LDR = 0;
int ldrvalue = 0;
ldrvalue = analogRead(LDR);
return (ldrvalue);
}

nedds to return the data (ldrvalue) on a .C sript

do I nedd to #include the .ino file? Make something with the .h file? (did not understand what this header files do thought)

I'm calling the measureLight() function by simply "measureLight()" on the .C code. Pretty sure it is wrong.

thanks in advance

Pretty sure it is wrong.

What is wrong is not posting all of your code.

The .ino file gets converted to a .cpp file to be compiled. Where does the .c file come in?