Go Down

Topic: Matlab Simulink interface with Arduino (Read 4461 times) previous topic - next topic

zenilton

Someone who has experience in SIMULINK could help me?? :smiley-mr-green: :smiley-mr-green:

I'm trying to connect pin analoginput (A1) to read data from a current sensor for controlling an inverter.
I setup the recognition of the Arduino board Uno for Matlab Simulink and now I can not read the analog input value.

if you can give me a hint on the configuration of the inputs would be a huge help for my final project.

Thank you!! :smiley-mr-green: :smiley-mr-green:

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

zenilton

Hi Robtillaart!!
thank you for the reply!

The question is that I am trying to upload the simulink block code to the arduino.
It is possible once you can convert any simulink code to C code and then upload it to the board trough the ARDUINO-TARGET.
Do you want to see the simulink file? :smiley-mr-green:

robtillaart

Quote
The question is that I am trying to upload the simulink block code to the arduino.

That is no question thats an activity.

Quote
It is possible once you can convert any simulink code to C code and then upload it to the board trough the ARDUINO-TARGET.

Thats a question ;)
THe Arduino is limited in memory so not all simulink code can be uploaded just because of size. FUrthermore I assume there exist Simulink functions that have no equivalent in Arduino - C.

Quote
Do you want to see the simulink file?

Yes, and if possible also the generated Arduino code.

Please use the # button for code , looks so much better ;)

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

zenilton

I am trying to upload de demo_arduino_blink to the board and have the following error msg:
...
The call to arduino_make_rtw_hook, during the after_make hook generated the following error:
Download failed. Check your serial connection and and run the command arduino.Prefs.getMcu to check you have specified the correct MCU.
...
I am using an arduino uno with atmega328p-pu and I set it on matlab by the following command: >>arduino.Prefs.setMcu('atmega328p-pu')

By the way, what I inteded convert from simulink to arduino I think is very large for the 32 kB of flash memory of the chip.

thank you!!!

Go Up