예제 #1
0
def main():
    """Main function as example.
    """

    codeK = Setup()

    # Start the CodeKlavier
    codeK = Setup()
    myPort = codeK.perform_setup()
    codeK.open_port(myPort)
    device_id = codeK.get_device_id()
    print('your device id is: ', device_id, '\n')
    run(codeK)
예제 #2
0
import time
import random
from threading import Thread, Event

import sys
import os
import inspect

# CodeKlavier modules
from CK_Setup import Setup, BColors
from Mapping import Mapping_Motippets
from motippets_classes import Motippets

# Start the CodeKlavier
codeK = Setup()
myPort = codeK.perform_setup()
codeK.open_port(myPort)
device_id = codeK.get_device_id()
print('your device id is: ', device_id, '\n')

# Use your favourite mapping of the keys

mapping = Mapping_Motippets()

print("\nCodeKlavier is ready and ON.")
print("You are performing: Motippets")
print("\nPress Control-C to exit.")

# main memory (i.e. listen to the whole register)
mainMem = Motippets(mapping, device_id)