5.4. API - Deprecated
In earlier versions of this library, all classes of the easysensors
module belonged to easygopigo3
module.
This can potentially make scripts written on a older version of this not work anymore. In order to prevent this problem, we have created dummy functions
of each class of the easysensors
module and placed them in easygopigo3
. Since these functions take the same arguments as the classes that were in previously
and because they return an object, the scripts that were built on that long-gone API still work.
We intent to support these “dummy” functions for a while before we retire them.
In summary, the classes that are now being instantiated from the easysensors
can still be instantiated from easygopigo3
for a while. These classes are:
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
The only exception is the easygopigo3.DistanceSensor()
which class no longer exists in either module.
This surrogate function has the same arguments as the other classes and the only port available to use is the "I2C"
.
If you wish to initialize an object for the Distance Sensor, a better way is just to use the DistanceSensor
class of DI-Sensors library on which this library is based upon.