Close

Digging into the existing options

A project log for Barnabas Robotics - Interactive Curriculum

Curriculum beyond worksheets

andrew-thomasAndrew Thomas 07/05/2019 at 19:260 Comments

With my goal being something along the lines of allowing students to directly upload to arduino from a curriculum portal, today I will try to at least upload from a web browser. Let's start with BlocklyDuino since visual programmers can reduce the barrier of entry and are used more frequently in younger classrooms. You can try BlocklyDuino out here and you will see an upload option. Here it expects a local web server running at localhost:8080 (127.0.0.1:8080) and more specifically a small python server that will

  1. attempt to find arduino on the host 
  2. attempt to find the connected USB
  3. parse out the command 
  4. send the converted c code to arduino

This file had to be edited to work properly on linux, arduino had to be installed, and the user had to be added to the appropriate arduino groups (lock and dialout) I could not connect to the USB on SilverBlue and my assumption is because I am sandboxed behind the devices so I am going to try this on a normal Fedora workstation where arduino is already installed and I have successfully uploaded files in the past. 

....

Discovered that Fedora 30 drops python 2 so BlocklyDuino is is out of date.  Tried to convert to Python 3 and was almost successful. There were too many changes to the http.server module s I moved over to an Ubuntu 18.04 machine. Once I had the pyhton server loaded I realized I had to

sudo apt install arduino

and add user to the `dialout` group. Almost there and bam I hit a bad file selected -> ! "Processing can only open its own sketches and other files ending in .ino or .pde" which looks like a Java (Arduino IDE) error message showing 

 java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver

Well now, I am not sure which laptop I actually got further but it is apparent that uploading to a USB from the browser is difficult. After saying that, I guess  my search moves to how to communicate to a usb device from the browser. 

Discussions