Skip to content

College curriculum for using ev3dev in a Python programming course

Notifications You must be signed in to change notification settings

Rosebotics/ev3dev-curriculum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ev3dev-curriculum

College curriculum for using ev3dev in a Python programming course.


This repository is meant to be used as the starting code for students that are learning to use the Lego EV3 Mindstorms robot + ev3dev with Python.

Some background information will be provided here with links to other documentation. The assumption is that before you begin using this repository to learn the python-ev3dev API you first have setup your Lego Mindstorm EV3 with ev3dev as discussed in the Background information section below. Once all the setup is done (typically done by an instructor before the class begins) this repository can be used with students. Here is the content used in this curriculum:

Introductory material

Set up your computer to communicate with the EV3 robot and get an overview of the robot capabilities.

Drive Motors

Learn to move the robot around. Movement is a good first step with mobile robotics.

Digital Inputs (and a few other things)

Learn about the EV3 buttons, IR remote, and touch sensor (the digital inputs) plus a few other things.

MQTT Communication

Now it's time to get serious. Use your computer to control the robot from a graphical user interface.

Analog Sensor

Learn to use the color sensor, infrared sensor, and Pixy camera.

Background information

Typically the EV3 is programmed with a block based programming language from Lego that is available for Windows and Mac.
https://www.lego.com/en-us/mindstorms/downloads/download-software

There is also a lightweight version of that program available for iPad and Android tablets.
https://www.lego.com/en-us/mindstorms/apps/ev3-programmer-app

Block based languages are a great way to get started, but at some point in your programming journey, it's time to move away from block based languages (like Scratch) and move into the more traditional text-based programming languages. One of the best, first languages to learn is Python. Using the Lego EV3 with Python can be a lot of fun and it can help motivate learning. There are really only 2 factors limiting more schools from using EV3 + Python.

  • Costs (sorry can't help you with that one)
  • Technical challenges (that one we can help with)

Indeed it takes someone with a bit of tech savvy to get started, but there are a lot of great tools to help. This repository uses some of those great tools and tries to provide examples and links to use them.

First we start with the operating system on the EV3 programming brick. Instead of using the default operating system that ships with the EV3 from Lego we'll dual boot using an SD card. The new os is called ev3dev and it's based on Linux. http://www.ev3dev.org/

ev3dev can use many different programming languages, not just Python. However, we only care about Python. In order to use Python we need to leverage the ev3dev Python library, which is called python-ev3dev, so that we have commands to communicate with the motors and sensors on the board. ev3dev ships with python-ev3dev already installed, so all we have to do is learn to use it. You can learn the API from the official documentation:
Github: https://github.com/rhempel/ev3dev-lang-python
Documentation: http://python-ev3dev.readthedocs.io/en/latest/

but sometimes it's easier to learn from a series of examples. That is the focus of this repository. It is a series of exercises that you will work to learn the python-ev3dev API. After you work these exercises you should be able to come up with your own ideas that you can implement.

Background information specific to Rose-Hulman

Starting in 2016 we built a fleet of 10 EV3 robots to use in our CSSE120 Introduction to Programming course at Rose-Hulman. The pilot program went well so in the Fall of 2017 we purchased 10 more robots. Here is a Google doc which shows the setup steps that the instructors did before the course began:
https://docs.google.com/document/d/1jNlT9JKff3p9TyrDQwF3XjakaLEp_ilD1wNaHr7c67o/edit?usp=sharing

Once you have your robots setup and rockin you need material to teach students how to use the robot. That is where this repository begins.

What is in this repository

The purpose of this repository is to share the work we’ve done at Rose-Hulman to use ev3dev in the classroom. We’ve setup a series of exercises for students to learn the python-ev3dev API. Instructors at other schools can use any amount of our content in their own course or simply review our work as inspiration.

This repository is broken into different folders that each have a different purpose:

  • assets - Sound and image files. These assets are used in various modules throughout the curriculum.
  • examples - Finished examples that can be run to demo different robot features. Reference the code in this folder when doing your own work.
  • libs - A special folder that will contain modules that are available to all other modules. Students will be given an mqtt module and will be expected to build their own robot controller module.
  • projects - This folder is currently blank. Each team member needs to make a folder in the projects area for their final project code.
  • sandbox - This folder has 5 subfolders that all start out identical. Each identical subfolder is for 1 team member to work individually while learning ev3dev. This folder contains 24 individual programming challenges that you will work as you complete this curriculum.

Learning Objectives

At the end of this curriculum a student should be able to…

  • Transfer programs to the EV3 that were made on their computer
  • Run programs on the EV3 using python3 via SSH
  • Create programs that effectively use the python-ev3dev API, including motors, LEDs, sound, the screen, buttons, IR remote, MQTT, touch sensor, color sensor, Pixy camera, and infrared sensor.
  • Create their own project that uniquely uses the skills learned from the guided units

About

College curriculum for using ev3dev in a Python programming course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages