Git Product home page Git Product logo

vscode-ev3dev-browser's Introduction

ev3dev browser for Visual Studio Code

This extension allows you to browse ev3dev devices from Visual Studio Code, send files to these devices and remotely run programs.

Learn more about ev3dev at http://www.ev3dev.org.

Requirements

This extension is only compatible with devices running ev3dev-stretch. It will not work with earlier versions of ev3dev.

Additional information can be found on the wiki.

Features

  • Discover devices: Any connected ev3dev device should be automatically discovered. No configuration necessary.

    Device connect button screenshot

    Device quick-pick screenshot

  • Remotely browse files: Files for each device are listed just as they are in Brickman.

    File listing screenshot

  • Download files to the device: The current VS Code project can be sent to an ev3dev device with a single click.

    Download button screenshot

  • Remotely run programs: Click any executable file to run it.

    Run quick-pick screenshot

    Right-clicking works too.

    Run context menu screenshot

    Error messages will be displayed in the output pane.

    Output pane screenshot

  • Build, Download and Run with a single click (or F5): Create a launch.json file with an "ev3devBrowser" type to use this feature.

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Download and Run",
                "type": "ev3devBrowser",
                "request": "launch",
                "program": "/home/robot/${workspaceRootFolderName}/hello",
                "preLaunchTask": "build"
            }
        ]
    }
  • Start a remote SSH session: You can start an SSH session in the terminal pane by right-clicking on a device.

    Device context menu screenshot

  • Take a screenshot: You can easily take screenshot by right-clicking a device.

    Device context menu screenshot

    Meta screenshot

Extension Settings

This extension contributes the following settings:

  • ev3devBrowser.password: If you changed the password on your ev3dev device, you will need to set the password here. If you want to manually enter the password when you connect or use public key authentication, set this to null.
  • ev3devBrowser.env: If you need to set environment variables for running remote programs, you can set them here. Each variable is defined as a key/value pair.
  • ev3devBrowser.interactiveTerminal.env: This is similar to ev3devBrowser.env but the environment variables are only applied when running a program in the interactive terminal.
  • ev3devBrowser.download.include: Use this to specify which files to included when downloading files to the remote device. Can use glob patterns.
  • ev3devBrowser.download.exclude: Use this to specify which files to exclude when downloading files to the remote device. Can use glob patterns.
  • ev3devBrowser.download.directory: By default files are downloaded to a folder with the same name as the VS Code project. Use this setting to save the project files somewhere else. Paths are relative to the /home/robot directory.
  • ev3devBrowser.additionalDevices: A list of additional devices to show in the list when connecting to a device. This should only be needed in cases where there are network problems interfering with device discover.
  • ev3devBrowser.confirmDelete: Setting to false will suppress the confirmation message when deleting a remote file or directory.
  • ev3devBrowser.connectTimeout: The connection timeout when connecting to a device. Longer times may fix "Timeout while waiting for handshake".

More details and examples on the wiki.

vscode-ev3dev-browser's People

Contributors

dlech avatar wasabifan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-ev3dev-browser's Issues

Add option to refresh directory tree

Currently, when I create a file outside of VSCode (e.g., wget or curl a setup script) I must disconnect and reconnect to force the tree to refresh. It would be helpful if I could instead click a "refresh" button to do so on-the-fly.

Font for wifi passcode entry is too large

In the 15/7/2018 Stretch image the problem of a too-large font being used in the Wifi passcode entry page is still present. This makes the E and F look identical, and the I and L look almost identical. See attached image. I don't know whether this is also a problem in Jessie.
ev3dev-2018-06-06-17-41-03

Add option to automatically attempt to reconnect after connection drops

If using a flaky communication method (either because of the transit itself or because of CPU saturation dropping connections), it would be nice if the extension would automatically try to reconnect once or twice after losing communications. Alternately, at least prompting the user to try and reconnect would be good.

Illegal argument: pattern when downloading project

I flashed a new SDcard with the 10/24 stretch release, and have 0.7.0 of the plugin running in vscode.

