<commit_before>#!/usr/bin/env python3

"""
Created on 21 Aug 2019

@author: <NAME> (<EMAIL>)
"""

import time

from scs_dfe.interface.pzhb.pzhb_mcu_t2_f1 import PZHBMCUt2f1

from scs_host.bus.i2c import I2C
from scs_host.sys.host import Host


# --------------------------------------------------------------------------------------------------------------------

header = PZHBMCUt2f1(PZHBMCUt2f1.DEFAULT_ADDR)
print(header)


# --------------------------------------------------------------------------------------------------------------------

try:
    I2C.open(Host.I2C_SENSORS)

    ident = header.version_ident()
    print("ident: [%s]" % ident)

    tag = header.version_tag()
    print("tag: [%s]" % tag)

    print("-")

    v_batt = header.read_batt_v()
    print("v_batt: %0.1f V" % v_batt)

    c_current = header.read_current_count()
    print("c_current: %d" % c_current)

    print("-")

    print("LED...")
    on = True

    for _ in range(10):
        header.led1(on)
        on = not on
        time.sleep(2)

    # exit(0)

    print("button...")

    header.button_enable()
<commit_msg>Changed Praxis LED colour scheme.<commit_after>#!/usr/bin/env python3

"""
Created on 21 Aug 2019

@author: <NAME> (<EMAIL>)
"""

import time

from scs_dfe.interface.pzhb.pzhb_mcu_t2_f1 import PZHBMCUt2f1

from scs_host.bus.i2c import I2C
from scs_host.sys.host import Host


# --------------------------------------------------------------------------------------------------------------------

header = PZHBMCUt2f1(PZHBMCUt2f1.DEFAULT_ADDR)
print(header)


# --------------------------------------------------------------------------------------------------------------------

try:
    I2C.open(Host.I2C_SENSORS)

    ident = header.version_ident()
    print("ident: [%s]" % ident)

    tag = header.version_tag()
    print("tag: [%s]" % tag)

    print("-")

    v_batt = header.read_batt_v()
    print("v_batt: %0.1f V" % v_batt)

    c_current = header.read_current_count()
    print("c_current: %d" % c_current)

    print("-")

    print("LED...")
    on = True

    for _ in range(10):
        header.led1(on)
        header.led2(on)
        on = not on
        time.sleep(2)

    # exit(0)

    print("button...")

    header.button_enable()

{'fraction_non_alphanumeric': 0.32418069087688217, 'fraction_numerical': 0.023472099202834367, 'mean_word_length': 1.4134615384615385, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7140002', 'n_tokens_mistral': 791, 'n_tokens_neox': 741, 'n_words': 137}