We would like for them to be able to integrate the art & music projects that they have created in Snap! with extensions that will enable them to incorporate kinetic art / motion.
Therefore, an extension that could control an external motor from Snap! would be better. The precise model of the microcontroller is not important as long as it is (a) affordable and (b) can be controlled by a PC or Chromebook.
The cheapest method is to use a microcontroller board with an additional motor driver (as microcontroller cannot supply the current motors require)
One method would be an Arduino board with a plug in added controller - cost varies considerably up to $40 depending on where you source the components
Another method would be to use a WEMOS D1 mini with a motor shield - this could cost as little as $10 but would require a bit of soldering.
It could be controlled over USB but also it could be controlled via WiFi.
You/we would have to develop software to run on these controllers to accept commands from Snap! but once that is developed, then it would just need uploading to each controller once
And just to add, if your computers are "locked down" by an IT department, then it can prove very difficult to get physical computing projects such as this to work.
You either need total software deployment control or a VERY helpful IT department
I had the advantage of being the Network Manager in my schools
We collaborated with Roger Wagner to develop a shield for the Arduino, now in its fourth iteration, that includes a motor controller.
This works well, and we have been using it with Snap4Arduino for several years. However, the combination of the Arduino plus the shield & motor controller costs about $25. So, in cases in which we would like each student in a class of 20 students to take away a working motor & controller, the cost is about $500 per class.
We haven't worked with the Raspberry Pi, but the low cost ($4) seems attractive if we had a way to communicate with it from a PC using Snap! (We could probably add an amplifier to the output to obtain enough current to drive a motor.)
If we attempted to run Snap! on a Raspberry Pi, we would need to acquire monitors, keyboards, etc., to obtain complete working systems usable as stand-alone computers. Since the students already have PCs and Chromebooks, this would quickly drive up the cost. It seems as though it would be more economical to connect a Raspberry Pico to a PC and use it as a microcontroller. Is there something that we're missing or not understanding about the economics?
No, they have a "headless" Snap! that you program using your big computer, then export the result to the Pi as an xml that can then run independently. I think. Not sure I've ever actually seen a Pi.
When we have some time later this summer, we may acquire a Raspberry Pico to gain some firsthand experience and get a better idea of its potential. The price and size are certainly attractive. Thanks for the suggestions.
With current pricing at about $3.75 per unit, the WEMOS D1 certainly seems affordable. Can you point us to any information about controlling it with Snap! ? (Thanks!)
"Serial port" library allows direct access to any USB/CDC (serial port emulation) device. So you can "talk" to a program running on the microcontroller board.
With micropython@Pico in REPL mode, everything you send to the board is interpreted as a program.
There is a typical led switching program (not tested yet as my pico is buried somewhere)
There are cheap lightweight servos known as the SG90/MG90, easily modifiable to continuous rotation and driven directly by single I/O line.
Those are available through global retailers or EB for less than 2$ each.
We haven't used the Serial Port library, but the ability to send a command from Snap! that is interpreted by the remote machine is exactly what we need. Thanks for providing a starting place.