(code, arduino=None)
| 4 | |
| 5 | |
| 6 | def 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 | |
| 19 | def send_list_of_codes(code_list): |
no outgoing calls
no test coverage detected