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 best solutions below
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
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
- python how to write list of lists to file
- Removing URL features from tokens in NLTK
- Optimizing for Social Leaderboards
- Python : Get size of string in bytes
- What is the code of the sorted function?
Related Questions in VISUAL-STUDIO-CODE
- vscode file icons
- Building C# code in VSCode on Mac
- How do I support jasmine and es6 syntax in Visual studio Code?
- JS Code didn't work, trying do a demo in css lessons
- Debug Java in Brackets editor or Visual Studio Code
- Visual Studio Code, C# support on Windows
- What is the use of the Developer Tools in VS Code?
- Option to push disabled in Visual Studio Code
- How do I include 'System.Runtime.Serialization.Json' namespace in my VSCode project on Mac OS X?
- Using System.Web.Http on mac os x
- VSCode intelliSense autocomplete for javascript
- Set language for syntax highlighting in Visual Studio Code
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Predefined type 'System.Object' is not defined or imported [dnxcore50]
- VS code appending special characters on paste
Related Questions in BLUETOOTH
- Bluetooth connection to Sphero is lost when smartphone "goes to sleep"
- MFi Program by Apple
- Android Wear Device as iBeacon
- android - How to get a iBecon detection state when I kill app from Background?
- IOException: broken pipe when sending file from android device to PC via Bluetooth
- How deploy an large number iBeacons
- Send a Android BLE GATT Notification
- burst notifications with Bluetooth Low Energy on Android
- Is there a way to change bluetooth module's baud rate via Bluetooth connection with Android device?
- NFC Bluetooth handover - WITHOUT user confirmation
- Is it possible to create an app that when installed the user can easily turn Bluetooth/NFC ON and OFF by double clicking the Home button?
- Difference between attributes and services in BLE
- Global name 'bluetooth' is not defined
- iOS Bluetooth list of devices already connected?
- Bluetooth discovery not starting on first click
Related Questions in MICROPYTHON
- ESP8266 Micropython - connecting to University Wi-fi ( WPA2 Enterprise PEAP )
- Are there event callbacks in BBC MicroPython?
- Connecting ESP8266 to IBM Watson with Micropython
- Mount NodeMCU with Micropython filesystem?
- I2C scan with Micropython and NodeMCU 12E returns empty list
- ESP8226 micropython ssl connection issue with SMTP
- Load and compile python file without system file with MicroPython
- getting OSError -202 where running urequests.get from micropy
- Embed aws iot device sdk to Micropython as user C module
- TouchPad Error while reading pin 2 of esp32
- MicroPython: OSError: [Errno 19] ENODEV
- How to execute functions remotely on micropython
- installing micropython library (BNO055/IMU) properly
- MicroPython makes the ESP32 freeze
- Can not read data from uart with micropython and SIM7070G NB on ESP32 controller
Related Questions in LEGO-MINDSTORMS-EV3
- Counting lines with lego mindstorms ev3?
- Lego mindstorms ev3 colour sensor always in reflect mode
- Mindstorms EV3 (Micro Python) - Motor.run() not working
- Send Data between EV3 and PC
- Trying to get a photoresistor to take an analog reading through a wire command to an EV3
- How do I get my code to loop until I press a button (Lego EV3)
- How can Mindstorms EV3 communicate with my PC via Bluetooth?
- arm-linux-gnueabi-g++: .so file not recognized
- Problem with Python and the LegoMindstorms when try to use "print()"
- remote debugging EV3 using gdbserver fails
- I cant set the reset_angle parameter to false in the EV3 using micropythons , im using VSC
- Sending commands from a windows laptop to micropython ev3 using Python
- controlling EV3 motor using Matlab
- Where is the realization of interface located in python module?
- Drive function in MicroPython for LEGO EV3
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)
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?
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?