Closed cparrapa closed 3 years ago
Max in https://wikifactory.com/+OttoDIY/forum/category/NzI?thread=MzYxNTc1 says
¨¨i find that Nano mega328 is not on the supported list of webUSB devices - with the implication something in the architecture will not allow/ support webUSB. https://github.com/webusb/arduino/ So the already suggested solution here of using a supported board is likely to be the simplest solution. Although Nano 33 IoT is not as cheap a board. I will dig into the Architecture requirements of webUSB and also what architecture the Nano mego328 has in this regard. An important factor here is that the www.arduino.create.cc web IDE will connect with a nano mega328 no problem on both Chromebook and Macos - so it can be done, and Arduino have the code !¨¨
Meanwhile i am intrigued as to why webUSB cannot connect to nano mega328 yet the Arduino Web Editor can. On Chrome OS the Arduino Web Editor is made up of a Chrome OS Extension for some local config - I figure that reverse engineering this extension will show some interesting info. It loads a background page ( similar tactic to webUSB ) - however here it has a wider array of what it terms 'board Flashers' including descriptions for AVR boards and the corresponding Functions.
It could be that the whole serial port functionality is set out in plain old js in the Extension. I will take a more forensic look and post up some samples of the code i find. Someone else may spot something they recognize in serial port communications.
So initial conclusion to the OP : USB comms for Blockly The solution for browser based Blockly would be to follow the lead of Arduino in the Web Editor. That would mean developing a Chrome OS Extension for Chromebooks ( Arduino's version is 26k lines of code ) AND for MacOS a similar Plug In users would have to install.
That is what Arduino have done and it works. Their Create Plug In code is available on GitHub... Their Chrome OS extension is in plain JS. Both would require some considerable work to port to support Blockly. I will look through the Chrome extension code to see what can be cut out and how generic it is, at least that will give a view of how much work would be involved to port it.
This one somehow it works with Arduino nano https://lab.open-roberta.org/ They have a pre-installed driver on the Nano board: https://jira.iais.fraunhofer.de/wiki/display/ORInfo/Set+Up+Nepo4Arduino They also do the same as Arduino, which is to install a Plug-In on the host OS: https://jira.iais.fraunhofer.de/wiki/display/ORInfo/Open+Roberta+Connector
This has been solved in the new Online version that uses Arduino Create Plugin Give a try here! https://ottoschool.com/blockly
I might be missing something obvious, but what "agent" do I have to have installed on a chromebook in order to have https://ottoschool.com/blockly be able to see a Nano to upload code?
Hi @Haxim
For the online version you need to:
Wait a bit and your Otto will be walking!.
The first 5 steps only need to be done one time (setup).
How to modify the config.ini file on Chrome OS ?
@brendonhatcher suggestion to Mac and Linux users:
Use Arduino Nano 33 IOT Module (same pins, still fits the project board) in order to use WebUSB with a web version of Blockly making it compatible with all platforms.