2. Python

Welcome to the Python on Windows tutorial. Below you will be able to run some basic examples, in Windows and Python, to interface with your MetaSensor.

You are expected to have at least a basic understanding of Python as a language. There are many amazing websites such as https://www.learnpython.org/ to teach you if you are new to Python.

The Python SDK itself is a wrapper around the C++ SDK, calling into the C++ code using the ctypes library. You will want to keep a reference to the ctype documentation and C++ SDK documentation handy.

2.1. Prerequsites

You should have completed the instructions in the previous section related to the Windows Installation.

We will be using the Git Bash terminal to run the Python examples below.

First, let’s check that you have Python 2.7 installed:

  1. Open Git Bash
  2. Run the command
>>> which python
_images/python-1.jpg
  1. You can use Python 3.4 if you would like to. This tutorial will not cover Python 2.7.

2.1.1. Install Pip

We use pip to install dependencies and the Matlab libraries. pip is a package management system used to install and manage software packages written in Python.

  1. Download get-pip.py to a folder on your computer.
  2. Open a command prompt window and navigate to the folder containing get-pip.py.
  3. Then run python get-pip.py. This will install pip.
>>> python get-pip.py
_images/python-2.jpg
  1. Verify a successful installation by opening a command prompt window and navigating to your Python installation’s script directory (default is C:Python27Scripts). Type pip freeze from this location to launch the Python interpreter.
>>> pip freeze
_images/python-3.jpg

pip freeze displays the version number of all modules installed in your Python non-standard library; On a fresh install, pip freeze will display little content.

  1. Don’t forget to make sure your PATH ENVIRONMENT VARIABLE is up to date with your Python path. You can consult the Windows Installation section for more details.

2.1.2. Upgrade Pip

It is essential that your pip be up to date. For good measure, run the commands below:

>>>  pip install pip --upgrade
>>>  pip install --upgrade pip setuptools
_images/python-4.jpg

2.1.3. Install MetaWear

MetaWear is available on Pip. This means you can run the command below to install the MetaWear Python library directly:

>>>  pip install metawear
_images/python-5.jpg

Please take a look at the official website for PyPi to learn more about the MetaWear package: https://pypi.org/project/metawear/

_images/python-12.jpg

2.1.4. Download Examples

Head over to our Python Github page: https://github.com/mbientlab/MetaWear-SDK-Python

_images/python-6.jpg

You can clone the repository or simply download as a ZIP file:

>>>  git clone https://github.com/mbientlab/MetaWear-SDK-Python.git
_images/python-7.jpg

2.2. Scan and Connect

This tutorial will take you through your first MetaWear Python App.

Note

Make sure you have a MetaWear device with you, fully-charged, and that you are aware of that device’s MAC address.

We will ignore most of the items in the Github repository and instead we will focus on the examples folder:

_images/python-8.jpg

Using your favorite editor, take a look at the scan_connect.py example.

This python code will scan for nearby Bluetooth devices and print out a list of available devices. You can then choose a device you want to connect to:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
print("scanning for devices...")
devices = {}
def handler(result):
    devices[result.mac] = result.name

BleScanner.set_handler(handler)
BleScanner.start()

sleep(10.0)
BleScanner.stop()

i = 0
for address, name in six.iteritems(devices):
    print("[%d] %s (%s)" % (i, address, name))
    i+= 1

msg = "Select your device (-1 to rescan): "
selection = int(raw_input(msg) if platform.python_version_tuple()[0] == '2' else input(msg))

Run the code:

>>>  # usage: python scan_connect.py
>>>  python scan_connect.py
_images/python-9.jpg

Select the device you want to connect to. The MAC address for my favorite MetaSensor is D8:B5:11:21:96:06.

>>>  Select your device (-1 to rescan): 1

The code will then connect to this device for 5 seconds, retrieve device information, and disconnect.

_images/python-10.jpg

As you can see, your Windows machine connected to the MetaSensor using Bluetooth and retrieved some information about the devices such as the firmware version and the manufacturer name.

Congratulations, you ran your first Python script!

Warning

If at any time, you get an API error, try restarting your Bluetooth adapter by disabling it under the Device Manager (or by un-plugging your Bluetooth dongle if applicable). Additionally, if your MetaSensor is corrupted by a bad command, reset it or firmware update it using the Android or iOS MetaBase App.

