I am programming a EV3 in microPython 2. I have another python 3 program running on a laptop and this program should send data to the EV3 wirelessly. Is it possible via bluetooth? If it isn't possible how should I do it?
How can Mindstorms EV3 communicate with my PC via Bluetooth?
3.6k views Asked by vargaking At
2
There are 2 answers
0
Molly Wang-MSFT
On
About communication between EV3 and python code running on a laptop, First we need to install the module python-ev3dev2 with the command:
pip install python-ev3dev2
About its usage, you can refer to ev3dev2.
Ensure that your ev3dev device is turned on and has a network connection to the host computer. Here Bluetooth works and there's a demo you can refer to: vscode-hello-python.
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in VISUAL-STUDIO-CODE
- Is there a way to prevent vscode from forwarding ssh agent to remote dev container?
- flutter Null check error: did not show file and line number
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- trouble with creating a project for Pymakr in vscode
- Compiling c++ code by VS Code is always blocked by clang-tidy error 'Error running 'clang-tidy'
- Disable typescript in VS Code
- couldn't sign in visual studio code
- I can't add text to "Message" in VS Code when committing to Git
- Cannot type single backtick in VSCode
- WebScraping doesnt work, even without error
- Visual Studio Code keeps discovering python interpreters forever and vscode-server on remote is busy 100%
- vscode uses different cocoapods version when running a task
- Live server extension in VS Code works in background but do not pop the web browser
- How to recover deleted files from create vite react project
- Autocomplete not working for apache spark in java vscode
Related Questions in BLUETOOTH
- React native - how can i listen callBack function
- java android: how to send data on Bluetooth between android and computer
- Pair bluetooth device to Android 12 phone by selecting my own pin
- Bluetooth virtual sniffer for windows
- PyBluez connection problems
- How to set value the descriptor of iOS BLE in Objective-C?
- python script using bluetooth running on windows 11 vs raspberry pi4
- Mobile printing PT200 tru Bluetooth opened in web app
- PlatformException(connect_errd or timeout)
- Bluetooth Driver file corrupt or replaced
- Bluetooth driver Failed and unable to install bluetooth driver for jammy ubuntu
- strange Flutter bug on turning on/off bluetooth permission using IOS device
- Call requires permission which may be rejected by user code should explicitly check to see if permission is available
- Error during getting android Bluetooth device RSSI from Windows 10 using BlueCove library
- Error in Bluetooth specification? Heading field of Location and Speed
Related Questions in MICROPYTHON
- trouble with creating a project for Pymakr in vscode
- Micropython: _thread module imported but not showing methods
- Using MAX 9814 PCM data to create a .WAV file
- X is not defined but x has been defined
- Does any wasm runtime has a support for micropython (For RPI_PICO board)
- Is there a way to read serial input and run multple functions while retaining memory?
- OSError: [Errno 1] EPERM connecting to WLAN on Raspberry Pi Pico W
- Printing an exception that works on Micropython/CircuitPython AND desktop python
- Buffersize to small
- MicroPython Socket sends strings without encoding
- How to extract access token from redirect URL without full libraries?
- Is utime.ticks_diff() safe to run in a ISR?
- How can I fix that my variable goes into the formatted string of my html code in python
- Typing a class decorator
- Problem in connecting esp32 to local MQTT broker
Related Questions in LEGO-MINDSTORMS-EV3
- playing sounds using EV3DEV without ev3dev2 in micropython
- A star Pathfinding algorithm with Lego Mindstorms ev3
- Mindstorms EV3 (Micro Python) - Motor.run() not working
- Lego mindstorms ev3 colour sensor always in reflect mode
- Counting lines with lego mindstorms ev3?
- connection denied when trying to connect to ev3dev
- Error building LEGO Mindstorms EV3 project in MATLAB / Simulink on Linux
- How to loop a thread in ev3dev(Python)
- How to control Hitechnic motors with ev3 brick
- LEGO EV3: unsupported operand type(s) for *: 'NoneType' and 'NoneType'
- Problem running ev3dev on visual studio code
- I can't install python libraries with sudo easy_install3 on ev3dev
- I cant set the reset_angle parameter to false in the EV3 using micropythons , im using VSC
- Cross compile shared library for armv5te-unknown-linux-gnueabi Rust [Mindstorm Ev3dev]
- Lego Mindstorms - Server Client messaging between PC and Ev3
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
I don't know the answer to this and I don't have an EV3 brick to try this with. As you haven't said what you have tried, I thought I would share some ideas for experiments to try.
I looked at the ev3-micropython documentation about Bluetooth and my search gave me this: https://pybricks.github.io/ev3-micropython/messaging.html
This looks like the Bluetooth communication might be based on Bluetooth Serial Port Profile (SPP) so it might be worth seeing if SPP clients can communicate.
A first experiment might be to start a BluetoothMailboxServer on the EV3 and see if are you able to pair with it from your PC? (By the way, what OS are you running on your laptop?).
If you have Windows, do these instructions from this URL help: https://www.instructables.com/id/Raspberry-Pi-Bluetooth-to-PuTTY-on-Windows-10/
On a Linux laptop, does creating a client this way work: http://blog.kevindoran.co/bluetooth-programming-with-python-3/
Another alternative on Linux, is create a client this way: https://bluedot.readthedocs.io/en/latest/btcommapi.html#bluetoothclient
If you have an Android phone, you could try pairing with the EV3 service from the phone and then trying to connect with this SPP app: https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal
The other alternative is that the BluetoothMailboxServer might be using Bluetooth Low Energy (BLE). If that is the case, then you can find more information if you have a recent version of the Chrome browser on your laptop. Go to the URL
chrome://bluetooth-internals/#devicesand do astart scan. Does the EV3 device turn up?