peer_to_peer.py

# Este trabalho está licenciado sob a licença MIT.
# Copyright (c) 2013-2023 OpenMV LLC. Todos os direitos reservados.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# Exemplo de Ethernet LAN Peer to Peer.
# No PC, tente o seguinte:
#
# $> sudo ifconfig eth0 192.168.1.100 up
# $> ping 192.168.1.102

import network
import time

lan = network.LAN()
lan.active(True)
lan.ifconfig(("192.168.1.102", "255.255.255.0", "192.168.1.1", "192.168.1.1"))

while True:
    # Nada mais a fazer.
    time.sleep(1.0)

results matching ""

    No results matching ""