As our Python API is based on the CPP library, we recommend that you have two documents open:

  1. The CPP documentation: https://mbientlab.com/cppdocs/latest
  2. The CPP API reference: https://mbientlab.com/documents/metawear/cpp/latest

Warning

If you are having issues with the example scripts, try running the scan_connect.py first.

2.3. LED

Note

For this example you can refer to the API documentation for LEDs: https://mbientlab.com/cppdocs/latest/led.html

Note

For this example you can refer to the API references for the LED here: https://mbientlab.com/documents/metawear/cpp/latest/led_8h.html

Now you can try our led.py example by running:

>>>  python led.py D8:B5:11:21:96:06

This example connects to a specific MetaSensor by specifying the MAC address on the cmd line.

1
2
3
4
5
6
7
8
device = MetaWear(sys.argv[1])
device.connect()
print("Connected")

pattern= LedPattern(repeat_count= Const.LED_REPEAT_INDEFINITELY)
libmetawear.mbl_mw_led_load_preset_pattern(byref(pattern), LedPreset.SOLID)
libmetawear.mbl_mw_led_write_pattern(device.board, byref(pattern), LedColor.GREEN)
libmetawear.mbl_mw_led_play(device.board)

In this example we make use of the fundamental C libraries used by Python by referencing API calls for LED animations.

First, you will notice the import of the C bindings at the top of the file:

1
2
from mbientlab.metawear import MetaWear, libmetawear
from mbientlab.metawear.cbindings import *

Second you will notice a few API calls such as mbl_mw_led_load_preset_pattern, mbl_mw_led_write_pattern and mbl_mw_led_play.

So if we take a quick look, this line sets the LED to be a solid color:

1
libmetawear.mbl_mw_led_load_preset_pattern(byref(pattern), LedPreset.SOLID)

and this line sets the color:

1
libmetawear.mbl_mw_led_write_pattern(device.board, byref(pattern), LedColor.GREEN)

We could change the line to the following to set the LED color blue:

1
libmetawear.mbl_mw_led_write_pattern(device.board, byref(pattern), LedColor.BLUE)

When you run the script, the MetaSensor will light up green for a few seconds.

_images/python-11.jpg

2.4. Streaming Accelerometer

Note

For this example you can refer to the API documentation for data streaming here: https://mbientlab.com/cppdocs/latest/mblmwdatasignal.html#streaming

Note

For this example you can refer to the API references for the accelerometer here: https://mbientlab.com/documents/metawear/cpp/latest/accelerometer_8h.html

The stream_data.py example illustrates how to stream accelerometer data at 25Hz with 16G range from a single sensor.

>>>  python stream_data.py D8:B5:11:21:96:06
_images/python-13.jpg

In this example, we can take a look at the C commands to set the accelerometer settings:

1
2
3
libmetawear.mbl_mw_acc_set_odr(s.device.board, 25.0)
libmetawear.mbl_mw_acc_set_range(s.device.board, 16.0)
libmetawear.mbl_mw_acc_write_acceleration_config(s.device.board)

We can see that we set the sampling frequency of the accelerometer to 25Hz as well as the range to 16Gs.

Our APIs manage the Bluetooth link for you. All you have to do is make sure you are ready to get the data in the appropriate callback and export it in the right format.

1
2
signal = libmetawear.mbl_mw_acc_get_acceleration_data_signal(s.device.board)
libmetawear.mbl_mw_datasignal_subscribe(signal, None, s.callback)

The callback is found in the State class:

1
self.callback = FnVoid_VoidP_DataP(self.data_handler)

and the data processing for the callback is found in the same class:

1
2
3
def data_handler(self, ctx, data):
    print("%s -> %s" % (self.device.address, parse_value(data)))
    self.samples+= 1

The data coming from the Bluetooth link includes the devices address and a sample of accelerometer data. We print this information to the screen.

1
2
libmetawear.mbl_mw_acc_enable_acceleration_sampling(s.device.board)
libmetawear.mbl_mw_acc_start(s.device.board)

Now that our accelerometer is setup and so is our callback, we start the stream.

1
2
3
4
5
6
7
8
sleep(10.0)

libmetawear.mbl_mw_acc_stop(s.device.board)
libmetawear.mbl_mw_acc_disable_acceleration_sampling(s.device.board)

