Hello, I tried to build the slx file in simulink but the error in s -function'Arduino_ADLX345_driver_v1/S-Function Builder1':S-function'ADLX345_driver_v1' does not exist.
Could you please help me? Thanks,
First of all, thanks for this block! Once I get it to work it'll save me a ton of time.
At risk of asking a programming question, I'm having a bit of trouble implementing the block in conjunction with a motor encoder (Vex 269: http://www.vexforum.com/wiki/index.php/Intergrated_Motor_Encoders). I believe the problem is that the terminator address of the encoder (0x4C) is different from the one that simulink is trying to access, but I am having trouble finding where this address is specified in the provided source codes. The warning I get is:
Warning: Unsuccessful read: A timeout occurred before the Terminator was reached.
I can read the encoders with the I2CEncoder library implemented through the arduino IDE, so I am certain that the hardware is set up properly. The rest of the arduinoIO package works properly as well. Any insight?
You're welcome Addie. I would say yes, it can be edited for Mega, but I imagine that to be a cumbersome job which includes augmenting the adiosrv.pde file, arduino.m file and the block files from Atmega328 to Atmega1280. I think it will be a better idea that you advise the developing team "MathWorks Classroom Resources Team" to release a separate package for Mega.
Thanks Zhuo. Another one question, do Arduino IO block able to be edited for Arduino Mega used. I'm currently searching for solution to expand the number of port on each block such Digital Writer and A/D inputs in order to make it suitable for Arduino Mega (available for all ports). Currently the block for Arduino IO package is limited for Arduino Mega
Hi Addie, for now, this block cannot work with Arduino Target package because it is of different mechanism. The Target package supports realtime target while the ArduinoIO is not "real" real time, it's a host-target structure. Sorry for the inconvenience.