Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Raspberry Pi WebIDE Update to 0.2.4: Visualize Feature

We have a new alpha release of the Rapsberry Pi WebIDE ready to go.  This version includes a major new feature that allows you to “Visualize” the execution of your Python programs.  I’ll explain how this works in a moment, but first, here is the entirety of the changelog 0.2.4:

  • New visualization feature for Python
  • Added ability to change font sizes in the editor and the terminal
  • New settings manager added, currently only has font size, but more can be added
  • Fix for long file names causing strange wrapping

The font size change was requested by a user of the WebIDE, and it’s a great idea.  So far, the font settings change the editor, and terminal text sizes.  You can access this setting by clicking your username in the upper left of the navigator, once you’re logged into the WebIDE.  Along with this feature, we’ve added the framework for a settings section within the editor, which we’ll start expanding with more settings.  This would be a good place for enabling some of the more advanced feature requests we’ve had.

Ok, now back to the visualizer…

When you open a python program in the editor there is a new button titled “Visualize” that is now enabled.  Clicking this button will execute your program, and open a new section of the IDE that allows you to step through your program.  You’ll be able to see how your program is interpreted..variables being created, functions called, etc.  It’s not a real-time debugger, but it’s likely much more useful to teaching new programmers.  It really helps you understand what is happening when you click “Run”, and see your program output.  That being said, it can also help you debug, as it does show you variables, and you can step through each section of your code.  All of this was possible by the open source library from pythontutor.com.

The way it works is that when you click visualize, a websocket message is sent to your Pi with the file name and relative path.  Then a node.js child process is launched that executes the python tutor program with your script passed in as an argument.  The master python program then opens your script as a file, and passes it in as a string to the class that will then use Python’s bdb debugger to pull out all of the useful details of the execution trace.  It gathers this data, converts it to a JSON representation, and then sends it back to the WebIDE front-end.  The front-end parses the JSON, and launches the ExecutionVisualizer method that knows how to display it each step of the way.  The Frame and Object stacks are html tables, but using jsplumb, and d3 to draw the arrows and lines connecting everything together.

We’re hoping we can expand this in the future, such as getting it to work with relative imports, possibly adding breakpoints, or any other features that are requested that would be useful.

Upgrading from 0.2.0 and higher

To install this new editor, you’ll want to completely remove your old editor, and run the installation script again.

  1. Ensure that your code is safely saved in your repository at bitbucket.org.
  2. Login to the editor.
  3. Click Update in the upper right.
  4. Update should take about a minute.

Upgrading From 0.1.9 and lower

To install this new editor, you’ll want to completely remove your old editor, and run the installation script again.

  1. Ensure that your code is safely saved in your repository at bitbucket.org.
  2. Uninstall using the following script
    1. curl https://raw.github.com/adafruit/Adafruit-WebIDE/release/scripts/uninstall.sh | sh
  3. Either make sure there are no rogue node processes running, or restart your Pi.
  4. Install the new and improved WebIDE
  5. curl https://raw.github.com/adafruit/Adafruit-WebIDE/alpha/scripts/install.sh | sudo sh

Also, follow this link to the GitHub repository for the project.



Adafruit has had paid day off for voting for our team for years, if you need help getting that going for your organization, let us know – we can share how and why we did this as well as the good results. Here are some resources for voting by mail, voting in person, and some NY resources for our NY based teams as well. If there are additional resources to add, please let us know – adafruit.com/vote

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 24,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


Maker Business — To make it through a tough business cycle, layoffs should be a last resort

Wearables — Rub’n’buff

Electronics — Multimeter Bandwidth – AC Signal

Python for Microcontrollers — Python on Microcontrollers Newsletter: CircuitPython 6 Release Candidate, new hardware & more! #Python #Adafruit #CircuitPython #ElectronicHalloween @micropython @ThePSF

Adafruit IoT Monthly — Matrix Portal, Solar Lawn Sprinkler and more!

Microsoft MakeCode — micro:bit version 2 Announced!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 10/21/2020 Featuring #Adafruit Voice Bonnet for Raspberry Pi – Two Speakers + Two Mics! @adafruit #newproducts

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.