signal = libmetawear.mbl_mw_acc_get_acceleration_data_signal(s.device.board)
libmetawear.mbl_mw_datasignal_unsubscribe(signal)
libmetawear.mbl_mw_debug_disconnect(s.device.board)

After 10 seconds have passed, we stop the stream and clean up by unsubscribing the callback and disconnecting from the device.

_images/python-14.jpg

2.5. Multiple Devices

Note

For this example you can refer to the API documentation for streaming here: https://mbientlab.com/cppdocs/latest/mblmwdatasignal.html#streaming

Note

For this example you can refer to the API references for the accelerometer here: https://mbientlab.com/documents/metawear/cpp/latest/accelerometer_8h.html

The multi_device.py example illustrates how to work with multiple devices at the same time.

We continue from the previous example and instead we add a for loop that will replicate the same set of commands for every single sensor we want to connect to.

1
2
3
for s in states:
    print("configuring device")
    libmetawear.mbl_mw_acc_set_odr(s.device.board, 25.0)

This time we run it on two devices by adding two MACs to the cmd line:

>>>  python stream_data.py D8:B5:11:21:96:06 F6:99:FD:A4:64:80
_images/python-15.jpg _images/python-16.jpg

2.6. Data Processor

Note

For this example you can refer to the API documentation for the data processor here: https://mbientlab.com/cppdocs/latest/mblmwdataprocessor.html

Note

For this example you can refer to the API references for the averager here: https://mbientlab.com/documents/metawear/cpp/latest/average_8h.html

The data_processor.py example illustrates how to stream accelerometer data that is averaged using the data processor average function.

Continuing from our previous example, we will now switch out the data fuser for the data processor.

1
2
3
4
5
6
fn_wrapper = cbindings.FnVoid_VoidP_VoidP(processor_created)

acc = libmetawear.mbl_mw_acc_get_acceleration_data_signal(self.device.board)
libmetawear.mbl_mw_dataprocessor_average_create(acc, 4, None, fn_wrapper)

libmetawear.mbl_mw_datasignal_subscribe(self.processor, None, self.callback)

In the average_create function, we take the accelerometer signal and we average 4 values together.

Now we run the example:

>>>  python stream_data.py D8:B5:11:21:96:06 F6:99:FD:A4:64:80

The example was modified to run for less than a second:

_images/python-17.jpg

2.7. Log Accelerometer

Note

For this example you can refer to the API documentation for the data processor here: https://mbientlab.com/cppdocs/latest/logging.html

Note

For this example you can refer to the API references for the logger here: https://mbientlab.com/documents/metawear/cpp/latest/logging_8h.html

The log_acc.py example illustrates the logging functionality of the MetaSensor using accelerometer data.

The Python script has multiple parts. First, the main portion of the script sets up the logger, and then the script goes to sleep for 15 seconds (while the MetaSensor logs temperature data). Finally, when the 15 seconds have passed, the script downloads the data:

1
2
3
4
5
6
7
try:
    s.setup_logger()

    print("Logging data for 15s")
    sleep(15.0)

    s.download_data()

setup_logger uses the mbl_mw_acc_get_acceleration_data_signal and mbl_mw_datasignal_log API functions to setup the accelerometer on the MetaSensor to log data:

1
2
signal = libmetawear.mbl_mw_acc_get_acceleration_data_signal(self.device.board)
libmetawear.mbl_mw_datasignal_log(signal, None, fn_wrapper)

setup_logger continues and calls the appropriate functions to start the acceleration data sampling ang logging with mbl_mw_acc_enable_acceleration_sampling, mbl_mw_acc_start and mbl_mw_logging_start.

1
2
3
libmetawear.mbl_mw_acc_enable_acceleration_sampling(self.device.board)
libmetawear.mbl_mw_acc_start(self.device.board)
libmetawear.mbl_mw_logging_start(self.device.board, 0);

The default values for the accelerometer will be used since we did not set the sampling frequency or scale.

Take a minute to get familiar with the logger_handler callback function which checks that a MblMwDataLogger pointer has been created successfully.

1
2
def logger_handler(ctx, pointer):
    result[0] = RuntimeError("Could not create logger") if pointer == None else pointer

When we create a new logger in the MetaSensor, we wait for the MetaSensor to acknowledge this in the callback. If an error has occurred, a null pointer will be returned.

