readRegister function undefined when used in GUIDE
Mostra commenti meno recenti
Hi All,
I'm a hobbyist attempting to create a basic gui that will sample data from an I2C based current sensor that is attached to my raspberry pi. I have written and successfully tested a class that correctly samples this data when run via a standard Matlab Script. However, when I attempt to code this into a gui, I get the following error message when I try to call the readRegister function:
Undefined function 'readRegister' for input arguments of type 'double'.
From doing research, I believe that matlab somehow cannot locate the readRegister function when called from the gui. This confuses me since the function easily runs if I simply call it from the command line, for example this works outside of the gui:
config_values = readRegister(sensor.i2cLink,register_address,'uint8',2);
where sensor.i2cLink and register_address are specifically defined (and verified to exist when debugging).
Does anyone know of a work around to this?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Run on Target Hardware in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!