Skip to main content

Texas Instruments Python Debugging and Programming Support

Project description

TI-Python-Module

Texas Instruments Python Debugging and Programming Support

Installation:
# Installation:
pip install ti-python-module
# Update:
pip install ti-python-module --upgrade

How to install this feature / module

How to use these modules properly:

Accessing the module

  • Install the package using pip install ti-python-module
  • Import the modules (examples: from ti_python_module.ti_hub import * or from ti_python_module import ti_rover as rv)

Putting the program on the calculator / rover

  • Change the import so you don't have the ti_python_module part

Known Problems / Issues

  • The module cmath don't exists. This is due to a module with the exact same name already exists build in to python. Since I am unable to change build-in classes, I can't add the proper functions. The same issue occurs for time.

  • The module ti_image does not exist. This is due to the method new_image requiring these parameters: width, height, (red, green, blue). Since Python 3.x sub-list arguments (the part in brackets) are not supported (invalid). Due to the majority of people working with Python 3.x, I have decided NOT to implement the module, because if you can't create an image, you can't work with it later on.

Recommended IDEs

As an IDE, I personally recommend you choosing between the following two IDEs depending on your use case.

  • Microsoft Visual Studio Code

    • Faster Use
    • Easier showing of function or class description
  • IntelliJ Idea

    • More Intense and deeper Use
    • Easier coding of complex programs

FAQ

Why don't the forward or backward method work?

Make sure, that if you have specified the speed, that you have also specified the speed unit. There are three usecases of the functions, like listed below. It is not possible to set the speed parameter, but not the speed unit.

from ti_python_module import ti_rover as rv  # import

# RIGHT USE
# forward
rv.forward(1)
rv.forward(1, "m")
rv.forward(1, "m", 1, "m/s")
#backward
rv.backward(1)
rv.backward(1, "m")
rv.backward(1, "m", 1, "m/s")

# WRONG USE
# forward
# rv.forward(1, "m", 1)
# backward
# rv.backward(1, "m", 1)

What are the return values of a function?

As you might have guessed, the functions do not actually measure any values, but they rather return calculated or random values.

How do I see a functions / class description?

When using IntelliJ Idea, Ctrl + Click the statement. When using Visual Studio Code, You will see a dialogue with autocomplete suggestions. Click the > sign to toggle the information.

What are the classes err.py and file_handler.py

These classes are just for simplifying the creation of the functions. DO NOT USE THEM IN YOUR ACTUAL SCRIPT

The function I want to use requires an argument called self. What does that mean?

If a function requires an argument called self, then it is placed after a class. Some classes need an argument, whilst some just need the brackets ()

from ti_python_module.ti_hub import continuous_servo, hub_time
continuous_servo.set_cw(1, 1)               # WRONG
continuous_servo("OUT 3").set_cw(1, 1)      # RIGHT

hub_time.measurement()                      # WRONG
hub_time().measurement()                    # RIGHT

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

ti-python-module-0.10.7.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

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

ti_python_module-0.10.7-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file ti-python-module-0.10.7.tar.gz.

File metadata

  • Download URL: ti-python-module-0.10.7.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for ti-python-module-0.10.7.tar.gz
Algorithm Hash digest
SHA256 e6f3456efc7ed38f48896f3c795b1aaaab1aa5a01f08d4dcd6948e9124eb73d1
MD5 ada275619eda9c8900d64d03f24193a9
BLAKE2b-256 d08b7d2e318d2022f26ed5fa60a6962970bb984b8f5953c9334dcad7cb6b68d2

See more details on using hashes here.

File details

Details for the file ti_python_module-0.10.7-py3-none-any.whl.

File metadata

  • Download URL: ti_python_module-0.10.7-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for ti_python_module-0.10.7-py3-none-any.whl
Algorithm Hash digest
SHA256 507f60b2446d18f87ebae0837f410f998885a7ba57ebc73f0994c19018d89219
MD5 4a92aae3d418e7cff95ab0150594a871
BLAKE2b-256 5d317aaaec4c2ea2e4eb7306db1941748613210a4d69aa508704b1cc5c046949

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