After 15 seconds have passed, the download_data function is used to call cleanup functions including mbl_mw_acc_stop, mbl_mw_acc_disable_acceleration_sampling, and mbl_mw_logging_stop.

1
2
3
libmetawear.mbl_mw_acc_stop(self.device.board)
libmetawear.mbl_mw_acc_disable_acceleration_sampling(self.device.board)
libmetawear.mbl_mw_logging_stop(self.device.board)

Finally, the mbl_mw_logger_subscribe and mbl_mw_logging_download functions are used to request log data from the MetaSensor. When the call is successful, the data is returned and printed in the callbacks:

1
2
3
4
5
6
fn_wrapper = FnVoid_VoidP_UInt_UInt(progress_update_handler)
download_handler = LogDownloadHandler(context = None, received_progress_update = fn_wrapper, received_unknown_entry = cast(None, FnVoid_VoidP_UByte_Long_UByteP_UByte), received_unhandled_entry = cast(None, FnVoid_VoidP_DataP))

callback = FnVoid_VoidP_DataP(lambda ctx, p: print("%f" % (parse_value(p))))
libmetawear.mbl_mw_logger_subscribe(self.logger, None, callback)
libmetawear.mbl_mw_logging_download(self.device.board, 0, byref(download_handler))

Now we run the script:

>>>  python log_acc.py E3:AD:97:B0:74:F8
_images/python-19.jpg

2.8. Log Temperature

Note

For this example you can refer to the API documentation for the timer here: https://mbientlab.com/cppdocs/latest/timer.html and events here: https://mbientlab.com/cppdocs/latest/mblmwevent.html

Note

For this example you can refer to the API references for the logger here: https://mbientlab.com/documents/metawear/cpp/latest/logging_8h.html and events here: https://mbientlab.com/documents/metawear/cpp/latest/event_8h.html

The log_temp.py example illustrates how to log temperature data in the MetaSensor memory and retrieve it later.

Note

The reason the accelerometer logging example is simpler than its temperature logging counterpart is thanks to the digital features of the BOSCH BMI160 sensor that allow us to set the sampling frequency instead of relying on the event and timer modules.

Similar to its accelerometer predecessor, the main portion of the script sets up the logger, then the script goes to sleep for 15 seconds (while the MetaSensor logs temperature data). Finally, when the 15 seconds have passed, the script downloads the data:

1
2
3
4
5
6
7
try:
    s.setup_logger()

    print("Logging data for 15s")
    sleep(15.0)

    s.download_data()

setup_logger uses the mbl_mw_multi_chnl_temp_get_temperature_data_signal and mbl_mw_datasignal_log API functions to setup the thermistor sensor onboard the MetaSensor to log data:

1
2
signal = libmetawear.mbl_mw_multi_chnl_temp_get_temperature_data_signal(self.device.board, MetaWearRProChannel.ON_BOARD_THERMISTOR)
libmetawear.mbl_mw_datasignal_log(signal, None, fn_wrapper)

The temperature signal is retrieved and sent to the logger function.

Then it uses the mbl_mw_logging_start and mbl_mw_timer_start API functions to setup the timer and logger:

1
2
3
4
5
6
self.logger = result[0]
self.timer = self._setup_timer()
self._setup_read_event(self.timer, signal)

libmetawear.mbl_mw_logging_start(self.device.board, 0);
libmetawear.mbl_mw_timer_start(self.timer)

Since the thermistor is an analog sensor, it does not come with features like the sampling frequency register of the digital accelerometer. So instead, we use the internal timer feature of the MetaSensor to set the frequency (time interval) at which a new reading from the temperature sensor will occur.

Looking at the setup_timer, we see that this creates a timer within the device using the mbl_mw_timer_create_indefinite API function:

1
2
fn_wrapper = FnVoid_VoidP_VoidP(timer_handler)
libmetawear.mbl_mw_timer_create_indefinite(self.device.board, 1000, 0, None, fn_wrapper)

The timer fires every 1000 milliseconds.

And then setup_read_event sends further commands to the MetaSensor using the mbl_mw_event_record_commands, mbl_mw_datasignal_read and mbl_mw_event_end_record API functions.

1
2
3
4
fn_wrapper = FnVoid_VoidP_VoidP_Int(commands_recorded)
libmetawear.mbl_mw_event_record_commands(timer)
libmetawear.mbl_mw_datasignal_read(signal)
libmetawear.mbl_mw_event_end_record(timer, None, fn_wrapper)