The plugin can find the brick, and give system information. But when I try to download the project I get an error "Illegal argument: pattern" and nothing is sent to the brick.

I tested this with nothing in my user settings, and also the following line:
"ev3devBrowser.download.include": "**/*.py"

both get the same error messages.

Improve documentation on download.include/exclude file globbing

A suggestion on improving the documentation on the ev3devBrowser.download.{include,exclude} settings.

I run vscode from a virtualenv to keep projects isolated. But the virtualenv has a bin, lib and include directory which keep getting downloaded to the EV3 every time I download the project. I struggled to make sense of the file globbing in the include/exclude settings. I wanted to exclude bin/ lib/ and include/ and all . files, but include everything else.

Studying the plugin code the line I saw that this is how files are iterated over for download:
const files = await vscode.workspace.findFiles(includeFiles, excludeFiles);
but I couldn't figure out how to exclude certain directories.

Maybe some sample documentation on the wiki would help.

Request for fixed version of March 16 Stretch EV3 image

I like very much the VS Code EV3 extension – it will make it very easy for beginner Python programmers (my target audience) to code for the EV3. But the extension is compatible only with Stretch versions of ev3dev, and so far no Stretch version has been published which does not have major problems. Versions up to and including March 16 2018 had a 'brickd hyperactivity' bug and versions since then (in the words of @dlech)

include a major kernel upgrade from 4.9 to 4.14, so I suspect there will be multiple new issues related to this.

@dlech suggested in ev3dev/ev3dev-lang-python#455 that

if you want an older kernel with fixed brickd, I would suggest using an image older than 14 April and just upgrade the brickd package, but not the kernel (sudo apt update && sudo apt install brickd).

I've done this, and the updated version works very well. But this update requires an internet connection for the EV3, which beginners might find tricky to set up. Windows users, in particular, will never be able to set up reliable Internet Connection Sharing since, as stated on ev32dev.org,

Windows Internet Connection Sharing is temperamental. Sometimes it just stops working for no reason.

If it can be made possible for beginners to get started programming for the EV3 in Python in VS Code without ever needing to connect the EV3 to the internet that would be ideal. (Tethering would also be appropriate, but there are still no instructions available for setting up USB tethering for Windows.) Therefore I request that a Stretch image be published that would simply be the March 16 version but with the brickd update already applied. That would make it possible for the first time for a Stretch image to be installed that is very useable without modification. If such an image is published I would suggest that its name should be 'backdated' to snapshot-ev3dev-stretch-ev3-generic-2018-03-17.img.xz since it would be only a slightly modified version of snapshot-ev3dev-stretch-ev3-generic-2018-03-16.img.xz and since later versions are very different. Of course, the new release would not contain any Jessie versions and if it doesn't contain anything for RPi or Beaglebone then I would have no problem with that.

Document build steps

We should add build steps to the README. Current list I have is:

git clone https://github.com/ev3dev/vscode-ev3dev-browser
cd vscode-ev3dev-browser
npm install
code .

And for building the native module:

npm install -g browserify nexe upx
./build-native.{bat,sh}

It'd be good to test that to confirm that nothing else is required. I recall performing some extra steps after cloning for the first time. Also, I'm just guessing on the native module front.

Remember most recent upload location

It would be nice if the "upload" feature remembered the most recent upload location.

Use case: uploading a datalog file to the same location each time.

vscode-ev3dev-browser runs programs from home rather than current directory

The working directory is not the folder in which a file was started. This produces inconsistencies with brickman, for instance when creating a datalog.txt file. They end up in different places.

To reproduce, create a file test.py, placed in /home/robot/python, and run from VSCode

#!/usr/bin/env python3
import os
import sys
print("Current working directory: " + os.getcwd(),file=sys.stderr)

Output:

Starting: brickrun /home/robot/python/test.py
Started.
----------
Current working directory: /home/robot
----------
Completed successfully.

Versions


vscode-ev3dev-browser 0.7.0

