How do I update the library?

조회 수: 1 (최근 30일)
Mark Oliver
Mark Oliver 2019년 5월 20일
My Arduino is loaded with library "ExampleAddon/HelloWorl". (a=Arduino) I am trying to load "ExampleAddon/HelloWo". (a=Arduino('COM6','Mega2560','Libraries','ExampleAddon/HelloWo')
The old version is (***HelloWorl) and the new version is (***HelloWo).
How do I refresh the library?
A log follows
>> addpath 'C:\Users\CL Plane Guy 3\Documents\MATLAB\Work'
>> clear
>> clear classes
>> rehash toolboxcache
>> lib = listArduinoLibraries()
Warning: Class arduinoio.LibraryBase will be removed. Following Add-On classes need to be updated to work in future release :
Arduino/MKRMotorCarrier. Follow steps mentioned in this Arduino Add-On document to update. Click here to turn off this warning.
Warning: Class arduinoio.AddonBase will be removed. Inherit class arduinoioaddons.arduino.MKRRotaryEncoder from
matlabshared.addon.LibraryBase instead. For more information, see Arduino Add-On document.Click here to turn off this warning.
lib =
10×1 cell array
{'Adafruit/MotorShieldV2' }
{'Arduino/MKRMotorCarrier'}
{'ExampleAddon/HelloWo' }
{'I2C' }
{'MAMGyroFolder/Gyro' }
{'RotaryEncoder' }
{'SPI' }
{'Servo' }
{'ShiftRegister' }
{'Ultrasonic' }
>> lib
lib =
10×1 cell array
{'Adafruit/MotorShieldV2' }
{'Arduino/MKRMotorCarrier'}
{'ExampleAddon/HelloWo' }
{'I2C' }
{'MAMGyroFolder/Gyro' }
{'RotaryEncoder' }
{'SPI' }
{'Servo' }
{'ShiftRegister' }
{'Ultrasonic' }
>> arduinoObj=arduino('COM6','Mega2560','Libraries','ExampleAddon/HelloWor')
Expected libraries to match one of these values:
'Adafruit/MotorShieldV2', 'Arduino/MKRMotorCarrier', 'ExampleAddon/HelloWo', 'I2C', 'MAMGyroFolder/Gyro', 'RotaryEncoder', 'SPI', 'Servo',
'ShiftRegister', 'Ultrasonic'
The input, 'ExampleAddon/HelloWor', did not match any of the valid values.
>> arduinoObj=arduino('COM6','Mega2560','Libraries','ExampleAddon/HelloWo')
Updating server code on board Mega2560 (COM6). This may take a few minutes.
Cannot program board Mega2560 (COM6). Please make sure the board is supported and the port and board type are correct. For more information,
see Arduino Hardware Troubleshooting.
>> arduinoObj=arduino
arduinoObj =
arduino with properties:
Port: 'COM6'
Board: 'Mega2560'
AvailablePins: {'D2-D53', 'A0-A15'}
AvailableDigitalPins: {'D2-D53', 'A0-A15'}
AvailablePWMPins: {'D2-D13', 'D44-D46'}
AvailableAnalogPins: {'A0-A15'}
AvailableI2CBusIDs: [0]
Libraries: {'ExampleAddon/HelloWorl'}
>> lib
lib =
10×1 cell array
{'Adafruit/MotorShieldV2' }
{'Arduino/MKRMotorCarrier'}
{'ExampleAddon/HelloWo' }
{'I2C' }
{'MAMGyroFolder/Gyro' }
{'RotaryEncoder' }
{'SPI' }
{'Servo' }
{'ShiftRegister' }
{'Ultrasonic' }
>> lib = listArduinoLibraries()
Warning: Class arduinoio.LibraryBase will be removed. Following Add-On classes need to be updated to work in future release :
Arduino/MKRMotorCarrier. Follow steps mentioned in this Arduino Add-On document to update. Click here to turn off this warning.
Warning: Class arduinoio.AddonBase will be removed. Inherit class arduinoioaddons.arduino.MKRRotaryEncoder from
matlabshared.addon.LibraryBase instead. For more information, see Arduino Add-On document.Click here to turn off this warning.
lib =
10×1 cell array
{'Adafruit/MotorShieldV2' }
{'Arduino/MKRMotorCarrier'}
{'ExampleAddon/HelloWo' }
{'I2C' }
{'MAMGyroFolder/Gyro' }
{'RotaryEncoder' }
{'SPI' }
{'Servo' }
{'ShiftRegister' }
{'Ultrasonic' }

답변 (0개)

카테고리

Help CenterFile Exchange에서 I2C Devices에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by