BTW.1, STM32@48MHz, 16K Flash, 4K SRAM appear to be competitive to low-end Arduino boards.
BTW.2, there are thin wrapper boards built over TB6612FNG (dual, quad) that are available for 0.5 - 2 $ from Ali or european sellers. Sometimes sold as HG7881, L9110.
There's a V1 and V2 board - they use different libraries
I've got a V1 board
I'm thinking that it may be better to switch away from the WEMOS D1 mini approach and use a NodeMCU (also EPS8266 based) with it's motor shield
It seems to be more readily available at the moment and has the advantage of being much simpler to control as it just a simple H-Bridge controller directly driven from 4 of the ESP pins without any of the faff of I2C
I've got one working at the moment
[edit] 5Jul22 09:00BST
I decided to try just having a simple Arduino sketch to read the serial port (until I get some success in using I2C in Microblocks) and control the motor that way
Sorry for taking so long to get it going - I was previously making a silly mental mistake in transcoding the Arduino byte sequences and got my hex and binary mixed up #SchoolboyError
So next task is to try and use the Microblocks HTTP server blocks to get it listen for commands from Snap!
Not done that before so that may take me a bit of time
This will be extremely helpful, not only for the immediate application, but also as a general concept and example going forward. Thanks for all the thought and experimentation that everyone has invested.
So it would seem that you are not actually having the same problem as me
I'll experiment some more
[edit1] My Chrome was V102 - upgraded to 103 but still same behaviour
[edit2] Just tried using Vivaldi from one of my Pi and that works so it's looking like just an issue with my Win11 machine at moment - don't you just love computers
[edit3] But my Pi software is fairly old (> 1 year ) so it it might be working for that reason
[edit4] Just tried Chrome on my Win10 laptop - that doesn't work either
The issue isn't your Web Serial blocks - it's the use of JavaScript in the menus of the other blocks
I think I can get around that but I'm fighting battles on many fronts at the moment and I'd like to get local LAN webserver access working again as I use it in other projects
NOTE: After loading the Microblocks script into the WEMOS D1 mini, remember to close Microblocks before running the Snap! script otherwise you get a clash between the two programs over the com port
Obviously, each of the scripts could be made to look nicer
Very interesting. The WEMOS microcontroller seems difficult to source, particularly in volume for classroom purposes. Other than eBay, have you encountered any other retailers stocking them with any regularity? You also mentioned the NodeMCU. Have you tested that yet? I may order one and give that a shot as well.
I followed the UK Amazon link that you provided. These items are not available to customers in the U.S. Not sure why they can be obtained in one location but not the other.
Excellent! Now that the Microblocks script has been developed for the Wemos, is it feasible for Snap! on a PC to talk to MicroBlocks on the microcontroller?