Arduino mega 2560
Show older comments
i have a problem to deal with arduino mega with simulink the problem is the digital block for (read or write) containing numbers from 2 : 19
and the arduino mega have 69 digital I/O
knowing that i modified the serv.pde file as mentioned in the read me file with the package
Can Any one help me ??
thanks for all
1 Comment
Addie
on 24 Jan 2014
I have a problem on selecting pins for PWM that supported by ArduinoMega such as pin 2,4 etc. The warning prompt appeared when I selected it. Its mean the block is not supported for ArduinoMega which contras with the instruction available in model mask.
Please help.
Addie
Accepted Answer
More Answers (4)
Rolfe Dlugy-Hegwer
on 15 Jun 2012
1 vote
Hi Mohammed.I understand now. In your model, select Tools > Run on Target Hardware > Options. This action opens Configuration Parameters dialog. Wait a moment for the Run on Target Hardware pane to appear. Change Target hardware setting from Arduino Uno to Arduino Mega 2560. Save and close Configuration Parameters. Now you can enter higher values for the pin numbers. HTH, Rolfe
Rolfe Dlugy-Hegwer
on 20 Jun 2012
1 vote
I don't have any information on how to do this R2011a. The feature I described became available in Simulink R2012a. If you get access to R2012a, enter targetinstaller in the MATLAB Command Window. This action opens the Target Installer and provides instructions for installing support for Arduino.
3 Comments
Mohammed
on 22 Jun 2012
Rolfe Dlugy-Hegwer
on 22 Jun 2012
I'm looking into this and will get back to you soon.
Rolfe Dlugy-Hegwer
on 22 Jun 2012
Solution #1: In Target Installer, on the "Install or update target" screen, select "Internet (recommended)". Do not select "Folder".
Rolfe Dlugy-Hegwer
on 22 Jun 2012
1 vote
Easy Solution #1: In Target Installer, on the Install or update target screen, select Internet (recommended). Do not select Folder.
Solution #2, (For host computers that do not permit direct downloads from the Internet):
- On a private machine, go to http://www.mathworks.com/matlabcentral/fileexchange/35641-simulink-support-package-for-arduino-mega-hardware, click the Download All button.
- Transfer the download file, rtt_arduinomega2560_r2012a_v1_0.zip, to a USB memory stick.
- Connect the USB stick to the host computer that is running MATLAB.
- Determine the drive letter of the USB stick and the folder path of the download file, rtt_arduinomega2560_r2012a_v1_0.zip.
- Run Target Installer.
- On the "Install or update target" screen, select "Folder" and enter the folder path the download file, rtt_arduinomega2560_r2012a_v1_0.zip
- Continue, following the instructions.
4 Comments
Mohammed
on 22 Jun 2012
Rolfe Dlugy-Hegwer
on 22 Jun 2012
Hi Mohammed, Did you try Solution #1 and #2? Are you doing anything to change the zip file or extracting its contents? Which operating system are you using?
Rolfe Dlugy-Hegwer
on 22 Jun 2012
I'll make a short video so you can see how I do it.
Jon Zeosky
on 31 Aug 2018
Please note that as of September 2018, Solution #2 will no longer be viable, as Simulink Arduino Support will be discontinued for R2012a and R2012b.
Please see the following Answers Post for more information:
Rolfe Dlugy-Hegwer
on 22 Jun 2012
0 votes
3 Comments
Mohammed
on 22 Jun 2012
Rolfe Dlugy-Hegwer
on 25 Jun 2012
Enter arduinolib on the MATLAB command line to open the block library for Arduino. Replace the Digital Read and Digital Write blocks, and any other similar blocks, with the ones from this library.
Can you point me to the original source for your blocks? I'd like to see the readme file instructions regarding the serv.pde file.
Mohammed
on 5 Jul 2012
Categories
Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!