Rank: 22 based on 1564 downloads (last 30 days) and 34 files submitted
photo

Giampiero Campa

E-mail
Company/University
The Mathworks Inc.
Lat/Long
33.857662, -118.29316

Personal Profile:

I am from Taranto, South East Italy. I received Master (EE) and Ph.D. (Robotics) from the University of Pisa, and I have been with the Flight Control Group, (MAE Dept), at West Virginia University until 2008. I am now finally and proudly working for The MathWorks.


 

Watch this Author's files

 

Files Posted by Giampiero Campa View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
30 May 2014 Screenshot What is the best way to implement my algorithm in Simulink ? Eight ways to implement an Extended Kalman Filter as a Simulink block Author: Giampiero Campa extended kalman filte..., simulink, sfunction, system object, sfunction builder, legacy code tool 50 0
  • 5.0
5.0 | 1 rating
09 May 2014 Screenshot Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa arduino, device, driver, encoder, dc motor, stepper motor 257 53
  • 4.90476
4.9 | 23 ratings
09 Apr 2014 Screenshot Arduino IO package: Slides and Examples Slides for the webinar: "Learning Basic Mechatronics Concepts Using the Arduino Board and MATLAB". Author: Giampiero Campa arduino, mechatronics, class, motor, analog, digital 642 54
  • 5.0
5.0 | 11 ratings
08 Apr 2014 Screenshot Motor Shields Motor Shield Driver Blocks Author: Giampiero Campa arduino, motor shield, driver, servo, stepper 51 0
  • 5.0
5.0 | 1 rating
24 Apr 2013 Screenshot proesmans Optical flow using the Proesmans method Author: Giampiero Campa image processing, optical flow, mex file 15 1
  • 5.0
5.0 | 1 rating
Comments and Ratings by Giampiero Campa View all
Updated File Comments Rating
26 Nov 2014 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa

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.

26 Nov 2014 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa

Minho,
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 :)

15 Aug 2014 Arduino IO package: Slides and Examples Slides for the webinar: "Learning Basic Mechatronics Concepts Using the Arduino Board and MATLAB". Author: Giampiero Campa

Hi Colm, you should probably connect a good external power source to the motor shield.

Anyway, in the version1 of the motor shield library the stepper commands are blocking, so, while you can have 2 stepper connected, you can only operate them one at a time, not both at the same time.

I think (but I am not sure) that the same is true for the version 2 of the board.

Note that instead you can run up to 4 DC motor simultaneously since DC motor commands are not blocking.

25 Nov 2013 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa

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: http://www.mathworks.com/support/bugreports/1006532
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.

17 Jun 2013 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa

Glen,
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.

Comments and Ratings on Giampiero Campa's Files View all
Updated File Comment by Comments Rating
15 Dec 2014 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa amir

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 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa Simon

Hi,

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:

main()
{
}

instead of the common:

setup(){}
loop(){}

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,
Simon

26 Nov 2014 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa Giampiero Campa

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.

26 Nov 2014 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa Giampiero Campa

Minho,
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 :)

24 Nov 2014 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa Minho

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.

Contact us