Examples
========

All code examples can be found in the examples directory of the repository.

Find all devices
-----------------

Find and display all Free-Wili devices.

.. literalinclude:: ../../examples/find_freewilis.py
   :language: python
   :linenos:

Upload files
------------

Upload files to the first Free-Wili device.

.. literalinclude:: ../../examples/upload_wasm_with_fwi.py
   :language: python
   :linenos:

Toggle IO
------------

Toggles IO on the first Free-Wili device.

.. literalinclude:: ../../examples/io_toggle.py
   :language: python
   :linenos:

Read Buttons
------------

Read buttons on the first Free-Wili device.

.. literalinclude:: ../../examples/read_buttons.py
   :language: python
   :linenos:

Set Board LEDs
--------------

Set Board LEDs on the first Free-Wili device.

.. literalinclude:: ../../examples/read_buttons.py
   :language: python
   :linenos:

SparkFun 9DoF IMU Breakout - ISM330DHCX, MMC5983MA (Qwiic)
----------------------------------------------------------

SparkFun 9DoF IMU Breakout example over I2C.

.. literalinclude:: ../../examples/i2c_sparkfun_9dof_imu_breakout.py
   :language: python
   :linenos:
