Arduino in Education of Elementary School Children

I work in a makers' lab that is oriented to elementary school aged students. I'm looking for some new ideas as a kind of path to draw kids into Arduino. It seems that most kids get exposure to Scratch programming in 4th or 5th grade. From there we can introduce MakeyMakey for a few lessons, and that gets them interested in Electronics. We can make small DC motor driven cars and that stokes their imagination to develop more things with motors. So from there I'm trying to get them involved with S4A (Scratch for Arduino) which should interest some students who have worked in Scratch 2. From there I intend to introduce BlocklyDuino which also provides a block oriented programming language "front end" to Arduino C & IDE. (Check out BlocklyDuino-Enhanced and TUNIOT up on "". All these BlocklyDuino derived tools allow you to translate the block code into C code with a click of a button. That C code can then be transferred into the Arduino IDE, compiled and downloaded/run on the Arduino Uno (or similar MCU board). Ultimately, I want to teach them ESP8266/NodeMCU based WiFi programming (IoT application development) using TUNIOT.

Right now, in the trenches, I am hoping to figure out how to use a IR Remote and IR detector in S4A where the S4A script can decode the button codes from the IR Remote and can branch to various scripts designed to do different things like turn on LEDs, Relays, Motors, etc. This seems like a step beyond MakeyMakey which would draw the kids into S4A (and later BlocklyDuno and Arduino C). The problem is that most complex devices for Arduino require a Library of functions designed for that specific device (like IRremote.cpp & IRremote.h) and S4A does not support them (to the best of my knowledge). I was wondering if any S4A users out there have had any success in getting am IR Remote and IR receiver working? If so, how they got it to work (code example would be great). In the Arduino C world, an example of what I am talking about can be found here: