rafaelmaeuer
5/24/2017 - 4:46 PM

How can I use structs as function returntypes or as parameters to functions? - From https://playground.arduino.cc/Code/Struct

How can I use structs as function returntypes or as parameters to functions? - From https://playground.arduino.cc/Code/Struct

//The usual arduino workaround/hack is to have all functions that requires custom datatstructures to be placed in an additional .h file. Just create a new tab in the IDE and give it a name.h then #include "name.h"

RGB getBlue(); //return RGB color = { 0 , 0 , 255 };

void displayRGB(RGB color); //could call an analogWrite on all member variables