error message/help with code.
error message , led messing code. z:\arduino\voltage\voltage.ino: in function 'long int rgb(int, int, int)': z:\arduino\voltage\voltage.ino:21:1: warning: no return statement in function returning non-void [-wreturn-type] } ^ code below. code: [select] #define analog_in_ch1 0 #define analog_in_ch2 1 #define analog_in_ch3 2 const int rgbred = 2; const int rgbgrn = 3; const int rgbblu = 4; void setup(){ serial.begin(19200); pinmode(analog_in_ch1,input); pinmode(analog_in_ch2,input); pinmode(analog_in_ch3,input); pinmode(rgbred,output); pinmode(rgbgrn,output); pinmode(rgbblu,output); } long rgb(int red, int green, int blue) { analogwrite(rgbred, (red)); analogwrite(rgbgrn, (green)); analogwrite(rgbblu, (blue)); } void loop(){ int val1 = analogread(analog_in_ch1); int val2 = analogread(analog_in_ch2); int val3 = analogread(analog_in_ch3); int cnt = 0; ...