The event command is used to tie a datasignal_read to a timer. As such, every time 1000ms have passed, an event is triggered and we log the temperature signal into memory.

Take a minute to get familiar with the logger_handler callback function which checks that a MblMwDataLogger pointer has been created successfully.

1
2
def logger_handler(ctx, pointer):
    result[0] = RuntimeError("Could not create logger") if pointer == None else pointer

When we create a new logger in the MetaSensor, we wait for the MetaSensor to acknowledge this in the callback. If an error has occurred, a null pointer will be returned.

Finally, we look at the download_data function which runs once the 15 seconds have elapsed. This function first stops the logger and timer and then promptly downloads the temperature data in memory via the callback:

1
2
3
4
5
6
fn_wrapper = FnVoid_VoidP_UInt_UInt(progress_update_handler)
download_handler = LogDownloadHandler(context = None, received_progress_update = fn_wrapper, received_unknown_entry = cast(None, FnVoid_VoidP_UByte_Long_UByteP_UByte), received_unhandled_entry = cast(None, FnVoid_VoidP_DataP))

callback = FnVoid_VoidP_DataP(lambda ctx, p: print("%f" % (parse_value(p))))
libmetawear.mbl_mw_logger_subscribe(self.logger, None, callback)
libmetawear.mbl_mw_logging_download(self.device.board, 0, byref(download_handler))

The mbl_mw_logger_subscribe and mbl_mw_logging_download functions are used to request data from the MetaSensor. When the call is successful, the data is returned and printed in the callbacks.

Let’s go ahead and run the example:

>>>  python log_temp.py E3:AD:97:B0:74:F8
_images/python-20.jpg

2.9. Data Fuser

Note

For this example you can refer to the API documentation for the fuser here: https://mbientlab.com/cppdocs/latest/dataprocessor.html#fuser

Note

For this example you can refer to the API references for the fuser here: https://mbientlab.com/documents/metawear/cpp/latest/fuser_8h.html

The data_fuser.py example illustrates how to pack more data into one Bluetooth packet. It’s a great solution when you need to stream data at near Bluetooth capacity (~100Hz).

The bulk of the script is in the setup function which requests both the accelerometer signal and the gyroscope signal.

1
2
acc = libmetawear.mbl_mw_acc_get_acceleration_data_signal(self.device.board)
gyro = libmetawear.mbl_mw_gyro_bmi160_get_rotation_data_signal(self.device.board)
1
2
signals[0] = gyro
libmetawear.mbl_mw_dataprocessor_fuser_create(acc, signals, 1, None, fn_wrapper)
1
libmetawear.mbl_mw_datasignal_subscribe(self.processor, None, self.callback)

The mbl_mw_dataprocessor_fuser_create function combines the two signals (gyro and acc). Then we subscribe to the data stream with the mbl_mw_datasignal_subscribe function.

The start function simply calls the necessary functions to start the process:

1
2
3
4
5
libmetawear.mbl_mw_gyro_bmi160_enable_rotation_sampling(self.device.board)
libmetawear.mbl_mw_acc_enable_acceleration_sampling(self.device.board)

libmetawear.mbl_mw_gyro_bmi160_start(self.device.board)
libmetawear.mbl_mw_acc_start(self.device.board)

Once 10 seconds have passed, the stream ends and the script disconnects.

Let’s go ahead and run the example:

>>>  python data_fuser.py E3:AD:97:B0:74:F8

2.10. Events and the Data Processor

Note

For this example you can refer to the API documentation for the data processor here: https://mbientlab.com/cppdocs/latest/mblmwdataprocessor.html and events here: https://mbientlab.com/cppdocs/latest/mblmwevent.html

Note

For this example you can refer to the API references for the data processor here: https://mbientlab.com/documents/metawear/cpp/latest/dir_ac375e5396e5f8152317e89ec5f046d1.html and events here: https://mbientlab.com/documents/metawear/cpp/latest/event_8h.html

The acc_threshold_detector.py example illustrates a number of features including processor filter chains and events.

The idea behind this script is to create a shock detector by combining x, y, z accelerometer data using an averager and root mean square and then using a threshold detector.

This is a great way to detect potholes when the sensor is placed in a car.

  1. Setup the accelerometer:
