Arduino Programming using Legacy Code and Arduino Target


I am trying to program Arduino UNO through the new MATLAB feature called Arduino Target. However Interrupt functions or I2C communication is not available on Arduino Target. Therefore I wanted to use Legacy Code Tool to create my own Simulink Blocks with C/C++ codes.

My aim is to use the commands like pinMode, AttachInterrupt, digitalWrite...etc or libraries like Wire in order to add more functionality to Arduino Target.

Therefore I need to see the all the code sent to the arduino microcontroller and the libraries that I need to add to the code so that I can use the aforementioned commands (attachInterrupt, digitalWrite...etc) in a C code.

Thanks for your help already.

P.S: I will post a guide for this as soon as I fix these problems.

Have you already checked Matt Bilsky's page on his Servo Block Library for the Simulink Arduino Target ( )? I found it very useful when working on a similar problem.

Here's a new MathWorks File Exchange entry that may help - it contains a guide that explains, in a step-by-step fashion, how to develop device driver blocks.

Further info is available at