MCPcopy Create free account
hub / github.com/danielweidman/pixmob-ir-reverse-engineering / send_one_code

Function send_one_code

python_tools/send.py:6–16  ·  view source on GitHub ↗
(code, arduino=None)

Source from the content-addressed store, hash-verified

4
5
6def send_one_code(code, arduino=None):
7 if arduino is None:
8 arduino = serial.Serial(port=cfg.ARDUINO_SERIAL_PORT, baudrate=cfg.ARDUINO_BAUD_RATE, timeout=.1)
9 try:
10 print(code)
11 arduino_string_ver = funcs.bits_to_arduino_string(code)
12 arduino.write(bytes(arduino_string_ver, 'utf-8'))
13 input("Press enter for next")
14 print("Command sent to Arduino.")
15 except ValueError as e:
16 print(e)
17
18
19def send_list_of_codes(code_list):

Callers 1

send_list_of_codesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected