Code covered by the BSD License  

Highlights from
Device Drivers

4.9 | 25 ratings Rate this file 258 Downloads (last 30 days) File Size: 1.22 MB File ID: #39354
image thumbnail

Device Drivers


Giampiero Campa (view profile)


02 Jan 2013 (Updated )

Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples

| Watch this File

File Information

This package contains a guide that explains, in a step-by-step fashion, how to develop device driver blocks (blocks that perform target-specific functions when executed on a target platform).
Example drivers for:

-) Arduino digital output
-) Arduino digital input
-) Arduino analog output
-) Arduino encoder read

are included.

While the examples are built using the Arduino as the hardware platform (specifically relying on the Simulink Support Package for Arduino), the method applies to any other supported target.

The first part of the guide describes a method based on the S-Function builder, while the final part of the guide illustrates a method based on the MATLAB Function block (examples for the latter method are given in the zip file Advantages and disadvantages of each method are discussed in the guide.

Finally, note that for MATLAB 2013b you will need to apply a fix for the S-Function builder to develop blocks with no input. To do so, go to the following page: , scroll down to the bottom, and follow the instructions therein.


This file inspired Adlx345 I2c Driver For Arduino Mega, Controle Moteur à Courant Continu Avec Arduino, Tenet Lcd Library For Arduino Hardware, Raspberry Pi Quadrature Encoder S Function, Arduino S Function For Mpc4725 I2 C Dac, Example Driver Blocks For Simulink Hardware Support Packages, Motor Shields, Simulink Library For Zumo Robot, Embedded Coder Target For Arduino, Tenet Sdcard For Mega.Zip, Rc Receive Driver Block For Arduino, Raspberry Pi Driver Block S Function, Raspberry Pi Dc Motor H Bridge Driver Block S Function, Raspberry Pi Pwm Driver Block S Function, Raspberry Pi Mpu6050 S Function With I2 C Communication Using Wiring Pi I2 C, Sen0140 Simulink I2c Driver For Arduino Mega 2560, and Device Drivers For The Beagle Bone Black.

Required Products Simulink
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (68)
27 Feb 2015 Carlos

Carlos (view profile)

Many thanks for your tutorial, now Simulink has become even more powerful to me. Is there a way to remove the tedious pasting the .cpp and .h at the current MATLAB directory for successful compilation?

21 Feb 2015 Nebojsa

Does someone make a simulink block to use DS1302 real time clock?
I try it, but I did not succeed.
Please, help with some sugestions.

Comment only
12 Feb 2015 chfakht chfakht

Simulink with arduino : data acquisition
Hello all ,
i'm working on data acquisition from a sensor attached to the arduino : MPU6050 using a model in simulink , i have installed the hardware support in simulink but i don't know how to start building the model , the model must read the data from arduino by deploying it into the arduino
my connection arduino <=> MPU6050 is :

Arduino MPU 6050
3.3V VCC

any help will be appreciated

Comment only
19 Jan 2015 Nancy

Nancy (view profile)

Solved! Thanks

Comment only
16 Jan 2015 Nancy

Nancy (view profile)

when I tried to deploy a simulink model that contains fuzzy logic controller block it didn't work :s . Is there a way to deploy it to Arduino Mega ?

15 Dec 2014 amir

amir (view profile)

Great! after 1 month working on an encoder with 8400cpr to read the data by arduino mega2560 and NO answer, today I did it just using by this work.

09 Dec 2014 Simon

Simon (view profile)


I built an own arduino Stepper library for arduino uno and now i want to embed it into simulink.
The problem i have is that i use:


instead of the common:


structure, because the init() function in the common structure interferes my library functions.

I tried to use the s-function builder instruction with my library and i had the same issues as i had when writing functions of my library into the common(setup(),loop()) structure.

My question:

Is there a way to use the main() structure instead of the void(),loop() structure using the s-function builder {with arduino uno and the simulink support package of matlab}?

What i tried so far:
- deleting the init() function call in the main function of the s-function builder block created modelname_rtt folder.
- changing the init(){as a part of the wiring.c} so that it executes the setup for my library.

By the way thanks for your great tutorials.

Best Regards,

26 Nov 2014 Giampiero Campa

Giampiero Campa (view profile)

For Daniel and other interested, Nancy was able to solve the issue by doing 3 things:

1) Copying the utilities folder to the current directory In addition to copying its content in the same folder.