========== ev3dev-sysinfo ==========
Image file:         ev3dev-stretch-ev3-generic-2017-10-24
Kernel version:     4.9.49-ev3dev-1.5.1-ev3
Brickman:           0.10.0
ev3devKit:          0.5.2
Board:              board0
BOARD_INFO_HW_REV=7
BOARD_INFO_MODEL=LEGO MINDSTORMS EV3
BOARD_INFO_ROM_REV=6
BOARD_INFO_SERIAL_NUM=001653420A17
BOARD_INFO_TYPE=main

A bit like this only now for the vscode ev3dev browser 😄

"Delete" option shown for home directory

Currently, the /home/robot directory entry in the device browser pane shows a "delete" option in the context menu. It fails to actually delete the directory as root permissions are required. It does, however, delete the contents of the home directory.

Only connect to one device at a time

I know most people only have one EV3, but I am lucky to have many such toys. But I have found it annoying to have more than on device listed in the browse list at a time.

We should only connected to one device at a time, so we will need to change how we discover devices and connect.

ev3dev/ev3dev#788 (comment)

RUN <executable> fails

Running commands from the extension fail with error 127 (bash: No Brickrun found).
Tried installing brickrun on ev3dev, but that has cmake 3.5 dependency that's not buildable on ev3.

Any suggestions, fixes, or workarounds?

Upload command

It would be nice to upload files from the device to your computer.

Connect to Device Dialogue not Appearing

Arch Linux (rolling release, up-to-date)
Bluetooth 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1)

Code (vscode)
Version: 1.29.1
Commit: bc24f98b5f70467bc689abf41cc5550ca637088e
Date: 2018-12-06T23:12:09.502Z
Electron: 2.0.14
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

ev3dev
brickman v0.10.0
Kernel: 4.14.80-ev3dev-2.3.1-ev3
Model: LEGO MINDSTORMS EV3
Revision: 0000

"Click here to connect a device"
Clicking does nothing...no dialogue appears.

Using "ev3dev/vscode-hello-python" I attempt to run hello.py and I am prompted with "No ev3dev device is connected."
I click "Connect now" button on prompt...the prompt disappears and nothing more happens.

I was unable to get anything to work with a USB cable connection however I can and am connected via SSH over Bluetooth during all of the above.

Can't kill running script after starting it from launch task

After launching a script which doesn't exit (e.g., by hitting F5) the debug page shows an "in progress" scrolling bar:

image

It never gets to the typical point of a debug session where the command menu appears along the top that would let you stop the debug session. Hence, I can't find a way to kill the script from VSCode.

