v1.0.0
New features include,
- Firmware Updater
Module firmware updater has changed its interface.
# Before
import modi
bundle = modi.MODI()
bundle.update_module_firmware()
# After
import modi
modi.update_module_firmware()
Network firmware updater has been implemented in 1.0.0
# Usage
import modi
modi.update_network_firmware()
- Change module interface
Getter (input modules)
# Before
if button.get_pressed():
# After
if button.pressed:
Setter (output modules)
# Before
led.set_red(255)
# After
led.red = 255
- Implement experimental BLE connection
# Usage
import modi
bundle = modi.MODI(conn_mode='ble', uuid=$NETWORK_UUID)
Can handle output modules only due to network firmware limitation, we will improve this in the next update.
-
Include firmware in the repository
This removes internet dependency of PyMODI by allowing firmware update or version check where no internet is available. -
Enable MODI Play support
Implement an interface to handle the network module as a port for MODI Play. You can control the network module using MODI Play.
# Usage
import modi
bundle = modi.MODI()
network = bundle.networks[0]
led = bundle.leds[0]
while True:
if network.button_pressed:
led.red = 255
-
Sort modules by euclidean distance, to the network module
When returning modules with the same type, modules that are close to the network module have a lower index than the ones that are not. If the distance of two modules is the same, left to right then top to bottom order will determine its priority.
e.g.bundle.motors[0]
returns a motor object which is close to the network module than the one frombundle.motors[1]
-
Remove nb_modules parameter of MODI object
When creating a new MODI object (i.e. bundle), you don't need to pass nb_modules parameter to it. MODI automatically evaluates the number of modules attached to your machine. -
Print topology map when the battery module is attached
Change topology manager to handle battery module. -
Add timeout while initializing MODI object
If there is a minor issue in the MODI hardware (e.g. topology pin may malfunction), the initialization usually fail. However, topology failure does not affect PyMODI functionality so use timeout to ignore topology failure. -
Reset user code
If attached STM32 modules contain user code, ask to reset user code before running PyMODI.