2) Including the SD.h in addition to the SD.cpp

3) Transfering the whole directory to a file path that has no spaces.

Note that #3 is always necessary to make things work due to the use of GCC. In this case i think #1 (and perhaps also #2) made the trick.

Comment only
26 Nov 2014 Giampiero Campa

Giampiero Campa (view profile)

i don't know how to make it work with external mode and i am sure is not easily doable with this method. It might be not even feasible. I'll let you know more if i find anything.

Also, if i don't know what error it is that you are finding, it's hard for me to have a clue :)

Comment only
24 Nov 2014 Minho

Minho (view profile)

I have question. If i want sfcn_encoder bolck use external mode. How can I do?
I do wrapper.c -> wrapper.cpp and add extern "C".
But It has error.

19 Nov 2014 Idrees Emhemed  
14 Nov 2014 Daniel langstaff

I am having the same issue as Nancy.

Comment only
15 Oct 2014 Nancy

Nancy (view profile)

I'm trying to use the SD card library , I get this error when I build the model;

The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The build failed with the following message: make: *** No rule to make target `../../../../../../../../../../../../MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/HardwareSerial.h', needed by `HardwareSerial.o'. Stop.

Any help will be appreciated.


Comment only
16 Aug 2014 zhubo

zhubo (view profile)


Comment only
25 Jun 2014 MAMADOU

Hello i started with arduino (uno) and matlab by modeling a blinking model. But i have a problem to run the model with my arduino uno card. I go to the tools menu for 1st time for to Prepare to Run the model and at the 2nd time, i don't see the option : Run. That is my problem. Is someone can help me. Thanks

Comment only
11 Jun 2014 German

German (view profile)

Nice work, very helpful

18 Apr 2014 JimC

JimC (view profile)

This is a great help to get started. I've been able to tweak the encoder block for speeds.
I can't seem to create a driver block that uses the serial comms commands though. I tried including the HardwareSerial.h and .cpp files in the library pane and ran renc2cpp.
Any trick needed?

14 Apr 2014 EDUARDO  
09 Apr 2014 Tomas

Tomas (view profile)

Interrupt block and some more is now here:

Comment only
04 Apr 2014 phil

phil (view profile)

Has anybody been able to make an interrupt block?

Comment only
23 Mar 2014 uavc

uavc (view profile)

In case anyone wanted to compare the Output Driver S-Function Block to Arduino code, here is the arduino code:

#include <Arduino.h>

int xD[0];
int pin[] = {12};
int in[0];