Edit: For future readers, you can kill it by physically pressing the "back" button on the brick (unless you've reconfigured brickrun).

Trying to run a binary with invalid binary format causes strange errors

It seems that if you try to run a non-ARM binary, for some reason, ssh tries to run it as a shell script.

Example:

$ file hello
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
Starting: conrun -e /home/robot/ev3-vscode-go/hello
Started.

/home/robot/ev3-vscode-go/hello: 1: /home/robot/ev3-vscode-go/hello: �ELF����: not found
/home/robot/ev3-vscode-go/hello: 2: /home/robot/ev3-vscode-go/hello: ��: not found
/home/robot/ev3-vscode-go/hello: 3: /home/robot/ev3-vscode-go/hello: ����: not found
/home/robot/ev3-vscode-go/hello: 1: /home/robot/ev3-vscode-go/hello: �: not found
/home/robot/ev3-vscode-go/hello: 1: /home/robot/ev3-vscode-go/hello: X: not found
/home/robot/ev3-vscode-go/hello: 4: /home/robot/ev3-vscode-go/hello: �J�J*w
*w
���XB�8��Q�td�����e*�����@���: not found
/home/robot/ev3-vscode-go/hello: 5: /home/robot/ev3-vscode-go/hello: �A���J�: not found
/home/robot/ev3-vscode-go/hello: 6: /home/robot/ev3-vscode-go/hello: Syntax error: "(" unexpected
Exited with error code 2.

USB connection dropping out

from @ndward ev3dev/ev3dev#1022 (comment)

Another thing I've noticed is that although my USB connection to the EV3 has always been very stable I have lost it several times this evening – I just saw it fail a few seconds ago for no apparent reason (when I was doing nothing), for example. The connection via USB doesn't seem to last more than 10 or 20 minutes. I haven't tried wireless connections with the new image.

Cancelling device connection during "download and run" does not stop debugger

If you begin a "download and run" debug session when no device is connected, the extension will prompt for you to connect to a device, then connect and continue with the debug session.

However, if you cancel instead of select a device, the debugger continues to "run" and you have to manually have to click the "stop (icon)" button.

Can't have multiple SSH shells open at once

Using the current version from master, if I open an SSH shell, it works as expected. If I click the button again, however, an empty terminal pane is displayed and no output is produced.

Allow canceling download of large files

Spin off of #37.

We can currently cancel downloading many files by finishing the download of the current file and skipping the rest. However, it would be nice to be able to cancel the download of a large file in the middle of the download as well.

This will require changing the implementation of the Device.put function to be cancelable instead of relying on the ssh2 module fastPut. It will probably also require that we save the remote file with a different name and then rename/replace the file with the correct name so that we don't end up with half of a file on the remote device.

Harden implementation of SSH terminal

Currently, the SSH solution is to invoke the user's default shell and pass it an argument to run an SSH client. This has a few issues:

  • It requires that the SSH client is present in the terminal's working directory
  • It requires the user-chosen terminal to conform to the extension's assumption of the input format
  • It depends on the user-chosen terminal's handling of escape codes

This could easily cause issues. When I originally looked into this problem, I began by directly creating a terminal with the SSH client as the shell -- e.g., plink on Windows. This worked well and was as system-independent as possible, however the escape codes that the server produced had some quirks that weren't handled correctly. I looked into writing a wrapper app to handle those, but that hit a dead end; I simply couldn't find a way to invoke a Node.js app as the terminal and didn't have much interest in writing such a wrapper as a CMD script.

We should definitely look for a better way of handling the SSH sessions to increase reliability and remove as much dependence on the user's system as is reasonable.

No run command

After downloading a source file to the brick, right-clicking on the file in the browser no longer provides a "Run" option for me. I have ensured that the downloaded file is executable and has the correct shebang. Also, I tried it on another computer, and it had the same behavior. The only two options are "Delete" and "Show details". I know it had the run option last Thursday, so I would guess one of the recent commits broke this for me. Both computers are Windows 10 with the latest update of VScode (1.17.2) and version 0.6.0 of the extension. Thanks!

extension not visible in explorer

The extension was previously visible and fully working in the explorer view of Visual Studio Code.
Now it doesn't show up (see image below) and after reinstalling it still no longer shows up.
I'm using the example project of vscode-hello-python-master without any modifications.
Is there any setting or configuration that controls whether this view is visible within explorer?
ev3dev-browser

Use a Global Launch Configuration?

I'm using VS Code 1.27.2 (user setup) which I just installed today on my Windows 10 PC.

As you probably know, I have sites to help beginners get started with ev3dev Python, and I'm not an expert myself. I've had messages from people whose scripts have failed because they have not got a correctly set up .vscode folder in their project folder. Until now I thought (and have been telling my users) that to use ev3dev Python you must open a folder containing your scripts (rather than opening a loose script) and that that folder (the project folder, or 'workspace', as far as beginners are concerned) must contain a .vscode folder with at least a settings.json file and a launch.json file.

I now think that although it's true that users must open a folder containing their EV3 scripts, the rest is not correct, and that it's not obligatory for the open project folder to contain a .vscode folder at all.
Many users will, like me, have scripts in a number of folders (some will have one script per folder) and it's not ideal that each of these folders has to have a .vscode folder with appropriate settings and launch files. It's likely that some folders will accidentally contain different settings and launch configurations and that some may contain invalid configurations or none at all.

I've known for a while that it's not necessary to have a settings.json file in the.vscode folder in the project folder because those settings (Workspace Settings) can be moved to User Settings. Once in User Settings they then apply to all scripts except when overridden by the presence of a Workspace Settings file (settings.json in the .vscode folder in the project folder).

Today I discovered that it's also possible to move the launch configuration in the User Settings, so that they apply to all scripts by default as long as they are not overridden by the presence of launch configurations in the workspace settings.

My User Settings currently look like this:

{
    "launch": {
        "version": "0.2.0",
        "configurations": [{
            "name": "Download and Run",
            "type": "ev3devBrowser",
            "request": "launch",
            "program": "/home/robot/${workspaceRootFolderName}/${relativeFile}"
        }]
    },
    "editor.renderControlCharacters": false,
    "git.ignoreMissingGitWarning": true,
    "workbench.activityBar.visible": true,
    "editor.renderWhitespace": "none",
    "workbench.statusBar.visible": true,
    "ev3devBrowser.confirmDelete": false,
    "files.autoSave": "off",
    "window.zoomLevel": 0,
    "ev3devBrowser.download.exclude": "{**/.*,LICENSE,README.md}",
    "files.eol": "\n",
    "editor.autoClosingBrackets": "never",
    "python.pythonPath": "C:\\Users\\Nigel\\AppData\\Local\\Programs\\Python\\Python36\\python.exe"
}

The launch item is what I just moved from launch.json. I think the last two lines were added by me. I think the two previous lines were added by the ev3 browser extension. I don't know where the other lines came from.

I've removed the .vscode folder from my project folder and my ev3 python scripts run fine when I press F5. My folder also contains some non-EV3 python scripts and I can run those easily too by right-clicking the script and choosing 'Run Python file in terminal'.

As I understand it, one used to work with setting by opening .json files directly but now, even though the old method is still available, the preferred method is to work with a simplified and more fool proof settings editor. From the release notes:
settings_editor

I don't find the new interface intuitive because if you choose User Settings you are not shown only the User Settings but also all the default settings (more than 500 of them). Similarly, if you choose Workspace Settings you are not shown only the Workspace Settings but also all the default settings. Only if you choose 'More Actions > Modified Settings' do you see ONLY the User Settings or Workspace Settings. (In my current setup, Workspace Settings is empty since I have no .vscode folder in my project folder.)

My questions:
Is all of the above correct?
Is it a good idea to encourage beginner users to use User Setting rather than Workspace settings for the EV3 browser configuration? Beginners need simplicity and having the configuration in one place rather than having configuration files in every folder that contains EV3 scripts must be an improvement.
If so, is my configuration file optimal or what improvements could be made?
What are the disadvantages of having the configuration in User Settings as opposed to Workspace Settings?
Is VS Code going to automatically recreate a .vscode folder in my project folder? That would not be helpful, but it wouldn't necessarily override the User settings, depending on the contents of the .vscode folder.
Can I assume that what works for me on Windows 10 is also going to work for Linux and MacOS?

This may be relevant: microsoft/vscode#18401
And this page has a section 'Global Launch Configuration': https://vscode.readthedocs.io/en/latest/editor/debugging/

What PC<>EV3 interactivity is possible while a script is running?

I would like to know what interactivity is possible between the EV3 and the PC when a script has been launched on the EV3 from VS Code. Clearly some data can pass from the EV3 to the PC when print(xxx, file = stderr) is used, but what about the other direction? Is it possible, for example, to use the PC keyboard to remotely control the EV3 robot and if so, how?

I just received this related message from a teacher requesting help:
I am a teacher in France, and I have been programming the Lego EV3 with Matlab Simulink for several years. I want to switch to text programming with students on this medium. With the robot, we are working on trying to realize SLAM. For that, I would like to draw a matrix. Matplotlib is not installed on ev3dev. I tried to install it but without success. And even if I could install it, I'm not sure if I can send the terminal back to the PC with "file = sys.stderr". I did not try with the graphic library Pillow, because I do not think this is the most suitable way. For your information, I work with VS Code. My students worked with the Anaconda Spyder suite and I would have liked to use the same environment, but I followed your valuable advice.

Problem with file and folder names containing spaces

On my Windows 10 machine and using the July 9 2018 Stretch image (and all previous Stretch images) I can't run from VS Code any Python script whose file name contains spaces and neither can I run any Python script that is in a folder whose name contains spaces. For example, when I try to run (F5) a script called motorAtest.py in an open folder called Demo scripts space I get this error:

Starting: brickrun --directory=/home/robot/**Demo scripts space** /home/robot/**Demo scripts space**/motorAtest.py
Started.
----------
Starting remote process failed: Failed to change to directory '/home/robot/**Demo**' (No such file or directory)
----------
Exited with error code 1.

And when I try to run a file called motorA test.py in a folder whose name has no spaces I get:

Starting: brickrun --directory=/home/robot/Demo_scripts /home/robot/Demo_scripts/motorA test.py
Started.
----------
Starting remote process failed: Failed to execute child process "/home/robot/Demo_scripts/**motorA**" (No such file or directory)
----------
Exited with error code 1.

I get the same errors if I right-click the file in the EV3 Device Browser and choose 'Run'.

However, these scripts WILL run correctly if launched from Brickman.

"operation cancelled"

anytime i do f5 or right-click+run a program, a box that says "operation cancelled" appears. I have not changed anything and im using the launch.json file that came with the ev3dev-python starter folder. Can anyone help me?

Make it possible to cancel a download operation

Right now, if you begin a download operation and then decide you want to cancel it, you must somehow kill the session. There should be an option to cancel the download (workspace command, status bar item, etc.). This would likely be implemented as a short-circuit between individual file copy operations.

Handle mulit-root workspaces

VS Code is moving towards multi-root workspaces

New API for multi-root workspaces

New APIs have been added for multi-root workspaces. The "single root workspace" workspace.rootPath variable is now deprecated. Extension authors should use workspace.workspaceFolders which is a WorkspaceFolder array representing the current list of folders opened in the editor. There is a new event that fires when a folder is added or removed and a function getWorkspaceFolder to find a workspace folder for a given resource.

We are using workspace.rootPath, so this needs to be changed.

Bluetooth fails to connect sometimes

When trying to connected to Bluetooth, I frequently get a message similar to "the server is not available" (will need to get exact message next time this happens).

This is probably because of the keepalive timeout. If connecting takes too long, the keepalive closes the connection. The keepalive is already a bit longer than I would like, so I hope we can find an alternative to prevent the connection from aborting without making keepalive longer.

Tests

The VSCode extension template includes a testing framework dependency and a tests file. If we want to implement tests we should, otherwise it would he nice to delete the file and dependency to make things a bit cleaner. I have a hard time imagining we'll be implementing much of any tests, but it's worth discussing.

Device still shows connected when network is physically disconnected

On Windows, we get a ECONNRESET error on the SSH socket as soon as the cable is unplugged. On macOS, there are no errors besides an eventual timeout. We need to find a way to detect the network interface disappearing. Also, we are limited by the fact that we can't use native modules.

Screenshot command

It would be nice to be able to take a screenshot and upload it without using the command line.

Build, download and run in single command.

When working with compiled languages, the edit/run cycle gets a bit tedious because you have to run a command to build, then a command to download, then a command to run.

It would be nice to be able to string these together somehow so that they can be done in a single command/click.

But, it is tricky because the building is a "task" (which can be triggered by a command) and the rest are just commands. I don't see a way to use tasks to call commands. The only option I see to do this is to implement a "debugger" in the extension. This wouldn't actually debug anything, but it is the only extension point that seem to be able to do something like this.

YouTube videos to promote the VS Code workflow

With the fixing of the brickd problem I feel the VS Code/Stretch workflow is working well and is worthy of promotion. I'm not aware of any serious problems other than the incorrect handling of file names and folder names that contain spaces (still not fixed in the 24 May 2018 image) and the font being too large when one types the WiFi password, making it impossible to distinguish E from F or I from L (still not fixed in the 24 May 2018 image).
The ev3dev VS Code / Stretch project is a work in progress (and no doubt always will be) but that should not stop promotion of the workflow now that it works as well as it does. Reasons not to promote the workflow now would include major bugs and major upcoming changes, particularly breaking changes. Are we aware of any bugs? Are there any major upcoming changes? One enhancement that I am particularly keen to see is the introduction of functions to mirror the Move Steering and Move Tank blocks of EV3-G. As webmaster of ev3python.com I regularly get emails from people eager to see such functions. See a discussion here: https://sites.google.com/site/ev3python/learn_ev3_python/using-motors/ev3g-like-motor-functions
I have made two videos, the first to show how easy it is to write and run EV3dev Python scripts using VS Code with the EV3 extension, and the second to show how to set up the EV3 and the computer to enable the workflow.
I made a candidate first video (17 minutes) and published it to YouTube as unlisted. I deleted that one and replaced it with a new one where I no longer speak of the need to switch between configurations - I realised that no configuration is necessary to run non-EV3 files locally: https://youtu.be/cqtRqsI6xMc
The setup video is now also awaiting your comments at https://youtu.be/-ztvWQFagNA
I welcome your comments as to the advisability of publishing such videos now, and specific comments on the videos I just made (errors, things that are not clear…).

Data visualization

@ndward wrote:

I just received this related message from a teacher requesting help:

I am a teacher in France, and I have been programming the Lego EV3 with Matlab Simulink for several years. I want to switch to text programming with students on this medium. With the robot, we are working on trying to realize SLAM. For that, I would like to draw a matrix. Matplotlib is not installed on ev3dev. I tried to install it but without success. And even if I could install it, I'm not sure if I can send the terminal back to the PC with "file = sys.stderr". I did not try with the graphic library Pillow, because I do not think this is the most suitable way. For your information, I work with VS Code. My students worked with the Anaconda Spyder suite and I would have liked to use the same environment, but I followed your valuable advice.

No ev3dev device detected

Any connected ev3dev device should be automatically discovered. No configuration necessary.

I'm probably doing something wrong, but my EV3 does not appear to be detected.

I'm using the ev3dev-stretch snapshot image of 2017-07-25. (I'm no longer using lmscompat, I uninstalled that kernel.)

