With Arduino 1.0 there came some changes in naming and layout of the includes (see http://arduino.cc/en/Main/ReleaseNotes for details).
I made the following changes to the current version of the arduino target:
1. Edit boards.txt and delete lines 145 through 181 (as told in a previous post)
2. Substitute every occurence of "WProgram.h" with "Arduino.h".
3. Add an additonal include path in rtwmkcfg.m in order to find the "pins_arduino.h" header file (moved to the new variants dir).
4. Commented out line 33 in arduino_smain.tlc because __cxa_pure_virtual is now defined in the Arduino 1.0 libs (see new.h).
These changes allowed me to compile the blink demo without errors.
I needed two changes to get it working in my environment (Win 7, Matlab 2011b, Arduino-0023 Software, Arduino Uno):
- In Prefs.m I changed in the function searchForComPort the string of the device name to '\\Device\\USBSER000'
(Have a look in your registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM to identify the correct string)
- In runAvrDude.m I removed the baudrate option from the avrdude call. (Before it was set to 57600 and it doesn't work)
how do i use this package? i can't get the exact library for arduino uno. i need step by step installation procedure, please. & one more thing, targetinstaller do not work in my matlab. i'm using 2010 version. but since the 2012 version user also obtain same problem with me. why?
I've gone ahead and created a tutorial for integrating the new Arduino 1.0.3 libraries in with this support package. There are some directions in this post that I have borrowed from to compose it, but I thought it would be useful to keep everything in once place.
I have a problem using the arduino target.
I am trying to send data via serial communication from a model running on arduino to a model running in my computer.
The problem is that I get wrong values when the data I am about to send are negative (i.e. the transmission is fine when I am sending values 0 or greater but wrong when they are below zero (instead of -4 I receive 252 etc)).
I also tried to send negative values through the example that you have (demo_arduino_serial_communication and demo_arduino_serial_communication_host), by changing the Analog input block with a constant block and once again it works fine when using values zero or greater but I am getting the following error message when I am trying to send negative values through the serial communication.
"Parameter overflow occurred for 'Value'. The parameter's value is outside the range that the run-time data type can represent. The specified value was saturated to the closest representable value. You can control this diagnostic on the Diagnostics pane of the Configuration Parameters dialog."
I thought to try and change something on the Diagnostics pane, but I thought that it would be wiser to ask someone more experienced first.
What do you think?
I have an arduino UNO and MATLAB R2011b.
Thanks in advance,
a desperate student