void setup()
if (xD[0]!=1) {

/* don't do anything for MEX-file generation */

/* initialization done */

void loop()
/* wait until after initialization is done */
if (xD[0]==1) {

/* don't do anything for mex file generation */

Comment only
19 Mar 2014 Mehmet

Mehmet (view profile)


I wonder,how overruns on Arduino Hardware affect software . Because all example drivers give ovverruns error without input and output drivers.


Comment only
14 Feb 2014 Neil

Neil (view profile)

Hello thank you for the reply. I have finally got it working with much success. I'm still not sure where the "inlined" error came from but now it's gone.

I have a question for you. I'm trying to use global variables throughout the simulink model. It works if I call the variable within the same s-function as your guide said. However, if I call that variable in another S-function it gives me an error " error: <variable> undeclared (first use in this function)" pertaining to the wrapper file. I find this strange since all my calls to functions within the "#includes" headers work.

For example, my includes section looks as shown below:

#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
int uart0_filestream = -1;

# endif

I can call all functions within the first 3 headers, however, if I call uart0_filestream in another block I get the error.

Comment only
07 Feb 2014 Neil

Neil (view profile)

07 Feb 2014 Neil

Neil (view profile)

I have not been able to get this to work at all. I'm using MATLAB 2013a Student version. I generate C code using the steps provided. However, when I try to download it to the Arduino, it gives me an error that the function is not in-lined and therefore cannot be downloaded to the target. It tells me to go into the configurations->Simulink Coder and turn in-lining off but since I'm using the student version I don't see this option. Has anyone gotten this error before? I see no where in the documentation

10 Dec 2013 phil

phil (view profile)

30 Nov 2013 phil

phil (view profile)

has anybody been able to get the Arduino Ethernet library to work>? i keep getting errors which seems to be related to the IP adress class

C:/MATLAB/Targets/R2012b/arduino-1.0/hardware/arduino/cores/arduino/IPAddress.h:33: undefined reference to `vtable for IPAddress'

the code in this file:
class IPAddress : public Printable {
uint8_t _address[4]; // IPv4 address
// Access the raw byte array containing the address. Because this returns a pointer
// to the internal structure rather than a copy of the address this function should only
// be used when you know that the usage of the returned uint8_t* will be transient and not
// stored.
uint8_t* raw_address() { return _address; };

i havent even called any functions. at this point i am simply trying to include the ethernet library.

Comment only
25 Nov 2013 Giampiero Campa

Giampiero Campa (view profile)

IMPORTANT UPDATE: For MATLAB 2013b you will need to apply a fix for the S-Function builder (otherwise an incorrect argument list will be generated for a block that has no inputs).

Go to the following page:
scroll down to the bottom, and follow the instructions therein (it basically
comes down to saving the zip file, opening winzip as administrator, and
unzipping the file in the MATLAB folder (e.g. C:\Program Files\MATLAB\2013b).

Also note that another issue in MATLAB 2013b causes high memory usage on the
Arduino side, and thus prevents the upload of models that have many blocks
and/or high memory requirements. This might sometimes be a problem for boards
with smaller memory footprint like the Uno or Nano.

Comment only
24 Nov 2013 uavc

uavc (view profile)

23 Nov 2013 uavc

uavc (view profile)

found the problem. the libraries I had to include in the simulink s-function builder was

# include <Arduino.h>
# endif

in that order. I accidentally put the second line first as I thought these were just regular includes, without recognizing that the include was running an if loop (ifndef.... end if) to check:


The #ifndef operator checks whether something has not been defined using the #define keyword. It must be followed by#endif.

Problem solved. XD

Comment only
22 Nov 2013 uavc

uavc (view profile)


I'm trying to build the output block according to the tutorial. I'm sure this is a basic question but I couldn't quite build the S-function.


c:\docs\avr/io.h(330) : fatal error C1021: invalid preprocessor command 'warning'

C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Compile of 'sfcn_exout_slsp_wrapper.c' failed.


I had earlier problems that the s-function builder wasn't compiling because it couldn't find Arduino.h, inttypes.h avr/io.h, avr/pgmspace.h, avr/sfr_defs

Arduino.h is the only .h file that is called directly from the s-function builder library so I guess the other files are being called by Arduino.h etc. I included the entire path of the Arduino library on the stock c:\program files(x86) directory but it didn't compile still. Hence, I just copied the whole folder into my working directory, still wouldn't work. What made it work was that I had to copy every single .h file (mentioned above) into the working directory (the answer to MATLAB command "pwd") before it would compile and then it led to this error above. I think it's an include error, so how do I ask the s-function builder to look everywhere within my working directory (which is especially important for the avr/xxx.h files.

any idea how to solve it? thanks!

Comment only
17 Oct 2013 Juan Jimenez

Great introduction to learn how to build custom driver blocks. Congrats!

19 Sep 2013 Joshua Hurst

Hi Christian,

If you were looking specifically for I2C, MPU6050, or other I2C devices/hardware I posted a simple C-based I2C solution using WirnigPiI2C and you can find this here:

Let me know if this helps you!


Comment only
21 Aug 2013 MathWorks Maker Team  
11 Jul 2013 Dan

Dan (view profile)

amzaing one that works. Thanks.

Comment only
05 Jul 2013 Christian

I have the same problem as Glen but with Arduino Mega and Support Package for Arduino. When i run the Target Hardware it does not include the wrapper .cpp in the _rtt folder, are there any solutions already?

thank you

Comment only
05 Jul 2013 Christian  
28 Jun 2013 Lincoln Nxumalo  
17 Jun 2013 Giampiero Campa

Giampiero Campa (view profile)

send me the files with the exact procedure that you are following and the error you are getting, i'll see if i can do anything.

Comment only
16 Jun 2013 Glen

Glen (view profile)


I have tried a number of different things to try and get the wrapper.cpp file included into the source_files listed in the .mk (make) file, rather than it being skipped. This has included editing the rtwmakecfg and trying to find the toolchain that is used to compile the .mk file. Editing the rtwmakecfg was unsuccessful. I did edit a Linux tool chain located in the "coder" directory. But I don't think it is the one that is used. The toolchain that is listed in the .mk file I cannot find - gmake, LinuxRemoteBuild.

Comment only
09 Jun 2013 Glen

Glen (view profile)


I have been trying again to get the MPU6050/HMC5883L model to build on the RPi. In the make file (.mk) which is included in the (_rtt) folder, when I rename the _wrapper.cpp file it is listed as a "SKIPPED_FILE". When I do not rename the wrapper.c is included in the "SOURCE_FILES". I have tried to get it included by editing the SFB.mat file but still no luck.

Comment only
04 Jun 2013 Joshua Hurst

Hi Glen,

I have a student working on the mpu6050 code for RasPi right now - getting it work in C and Python first. Then I will be porting it to Simulink most likely next week.

Feel free to send me an email directly and I can try to look at your files when I start start porting my students code:

In general for the Rpi you have to make sure the c-code compiles and on its own. If you look at the RPi examples I posted you have to make sure the #includes reference the local directory structure on the RPi - not your box. Just look at the Quadrature Encoder example for the RPi and you will see I had use: #include </home/pi/wiringPi/wiringPi/wiringPiI2C.h>. Which is where the files are on the RPi, not my actual computer. And don't forget to include the actual C files as well:
#include </home/pi/wiringPi/wiringPi/wiringPi.h>
#include </home/pi/wiringPi/wiringPi/wiringPi.c>

Let me know if this helps!


Comment only
03 Jun 2013 Glen

Glen (view profile)

Hi Giampiero,

Many thanks for your reply. I should explain more. I am trying to incorporate the libraries for the MPU6050 and HMC5883L. The code I have previously compiled on the PI. I used the Arduino MPU6050 S-Function Builder Example from Joshua Hurst as a Starting point and replaced the Arduino Libraries with the Libraries I have for the PI - including the I2Cdev. The S-function builds successfully. I then change the _wrapper from .c to .cpp and apply the extern "C" changes. However, when I run on target hardware - using the MATLAB Pi Support Package - it does not include the wrapper .cpp or any .cpp file in the folder (_rtt) it downloads to the PI to compile and run. If I leave the wrapper.c unchanged it does get incorporated into the _rtt folder but then I have unreferenced .cpp files not included.

I can send you my work so far if it helps.

Many thanks for your support.

Best Wishes

Comment only
02 Jun 2013 MathWorks Classroom Resources Team

Hi Glen, there are several RasPi drivers, i believe with external libraries too, linked in the Acknowledgement section of this page.

I (Giampiero) would suggest trying them first to see if you can make them work, if so, start from them to see if you can build your driver. That being said i'll investigate further this case to see if anyone has any idea.

Comment only
02 Jun 2013 Glen

Glen (view profile)

Hi Giampiero,

I am trying build a model incorporating an S-Function Builder for my RaspPi. Because it includes C++ files I change the wrapper file extension to .cpp and at extern "C" infront of the Outputs and Update wrapper. However, when I run the model a further file is built with the extension _rtt and it does not include my wrapper file and other .cpp files within the file that gets downloaded to the RaspPi, hence I get undefined references.

I have tried a number of things but starting to go around in circles.

Any help would be appreciated.

Best Wishes

Comment only
30 May 2013 Giampiero Campa

Giampiero Campa (view profile)

you need to scroll up to see the upper part of the text. Maximizing the window might also help a little.

Comment only
30 May 2013 Mark

Mark (view profile)

Within the "afmotor_slsp" model, there is a block containing instructions titled "Double Click for Explanations". When I double-click, the instructions start with step 3...what are the first two steps???

Comment only
20 May 2013 Durga Samannth

Thank you for your step by step explanation. I have tried to create my own servo and I am getting the following error when I have changed the name of the wrapper file generated to .cpp from .c

The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The specified file "servornd_wrapper.c" does not exist on the IDE and MATLAB paths.

Could you help me resolve this error.
Thanks in advance.

Comment only
06 May 2013 Ben Gurion University

helped me a lot

thank you for that tutorial

29 Apr 2013 Giampiero Campa

Giampiero Campa (view profile)

I'm glad that's working, Nathan.
Thanks Phil, that's great!

Comment only
29 Apr 2013 phil

phil (view profile)

guys i have put together a little macro that will automatically make the necessary modification to the wrapper.c file
I found myself having to redo this for every rebuild of the S function and it was getting annoying.
The exe will add the extern "C" in front of the voids save/close and rename it to .cpp
gl - phil

Comment only
29 Apr 2013 Nathan Crosty

@Classroom Resources,
That was the trick. I can now use any library I wish in the S-Function builder. Thank you very much

Comment only
29 Apr 2013 Nathan Crosty

I added this line to my Library/Object/Source files pane in the s-function builder. It seems to take care of the path issue.

INC_PATH C:\arduino-1.0.3\libraries\Time

Comment only
29 Apr 2013 MathWorks Classroom Resources Team

Nathan, if you include a .cpp file then you should rename the generated wrapper function from .c to .cpp, and also open it and write: ' extern "C" ' before the two function calls.

Please have a look at page 20 of the guide, which explains how to do this, and let me know if it works.

Comment only
28 Apr 2013 phil

phil (view profile)

@ Nathan...
did you put the included files in the current matlab folder?

Comment only
28 Apr 2013 Nathan Crosty

I tried to follow your example and it worked great for interfaces that are in Arduino.h such as digital and analog IO. I ran into problems when trying to include other Arduino Libraries.

I noticed that you had included "AFMotor.cpp" and "AFMotor.h" in your examples, which I guess is similar what I am attempting with "DS1307RTC.h" and "DS1307RTC.cpp" which are libraries for keeping time.

I can build the sfunction with the sfunction builder when it is structured like you have it in your examples. When I go to build the applicaiton, however, I run into an issue that seems to be related to cpp code when the compiler is expecting c code. I am using the Arduino integration package found here

The compiler message I get when it attempts to build the header file with a class definition is this:

C:/ARDUIN~1.3/hardware/tools/avr/bin//avr-gcc -c -mmcu=atmega2560 -I. -DF_CPU=16000000 -Os -Wall -Wstrict-prototypes -std=gnu99 -I. -I.. -IC:/PROGRA~1/MATLAB/R2011a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2011a/extern/include -IC:/PROGRA~1/MATLAB/R2011a/simulink/include -IC:/PROGRA~1/MATLAB/R2011a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2011a/rtw/c/src/ext_mode/common -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/Drivers/GH_TopLevel_Test_arduino -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/Drivers -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/Custom_Includes -Ic:/OU_SYSTEMS_ENG/GH/gh-dev/Simulink_Models/ArduinoML/blocks -IC:/arduino-1.0.3/hardware/arduino/variants/mega2560 -IC:/arduino-1.0.3/hardware/arduino/cores/arduino -IC:/arduino-1.0.3/libraries/Time -IC:/arduino-1.0.3/libraries/DS1307RTC -Ireferenced_model_includes -I../slprj/arduino/_sharedutils -IC:/ARDUIN~1.3/hardware/arduino/cores/arduino ../sfun_systime_get_wrapper.c -o sfun_systime_get_wrapper.o
In file included from ../sfun_systime_get_wrapper.c:39:
C:/arduino-1.0.3/libraries/DS1307RTC/DS1307RTC.h:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'DS1307RTC'
../sfun_systime_get_wrapper.c:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sysTime'

Please let me know if you have any thoughts. I am wondering if this is still an issue with the newer Arduino support in later versions of ML/Simulink.

Comment only
20 Apr 2013 Joshua Hurst

Thanks Giampy!

With your driver guide we were able to make driver blocks for:

- MPU6050 3 axis accelerometer/gyroscope
- HC-SR04 ultrasonic range/distance sensor
- L3GD20 3 axis gyroscope

And with all this we made a miniature Segway! You can find all the drivers and supporting libraries for the listed sensors here:

Thanks again!

Comment only
20 Apr 2013 Joshua Hurst  
20 Apr 2013 phil

phil (view profile)

Thank you! It compiles and runs on the Arduino Mega. The screen however does not show characters properly and its all scrambled. I am not sure what is happening... :(
When using the arduino IDE everything works fine. Here is a zip with some screenshots. I would appreciate if you could perhaps have a look and see if i am missing something...
thanks again - phil (

Comment only
19 Apr 2013 Giampiero Campa

Giampiero Campa (view profile)

Phil, i think the variable "lcd" needs to be defined as a global. Try to define it in the libraries pane, after all the includes, see page 16 of the guide.

Comment only
19 Apr 2013 phil

phil (view profile)

./io_wrappers.cpp: In function 'void Serial_read(int, int, uint8_t*, int*)':
./io_wrappers.cpp:40: warning: 'libFcnOutput' may be used uninitialized in this function
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./DDvers1_wrapper.cpp: In function 'void DDvers1_Outputs_wrapper(const boolean_T*, const real_T*, const real_T*, int_T)':
./DDvers1_wrapper.cpp:73: error: 'lcd' was not declared in this scope
./DDvers1_wrapper.cpp:77: error: 'lcd' was not declared in this scope
In file included from ./ert_main.c:18:
C:/MATLAB/Targets/R2012b/arduino-1.0/hardware/arduino/cores/arduino/Arduino.h:24:1: warning: "true" redefined
In file included from ./DisplayDriverv1.h:23,
from ./ert_main.c:17:
./rtwtypes.h:158:1: warning: this is the location of the previous definition
In file included from ./ert_main.c:18:
C:/MATLAB/Targets/R2012b/arduino-1.0/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "false" redefined
In file included from ./DisplayDriverv1.h:23,
from ./ert_main.c:17:
./rtwtypes.h:154:1: warning: this is the location of the previous definition

Comment only
20 Mar 2013 Sebastian D'Amico  
19 Mar 2013 Roni Peer

Great walk through for newbies!

06 Mar 2013 phil

phil (view profile)

just what i was looking for!
it would be great if you guys could share your driver blocks!

i am currently writing one for an LCD display...quite a challenge.

28 Feb 2013 Giampiero Campa

Giampiero Campa (view profile)

NOTE: If you are working with external libraries and you get an “undefined reference” error that means that your code references objects defined elsewhere (in other files) and, at linking time, the linker cannot find where they are.

In this case you need to make sure that all the .c and .cpp files of the library you are using are in the current MATLAB folder and that they are all included in the "Includes" field of the "Libraries" pane of the S-Function Builder (include the .c and .cpp files directly not the .h files).

Also, make sure that you read the last section (i.e. the last 2 pages) of the driver guide, entitled: "Working with external libraries".

Comment only
07 Feb 2013 Arkadi

Arkadi (view profile)

Great tutorial, Thank you.

21 Jan 2013 Judicael Aubry

This is exactly what I was searching for. A Step-by-Step guide to develop new and custom Simulink blocks for Arduino targets.

Thank you !

09 Jan 2013 Tucker McClure

Tucker McClure (view profile)

This is a good introduction to making all the device code I need inside blocks so that I can just drag and drop blocks and get all the processor-specific code. Say I need to add a new encoder. Copy and paste the block and change the pin numbers. Done. Thanks, Giampiero!

02 Jan 2013

The PDF document was slightly refined.

23 Apr 2013

Fixed a few typos and added a troubleshoot page at the end of the guide.

07 May 2013

Fixed small typos, updated copyright, and added troubleshooting section to the guide.

06 Dec 2013

Included drivers for AF Motor Shield V2, and Embedded MATLAB-based examples.

09 May 2014

Documented masking S-Function Builder blocks and the MATLAB Function approach.

Also removed the motor shields -related files since updated versions can be found in the "motor shields" file exchange entry.

Contact us