Back to Home

Intel Edison How to teach children to program / Intel Blog

intellecton · edison · intel galileo · galileo · children

Intel Edison How to teach children to program

    During the Spring Scientific and Educational School of Moscow State University "LANAT" we conducted a programming course for elementary grades. The guys learned how to program in Python and build interesting gadgets on Intel Galileo and Intel Edison boards. About how this happened, what problems we encountered, and what projects the guys got, read under the cut.


    Work is in full swing. A machine with a range finder is waiting on the table.

    0.053 fees per person


    We had only one Intel Edison board, one Intel Galileo board, radio components, 8 computers and 19 children (some with laptops). Simply put, there were many people, and iron was few. It was necessary to establish verification of written programs on a large scale.

    At first, two obvious options were considered:

    1. Go around all the students with the board, download and run the program one by one.
    2. Throw off all programs on a USB flash drive and check with everyone, at the same time discussing errors and code quality.

    The main problem was that both options simply took too much time. It saved us that Edison has full Linux and a Wi-Fi module: we decided to transfer files via SSH. After a little torment with configuring the router, we managed to combine all the computers and the board into one network, run sshd on the board and connect to it. We try to blink the LED ... everything works!

    Now it was necessary to somehow provide children with access to the board via SSH. Here we were helped by the good old Notepad ++, which, to our surprise, got support for editing files through SSH. The configuration and distribution were copied to laptops using a regular USB flash drive. It turned out that you can literally connect to the board with just one button. For security purposes, students created a separate user with a minimum set of rights and separate directories for storing programs - one per class.

    Running programs on the board itself remained the privilege of the teacher, but work has already gone much faster.

    First steps


    For training, we chose the Python language - simple enough to be quickly explained, but functional enough to make really complex projects on it. To interact with the hardware, we wrote several of our libraries with a minimal API.

    In the first introductory lesson, the guys learned the basics of Python syntax, got acquainted with the capabilities of Galileo and Edison, learned about a variety of additional modules. At the end of the lesson, the guys were able to do the main thing in the life of every electronic engineer - to blink an LED.

    In the next classes, the children learned to work with the rangefinder and buttons, wrote several programs and even one game.



    Under the spoilers - several programs written by the guys during the classes:

    "Traffic light"
        import blink
        import time
        r=blink.Pin(6)
        y=blink.Pin (5)
        g=blink.Pin(4)
        y.mode("out")
        g.mode("out")
        r.mode("out")
        while 1:
            r.write(1)
            time.sleep(2)
            r.write(0)
            y.write(1)
            time.sleep(2)
            y.write(0)
            g.write(1)
            time.sleep(2)
            g.write(0)
    

    The closer we bring our hand to the rangemeter, the faster the LEDs flash
        import blink
        import time
        import ranging
        l=blink.Pin(0)
        d=blink.Pin(1)
        l.mode("out")
        d.mode("out")
        ranging.set_echo(4)
        ranging.set_trig(2)
        while 1:
            l.write(1)
            d.write(1)
            time.sleep(ranging.distance()/30)
            l.write(0)
            d.write(0)
            time.sleep(ranging.distance()/30)
    

    Shift shift


    At the closing of the camp, the guys showed the rest of the students what they had done on our course. Four people with three works performed on the big stage:


    Pasha Bukhtenko with the work “Traffic Light”


    Yura Zamyatin and Sasha Senyukov with the game “Cowboys”


    Andrey Ermakov with a robot-draftsman

    Scientific future


    We opened a set for the summer scientific and educational school "Lanat", which will be held July 16 - August 5. At the summer school there will be two whole areas of programming - our course with boards from Intel and the course of applied programming. In two weeks, the guys will develop their projects, the best of which will be recommended at the conference "Scientists of the Future." To get a chance to go to school, you need to take part in the competition .

    Thanks for attention!

    Read Next