Closed Developer-Mike closed 1 year ago
Pybricks currently only supports Bluetooth communications. Please see #262 for more info.
Thank you for your blazingly fast response. So I guess that this is an example that would fit my case.
Yes, that is the simplest way to use Bluetooth with Pybricks on EV3.
Although I should also mention on EV3, it is possible to have a network connection over USB too, so you can use basic networks sockets if you know how to do that.
Can you elaborate further? What do you mean by a network connection over USB? Do you mean a connection to the network over the PC?
Out of the box, ev3dev is set up to create a network connection to the host computer over USB. https://www.ev3dev.org/docs/tutorials/connecting-to-the-internet-via-usb/
This is what allows connecting to the EV3 via SSH either for a remote terminal or transferring files with SCP.
But since it is just a basic network connection, you can do TCP/IP, e.g. using the MicroPython socket module.
Thank you so much. Because I'm connected to the network of the PC the IP address for connecting from the brick to the computer should be 127.0.0.1. Correct?
No, 127.0.0.1
is the localhost address, so would be the address of the computer itself. When connected, the IP v4 address of the EV3 is shown on the screen on the EV3. You can also resolve the hostname ev3dev.local
to get the address (replace ev3dev
if you changed the hostname of the EV3).
Worked! Thank you so much 😊
Question Is it possible to communicate between the EV3-Brick and the PC through USB?
Context I'm trying to make a Mindstorms robot that plays a game using the Minimax algorithm. The problem is that the brick is too slow to calculate those moves.