On multiple calls to ArduinoAlvik.stop you got the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/arduino_alvik/arduino_alvik.py", line 381, in stop
AttributeError: 'type' object has no attribute '_instance'
Unbinding the current instance from the ArduinoAlvik singleton class in the stop method is IMO useless and has potential side effects like:
If one alvik obj is stopped and another one is created you will have 2 instances of ArduinoAlvik which beats the purpose of the singleton class
The right way would be unbinding the instance right before it is deleted. Unfortunately the special method 'del' is not implemented in MP for user defined classes, see here
On multiple calls to ArduinoAlvik.stop you got the following exception:
Unbinding the current instance from the ArduinoAlvik singleton class in the stop method is IMO useless and has potential side effects like:
The right way would be unbinding the instance right before it is deleted. Unfortunately the special method 'del' is not implemented in MP for user defined classes, see here