As an instructor it is important to have your tools at your fingertips. Over time our documents can be found all over the place. This project is about my journey to bring it all together and add in interactive tools. I am hoping to allow our students to write block code and to upload it to their Arduino directly through our online portal. I plan to do this by combining code from the Chromeduino and Blocklyduino open-source projects.
I recently was able to use the experimental features in chrome to make a serial connection to my Arduino Uno. The first thing I had to do was turn it on by going to `chrome://flags` and enabling Experimental Web Platform features. Next I had to write some code to talk to my device and fortunately there is an excellent tutorial at codelabs where you can work your way through a glitch example using a BBC micro:bit, a nifty little learning device. "But Coach Andrew,
Since my earlier struggle with BlocklyDuino and the python server I thought maybe I might discover some amazing techniques to communicate with arduino from ChromeDuino. To access a working version I had to find a chromebook and thankfully we have one in the house. On the chromebook I add the app from the chrome web store, set the server to http://barnabasrobotics.com:8888, and attempted to upload the intro file. On the nano I had connected to the chromebook I saw the Rx SMD flicker like last night's fireworks but unfortunately the behavior did not seem to change. So something is happening but without any feedback I am not sure what happened. As far as ChromeDuino was concerned, it worked with the message "Upload Complete! Have a nice day! :) "
This did not help me much. I opened the Serial Com port and the lack of messages there confirmed the upload failed but with a stubborn desire to get it to work and undying hope I tried a different server. Sadly I received the same results.
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
attempt to find arduino on the host
attempt to find the connected USB
parse out the command
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
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.
I have been struggling with Arduino uploading from Chromebooks in a school network. Technical issues elevate discouragement in the classroom so I am looking to improve the experience for students and instructors. The arduino web editor presented me with challenges that have encouraged me to look for other options and while I attempt to put resources into a common location I thought it might be beneficial to have them all work together. One piece at a time I am learning about many technologies that may or may not cohere.
Currently chromeduino only works as a Chrome app on chromebooks but, late to the game, I have learned that support for this was deprecated / discontinued 2 years ago. You can look this up in a web search and most articles like this one on Ars Technica suggest that Progressive Web Apps are the future and since I am, like I said, late to the game, the future is already here. Sigh.
As I am learning about podman, and containers in general, on my recent install of Fedora Silverblue I thought I would give caterpillar a try. Caterpillar is an "experimental project" [that] "investigates whether it is feasible to automatically port Chrome Apps to web sites".
I did not get very far and the project makes no promises. So... here I am pondering my next steps.
My goal is to have "try it" break outs or on-page sections that allow students to not only follow along with curriculum but upload it to their device. This is exciting to me and might be a ridiculous way to solve a simple problem but that is the direction I am headed. Until then, I will eat the elephant one bite at a time learning about all the exciting tools in the open source universe.