Skip to main content

Telemetrix Client For The Arduino Nano RP2040 Connect

Project description

Tmx-Nano-2040-WiFi-AIO

Tmx-nano-2040-wifi-aio is a member of the Telemetrix family and is a Python asyncio client specifically tailored to remotely control and monitor the Arduino Nano RP2040 Connect using Python scripts running on your PC.

When paired with the Telemetrix4Connect2040 custom Arduino server sketch, control and monitoring of the Arduino Nano RP2040 Connect accomplished using a Wi-Fi link between the PC and the Arduino.

This library supports the following features:

  • Analog and Digital Input
  • Digital Outputs including PWM
  • Onboard devices:
    • IMU
    • Microphone
    • RGB LED
  • I2C device communications.
  • SPI device communications.
  • HC-SR04 Type distance sensors.
  • DHT Type humidity/temperature sensors.
  • Servo motors.
  • NeoPixel strips.

A User's Guide explaining installation and use is available online.

The Python API for may be found here.

Here is a sample project that blinks the Arduino Board LED:

import asyncio
import sys

from tmx_nano2040_wifi_aio import tmx_nano2040_wifi_aio

"""
Setup a pin for digital output and output a signal
and toggle the pin. Do this 4 times.
"""

# some globals
DIGITAL_PIN = 13  # arduino pin number


async def blink(my_board, pin):
    """
    This function toggles a digital pin.

    :param my_board: an tmx_nano2040_wifi_aio instance
    :param pin: pin to be controlled
    """

    # set the pin mode
    await my_board.set_pin_mode_digital_output(pin)

    # toggle the pin 4 times and exit
    for x in range(4):
        print('ON')
        await my_board.digital_write(pin, 0)
        await asyncio.sleep(1)
        print('OFF')
        await my_board.digital_write(pin, 1)
        await asyncio.sleep(1)


# get the event loop
loop = asyncio.get_event_loop()

# instantiate tmx_nano2040_wifi_aio
board = tmx_nano2040_wifi_aio.TmxNano2040WifiAio(ip_address='192.168.2.246')

try:
    # start the main function
    loop.run_until_complete(blink(board, DIGITAL_PIN))
    loop.run_until_complete(board.shutdown())

except KeyboardInterrupt:
    loop.run_until_complete(board.shutdown())
    sys.exit(0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmx_nano_2040_wifi_aio-1.2.1.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tmx_nano_2040_wifi_aio-1.2.1-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file tmx_nano_2040_wifi_aio-1.2.1.tar.gz.

File metadata

  • Download URL: tmx_nano_2040_wifi_aio-1.2.1.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for tmx_nano_2040_wifi_aio-1.2.1.tar.gz
Algorithm Hash digest
SHA256 651deb9e591856e7f4434de04a0e31d0f561947d8689433aa6d727de54f83ca4
MD5 4b74a2066cb1625f223e7220e7a48652
BLAKE2b-256 27a8e78c7f32cbd59b160a8d79f37570b0a768f06716f164c3d166f37cea6e91

See more details on using hashes here.

File details

Details for the file tmx_nano_2040_wifi_aio-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tmx_nano_2040_wifi_aio-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 990f4ffa1bec4577a2ac24734e760e690c854ef4c98ba72c941804152bec38bc
MD5 951041e343b244176201714005188249
BLAKE2b-256 1bcbcbd021d7fc98e4058382c2fdd96df7e7478d19d308dbf23784db10d91a56

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page