Connected using ethernet. No problems using SSH outside of VS Code.

ev3devdevices

I'm using Ubuntu 16.04 and the VS Code About Menu reads:

Version 1.14.2
Commit cb82febafda0c8c199b9201ad274e25d9a76874e
Date 2017-07-19T23:26:08.116Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0

vscode plugin disconnects from EV3 after download

The plugin seems to disconnect from an EV3 after downloading a project, or after a short (indeterminate) period of time. I can't seem to maintain a permanent connection to the EV3 from the plugin. I have two ssh sessions open to the EV3 at the same time with no lag in typing on the terminal.

Downloading project from Windows results in folders with backslashes in their names rather than subdirectories

Windows, d310274

Repro steps:

Result:

robot@ev3dev:~$ ls ev3dev-lang-python/
ev3dev/           ev3dev\_platform/ ev3dev\control/   ev3dev\sensor/

I assume there's a .posix missing somewhere in the file path manipulation logic.

========== ev3dev-sysinfo ==========
Image file:         ev3dev-stretch-ev3-generic-2017-09-30
Kernel version:     4.9.49-ev3dev-1.5.1-ev3
Brickman:           0.10.0
ev3devKit:          0.5.2
Board:              board0
BOARD_INFO_HW_REV=7
BOARD_INFO_MODEL=LEGO MINDSTORMS EV3
BOARD_INFO_ROM_REV=6
BOARD_INFO_SERIAL_NUM=00165340720B
BOARD_INFO_TYPE=main

Only download changed files

When your project starts to get big, downloading can take a while. We could try to be smart and only download files that have changed locally since the last time we downloaded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.