Connections to Raspberry Pi?

Yikes! That's the total opposite of what we hope to accomplish!

Regarding the Wemo d1 + shield -- although it's not easy for schools to order from Ali Express, your group could buy boards in bulk to give away at workshops. A few hundred dollars would buy enough boards/shields for several workshops.

You'll also need battery packs or other power sources for the boards.

Simon has written MicroBlocks code to control the Wemos motor board and I think he's working on an HTTP server that will allow Snap! to control the motor board wirelessly. (I'm assuming the board and the Snap! computer are on the same network to avoid firewall and IP addressing issues.)

That's why we think that something like MicroBlocks may be more appropriate at that grade level. Part of the problem is that if there's a loose or misconnected wire and there's a misplaced semicolon in the sketch, kids with limited prior experience have difficulty sorting it out.

Administrators sometimes think that beginning with native sketches is a more "rigorous" approach, but if half the kids are frustrated by this introduction, it doesn't do the students any favors.

So this is my latest using WiFi to talk to a WEMOS running a Microblocks script

Basic concept is that the Microblocks script publishes its IP address to an MQTT broker and I've added a block in Snap! to retrieve that information.

This would let the device work both at school and at home.

The caveat is that the MQTT broker must be reachable (and some school IT departments might block access to it)

This is just an example of how to manage IP addresses - there are many others that could be employed

So a student should click on the get IP reporter and then press reset button on their WEMOS and it should then report their IP a few seconds later

Each WEMOS Microblocks script can be altered to give a unique name (or you can use MAC addresses if you don't mind the geekyness :slight_smile:

image

Also note that the Snap! script uses the http://extensions.snap.berkeley.edu domain

http://extensions.snap.berkeley.edu/versions/dev/snap.html#present:Username=cymplecy&ProjectName=MicroblocksHTTPusingPOST

The Wemos chip that we ordered has arrived, so on Monday we can attempt to replicate the script.

We're working on a related project in which we're using a strobe light to create an animation using a spinning disk with sequential images. When the strobe frequency is around 20 Hz, matching the frames per second on the spinning disk, the horses appear to gallop. We're currently using a strobe app on a phone to flash its flashlight LED, but we would like to control this from Snap! Could we use the output of the Wemos to control the frequency of a flashing high intensity LED in this manner?

Certainly sounds achievable :slight_smile:

The Wemos IO pins can't handle a lot of current.

If you need the strobe to be really bright, you can drive it with the output of the motor control board to allow a higher peak current.

You'll probably want to have the board control the flash timing for greater precision. I;n guessing that the USB-serial connection introduces enough timing jitter that you won't see the horse in the same place every flash if you try to time the individual flashes from Snap! But the solution is easy -- Snap! can send the desired frequency to a program running on the Wemos and that program can generate the actual flashes.

This sounds like a good project to begin exploring use of Snap! to talk to MicroBlocks on the Wemos.

Did a little mod to my Microblocks to add flashing a LED at same time as controlling a motor
[minor edit 20Jul22]

image

@jmaloney @cymplecy We have begun to work with the International Technology and Engineering Education Association (ITEEA) on some projects that involve motor control, etc. ITEEA uses the micro:bit in other projects such as Project ExCITE (with Tony Gordon as P.I. and bh as a consultant).

Since there is a version of MicroBlocks for the micro:bit, would the method of using micro:blocks on the micro:bit to talk to Snap! on a Chromebook or PC work in the same way that it does for the Wemos?

John will probably expand on this answer but the microbit is a different (and more expensive) beast.

It doesn't have WiFi so that avenue of control is denied to you

Add on boards are generally not cheap but there are many different suppliers in the market

The affordability of the Wemos is why we're interested in using it for own work. Since ITEEA has already acquired micro:bits for Project ExCITE, that is a sunk cost for them. We have tried the method that ITEEA has developed for controlling the micro:bit through Snap! and it seems to work:

However, the Project ExCITE method depends upon a server maintained by Hofstra University. Hofstra has committed to maintain the server for three years. We would be more comfortable if the sole connection from Snap! to micro:bit were not dependent upon a server maintained by a university. Also, the external links make that aspect a black box.

International Technology and Engineering Educators Association (TEEA), the professional association that teamed with Hofstra to develop the ExCITE project and its materials, are to take over the work of the ExCITE project (which sunsets in September 2022) from January 2023. The will provide access to all the ITEEA connectors materials, Snap! block libraries, HEX files, etc. from then onwards. They will maintain the materials indefinitely. As now, the materials will be available at no cost for non commercial usage.

@rrwagner @excite Roger Wagner was able to use the new hex file that you provided to connect to the micro:bit. However, he reports, "I cannot turn pin 12 off, and it's not evident why that would be."

Any suggestions about how he might go about resolving this issue?

But not for schools that want to start using the ExCITE curriculum materials!

ALL curriculum, software and documentation is (and always will) be free for non-commercial use (just like BJC!)

Don't know of any projects that provide free hardware indefinitely ... please point me to one: I want to sign up!

The ITEEA block library doesn't use pin 12. It reads/writes (digital) pins 0-16 omitting 12.

I wasn't criticizing ExCITE! I was telling Glen that the possibility of using cheaper hardware is still relevant for ExCITE even though it bought hardware for the research with the first two rounds of teachers.

Our Wemos microcontroller arrived, so we're planning to try Simon's method of using MicroBlocks to communicate with the Wemos with Snap! We should know if we're able to replicate that later today.

If that works, we hope to use the same method to talk to the micro:bit (i.e., install MicroBlocks on the micro:bit and use that installation to talk to Snap!). It is exciting to have so many options,

@clymplecy We've gotten a couple nodeMCU boards, but I'm having trouble getting the computer to recognize them at a COM port. Which driver are you using? I'm finding conflicting information online regarding what I should be using.

Mine shows up as Silicon Labs CP210x
image

IIRC I installed them using

(I'm on windows)