for further reading and alternative solutions:
DeprecationWarning: There is no current event loop
parser.add_argument('--device', '-d', default='/dev/ttyACM0', help='Device where Arduino is connected to')
args = parser.parse_args()
logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s')
- loop = asyncio.get_event_loop()
+ loop = asyncio.new_event_loop()
coro = serial_asyncio.create_serial_connection(loop, Receiver, args.device, baudrate=115200)
loop.run_until_complete(coro)
loop.run_forever()