Rank: 22 based on 1161 downloads (last 30 days) and 32 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.

Professional Interests:
Nonlinear Control, Systems Modeling and Simulation, Robotics

 

Watch this Author's files

 

Files Posted by Giampiero View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Apr 2013 Screenshot proesmans Optical flow using the Proesmans method Author: Giampiero Campa image processing, optical flow, mex file 12 0
02 Jan 2013 Screenshot Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa arduino, stepper motor, driver, encoder, dc motor, device 138 17
  • 5.0
5.0 | 7 ratings
07 May 2011 Screenshot Primes Simulink system that generates primes Author: Giampiero Campa mathematics, simulink 4 0
20 Oct 2010 Screenshot quadforms Convert quadratics from Homogeneous to Center form and back. Author: Giampiero Campa mathematics, geometry, algebra, quadratic 1 0
14 Sep 2010 Screenshot Arduino IO package: Slides and Examples Slides for the webinar: "Learning Basic Mechatronics Concepts Using the Arduino Board and MATLAB". Author: Giampiero Campa analog, arduino, motor, mechatronics, data export, measurements 621 35
  • 5.0
5.0 | 6 ratings
Comments and Ratings by Giampiero View all
Updated File Comments Rating
29 Apr 2013 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa

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

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

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.

19 Mar 2013 Arduino IO package: Slides and Examples Slides for the webinar: "Learning Basic Mechatronics Concepts Using the Arduino Board and MATLAB". Author: Giampiero Campa

Patricia what did you put instead of that "12" in the fourth comment below ? You mentioned you tried higher values but perhaps it wasn't big enough.

I would suggest, with a testing program running on the Arduino which sends data continuously, to see if you can create a connection with the serial command from MATLAB. Try sending and receiving data using that command and possibly the serial block of the instrument control toolbox.

If all fails, another option could be trying to use the Simulink Support Package instead, which might even be more appropriate in your case since it does not require a MATLAB connection to work.

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

Patricia, i can't think of anything. Other people were successful in using the BTShield, and, i think, the Xbee too. Does the same hardware setup work when using the IDE directly without matlab ? Can you establish a connection with a terminal program like hyperterminal ?
Let me know if you find anything.

Giampiero

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

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".

Comments and Ratings on Giampiero's Files View all
Updated File Comment by Comments Rating
01 May 2013 Arduino IO package: Slides and Examples Slides for the webinar: "Learning Basic Mechatronics Concepts Using the Arduino Board and MATLAB". Author: Giampiero Campa ALVAREZ, EDWIN

greetings.
First, thank you very much to you, Giampiero Campa =).
and i am attempting to control a robot with Xbee modules. and for the wireless communication we are using 2 Xbee pro series 1. They have been configured and the adiosrv.pde file has been uploaded into the arduino. I have been using your code for a=arduino('com5') in Matlab and I am getting this error:

Warning: Unsuccessful read: A timeout occurred before the Terminator was reached.
Error using arduino (line 101)
Connection unsuccessful, please make sure that the Arduino is powered on, running
either srv.pde, adiosrv.pde or mororsrv.pde, and that the board is connected to
the indicated serial port. You might also try to unplug and re-plug the USB cable
before attempting a reconnection.

Sometimes the error occurs at line 115, but I haven't done anything different to my procedure when I get this error.

ok, i have a solution for this,

is the xbee have a speed of 9600 bps by default. file has a default adiosrv 115200 and arduino.m file also. then I put them all at 9600 bps and it worked =)
is wonderful to make this interaction between matlab and arduino xbee modules through. again thank you very much Giampiero Campa

29 Apr 2013 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa Campa, Giampiero

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

29 Apr 2013 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa phil

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

https://dl.dropboxusercontent.com/u/64527727/externCautoit.rar

29 Apr 2013 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa Crosty, Nathan

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

29 Apr 2013 Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa Crosty, Nathan

@phil,
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

Top Tags Applied by Giampiero
simulink, aerospace, flight, aerodef, aerodynamics
Files Tagged by Giampiero View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Apr 2013 Screenshot proesmans Optical flow using the Proesmans method Author: Giampiero Campa image processing, optical flow, mex file 12 0
02 Jan 2013 Screenshot Device Drivers Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples Author: Giampiero Campa arduino, stepper motor, driver, encoder, dc motor, device 138 17
  • 5.0
5.0 | 7 ratings
07 May 2011 Screenshot Primes Simulink system that generates primes Author: Giampiero Campa mathematics, simulink 4 0
20 Oct 2010 Screenshot quadforms Convert quadratics from Homogeneous to Center form and back. Author: Giampiero Campa mathematics, geometry, algebra, quadratic 1 0
14 Sep 2010 Screenshot Arduino IO package: Slides and Examples Slides for the webinar: "Learning Basic Mechatronics Concepts Using the Arduino Board and MATLAB". Author: Giampiero Campa analog, arduino, motor, mechatronics, data export, measurements 621 35
  • 5.0
5.0 | 6 ratings

Contact us