Exemple #1
0
def tty_tx_ctl(c):
    """
  transmits a control character
  """
    teletype.tx_ctl(c)
Exemple #2
0
key = 3

GPIO.setup(key, GPIO.IN)

#print(GPIO.input(key))
print(1 - GPIO.input(key))
#b = (1 - GPIO.input(key))
#print(b)

GPIO.add_event_detect(key, GPIO.RISING, bouncetime=130) #add rising edge detection on GPIO 23

a = []
d = 0.020
e = 0.030
s = 0 #ltrs mode by default
tx_ctl('ltrs') #sent printer to letters mode on start

#lookup dictionary for ltrs
asciiltrs_to_binstr = {
  'A'  : '00011',
  'B'  : '11001',
  'C'  : '01110',
  'D'  : '01001',
  'E'  : '00001',
  'F'  : '01101',
  'G'  : '11010',
  'H'  : '10100',
  'I'  : '00110',
  'J'  : '01011',
  'K'  : '01111',
  'L'  : '10010',
Exemple #3
0
def tty_tx_ctl(c):
  """
  transmits a control character
  """
  teletype.tx_ctl(c)