I'm working with 'Simulink Support Package for Arduino Hardware', with Serial Transmit block specifically, with an Arduino Mega 2560. I want to create a higher block that contains this block and others, so I'm trying to promote its parameter 'portNumber' (determine the serial port to use in Arduino) for change it in the higher mask.
When I create that mask, I add a new parameter and use the 'Promote underlying block parameter(s) to this mask parameter' button. All is ok until I press 'Build model'. The following error appears:
"Error evaluating 'InitFcn' callback of Arduino Serial Transmit block (mask)
Caused by: Undefined function or variable 'port'."
I don't know why it doesn't work, if anyone know what is happening and could help me I would appreciate. Thanks.