1
2
3
4
5
libmetawear.mbl_mw_acc_bmi160_set_odr(d.board, AccBmi160Odr._50Hz)
libmetawear.mbl_mw_acc_set_range(d.board, 2.0)
libmetawear.mbl_mw_acc_write_acceleration_config(d.board)

acc_signal = libmetawear.mbl_mw_acc_get_acceleration_data_signal(d.board)
  1. Create an RMS filter of the X,Y,Z data from the accelerometer (combining the data):
1
rms = create_voidp(lambda fn: libmetawear.mbl_mw_dataprocessor_rms_create(acc_signal, None,  fn), "RMS")
  1. Average the data (to remove noise and error):
1
avg = create_voidp(lambda fn: libmetawear.mbl_mw_dataprocessor_average_create(rms, 8, None, fn), "averager")
  1. Set up a threshold detector for value = 1 (detecting a shock):
1
ths = create_voidp(lambda fn: libmetawear.mbl_mw_dataprocessor_threshold_create(avg, ThresholdMode.BINARY, 1.0, 0.0, None, fn), "threshold detector")
  1. Log the shock signal in memory:
1
ths_logger = create_voidp(lambda fn: libmetawear.mbl_mw_datasignal_log(ths, None, fn), "threshold logger")
  1. Start the process:
1
2
3
libmetawear.mbl_mw_acc_enable_acceleration_sampling(d.board)
libmetawear.mbl_mw_acc_start(d.board)
libmetawear.mbl_mw_logging_start(d.board, 0)

The rest is straightforward; the script waits 10 seconds before cleaning up the logger, stopping the accelerometer, downloading the data from memory and resetting the device.

Once item to note here is that the average has to be reset. This is done using an event in which the event resets the averager:

1
2
3
libmetawear.mbl_mw_event_record_commands(avg)
libmetawear.mbl_mw_dataprocessor_average_reset(avg)
end_event_record(avg)

Let’s go ahead and run the example:

>>>  python acc_threshold_detector.py E3:AD:97:B0:74:F8
_images/python-21.jpg

2.11. Macros

Note

For this example you can refer to the API documentation for macros here: https://mbientlab.com/cppdocs/latest/macro.html

Note

For this example you can refer to the API references for macros here: https://mbientlab.com/documents/metawear/cpp/latest/macro_8h.html

The macro_setup.py and macro_remove.py example showcase the macro system which enables users to “permanently” command the MetaSensor. A macro is a command that stays in the memory of the MetaSensor and will continue to operate until the MetaSensor is either firmware updated or the macros are erased and the board is reset.

The macro_setup.py script is similar to the acc_threshold_detector.py script in the sense that it chains filters. However, it does so in a macro which means the MetaSensor will perform the shock detection even if the sensor loses power or is reset.

Additionally, the chain includes an event that uses the LED so that when a shock is detected, the LED blinks blue.

Let’s go ahead and run the example:

>>>  python macro_setup.py E3:AD:97:B0:74:F8
_images/python-22.jpg

If your MetaSensor sustains a small shock, the LED will blink blue; try it out!

When we are done, use the clean-up script to remove the macro and reset the MetaSensor:

>>>  python macro_setup.py E3:AD:97:B0:74:F8
_images/python-23.jpg

2.12. Logging Anonymously

Note

For this example you can refer to the API documentation for anonymous signals here: https://mbientlab.com/cppdocs/latest/advanced_features.html#anonymous-signals

Note

For this example you can refer to the API references for anonymous signals here: https://mbientlab.com/documents/metawear/cpp/latest/anonymous__datasignal_8h.html

The anonymous_datasignal.py example illustrates how to retrieve data from the sensors memory when the log was started by another device.

First run the MetaBase App on any device such as your iPhone and set the device D8:B5:11:21:96:06 to start logging data (any data, any frequency).

In this example, I used the MetaBase App on an iPhone 8 to log Ambient Light at 0.5Hz.

Then run the command below to download the data on your Windows machine:

>>>  python anonymous_datasignal.py D8:B5:11:21:96:06
_images/python-18.jpg

2.13. Next steps

Check out a few more examples in the folder and read through them. Then go and build your own Python script!

Please read our C docs to learn about all of the capabilities of the MetaSensors: https://mbientlab.com/cppdocs/latest/index.html