Arduino mega i need help
Moderators: adafruit_support_bill, adafruit

Arduino mega i need help

by king_king on Fri Mar 30, 2012 5:59 am

i'm new user of mega arduino R2 i'm trying to interface it with matlab 2011a on win7 32 bit

by using its supporting package for matlab

a=arduino('Com3')

i get error
Warning: Matching failure in format.
??? Error using ==> arduino>arduino.arduino at 116
Unknown Script. Please make sure that either adiosrv.pde or motorsrv.pde are running on the
Arduino


any one can help me to solve this problem

and i need to interface it with simulink


thanks
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am

Re: Arduino mega i need help

by adafruit_support_bill on Fri Mar 30, 2012 6:15 am

Unknown Script. Please make sure that either adiosrv.pde or motorsrv.pde are running on the
Arduino

Have you loaded either of those sketches onto the Mega?
User avatar
adafruit_support_bill
 
Posts: 30824
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino mega i need help

by king_king on Fri Mar 30, 2012 7:18 am

yes i tried to upload both on mega but i always get errors
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am

Re: Arduino mega i need help

by adafruit_support_bill on Fri Mar 30, 2012 7:25 am

yes i tried to upload both on mega but i always get errors

Errors in the upload? Or the Matlab error you posted before?
User avatar
adafruit_support_bill
 
Posts: 30824
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino mega i need help

by king_king on Fri Mar 30, 2012 7:33 am

error in upload
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am

Re: Arduino mega i need help

by adafruit_support_bill on Fri Mar 30, 2012 7:53 am

error in upload

What error in upload?
We can't help you if you don't provide us with relevant information.
Post the complete error message you see when attempting to upload.
User avatar
adafruit_support_bill
 
Posts: 30824
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino mega i need help

by king_king on Fri Mar 30, 2012 8:00 am

when i trying to upload the file named motorsrv.pde to the mega i get these error messages
are there is any changes i should to do in this file ??

sketch_mar30a.cpp:53:21: error: AFMotor.h: No such file or directory
sketch_mar30a:65: error: 'AF_Stepper' does not name a type
sketch_mar30a:66: error: 'AF_Stepper' does not name a type
sketch_mar30a:67: error: 'AF_DCMotor' does not name a type
sketch_mar30a:68: error: 'AF_DCMotor' does not name a type
sketch_mar30a:69: error: 'AF_DCMotor' does not name a type
sketch_mar30a:70: error: 'AF_DCMotor' does not name a type
sketch_mar30a.cpp: In function 'void loop()':
sketch_mar30a:378: error: 'dcm1' was not declared in this scope
sketch_mar30a:379: error: 'dcm2' was not declared in this scope
sketch_mar30a:380: error: 'dcm3' was not declared in this scope
sketch_mar30a:381: error: 'dcm4' was not declared in this scope
sketch_mar30a:405: error: 'dcm1' was not declared in this scope
sketch_mar30a:405: error: 'FORWARD' was not declared in this scope
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am

Re: Arduino mega i need help

by adafruit_support_bill on Fri Mar 30, 2012 8:08 am

You need to install the AF_Motor library.

The library is here: https://github.com/adafruit/Adafruit-Motor-Shield-library
Installation instructions are here: http://www.ladyada.net/library/arduino/libraries.html
User avatar
adafruit_support_bill
 
Posts: 30824
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino mega i need help

by king_king on Fri Mar 30, 2012 9:35 am

when i trying to upload AFMotor.h to the mega


i get this error

error compiling

core.a(main.cpp.o): In function `main':
D:\Faculty Books\FINAL PROJECT\arduino-mega2560\New folder\arduino-1.0\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to `setup'
D:\Faculty Books\FINAL PROJECT\arduino-mega2560\New folder\arduino-1.0\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop'
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am

Re: Arduino mega i need help

by adafruit_support_bill on Fri Mar 30, 2012 9:37 am

when i trying to upload AFMotor.h to the mega

You don't need to upload the library to the MEGA. You need to install it on your PC as described in the link I posted previously.
User avatar
adafruit_support_bill
 
Posts: 30824
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino mega i need help

by king_king on Fri Mar 30, 2012 10:16 am

i got the same error in matlab after installed the new library



a=arduino('Com3')
Attempting connection ........
Warning: Matching failure in format.
??? Error using ==> arduino>arduino.arduino at 116
Unknown Script. Please make sure that either adiosrv.pde or motorsrv.pde are running on the
Arduino
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am

Re: Arduino mega i need help

by adafruit_support_bill on Fri Mar 30, 2012 10:33 am

Were you able to upload motorsrv.pde without any errors?
User avatar
adafruit_support_bill
 
Posts: 30824
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino mega i need help

by king_king on Fri Mar 30, 2012 10:37 am

yes thank you very much for your help

the problem was solved

but i would to help me to to deal with simulink by the arduino mega
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am

Re: Arduino mega i need help

by adafruit_support_bill on Fri Mar 30, 2012 10:59 am

Sorry, but I am not familiar with the Simulink software.
User avatar
adafruit_support_bill
 
Posts: 30824
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino mega i need help

by king_king on Fri Mar 30, 2012 11:09 am

thank you very much
can you tell me where i can get help for dealing with MEGA arduion with simulink
king_king
 
Posts: 18
Joined: Fri Mar 30, 2012 4:53 am