Skip to main content Skip to local navigation

2020/21’s First Year Students: Arduinos, Matlab and Java

Introduction

The 1st year programming courses in the Lassonde School at YorkU were revamped for the 2020/21 school year so that students could do hands-on lab activities from home.  The students took two programming classes:

  1. Matlab procedural programming in Fall 2020
  2. Java object-oriented programming in Winter 2021

In both courses the students used Arduino-compatible hardware connected to their computers.  The hardware, designed and sold by Seeed Studio, was purchased by students in kit form from the YorkU Bookstore and used in both semesters.  The kit included:

Students worked with these kits for both lab work and project work.  For example, here is a video of a student-generated “Major Project” using the Arduino-compatible Grove board:

YouTube video example. Our first year engineering students now have eight months of experience developing with Arduino-compatible hardware, Matlab and Java.

The Arduino: Seeed Studio’s Grove Beginner Kit

The Grove Beginner Kit
Illustration of the Grove Beginner Kit.

The Grove Beginner Kit contains LEDs, a button, a buzzer, environmental sensors, an accelerometer, a little OLED screen, etc.  At the centre of the board is the equivalent of an Arduino UNO board that can be programmed in the Arduino IDE.  We augmented the kit with extra peripherals, and with the use of Matlab and Java, but none of these is required for basic functionality.

A wide variety of standard Arduino “shields”, as well as wired Grove modules are available from SeeedDigikeyMouser and Robotshop.

Capacitive sensor attached via header.
Capacitive sensor attached via header.

Matlab vs. Java to Interface with Arduino-compatible boards

We wanted to show our students how they could use the hardware in instrumentation and control applications, so we taught them how to interface the boards to their computers, first with Matlab, and then with Java.  Matlab is licencesd for use across York University, so is free for faculty, staff and students to use.  Java is also free to use and all of our students now have experience with IntelliJ 2020, JavaFX 11 and JDK 14.

Arduino setup on Matlab
 Arduino setup on Matlab pops up a new window.

The Matlab approach is the easiest way to create an interface to the the Arduino-compatible boards.  The Mathworks includes off-the-shelf driver and example support for Arduino-type boards, as per their dedicated webpage. All of our students now have hands-on experience installing Matlab, the Arduino IDE, and the Arduino drivers within Matlab, in addition to actually creating systems that combine Arduino hardware and Matlab.

Potential for non-EECS programs

We chose these lab kits for our two programming classes to give students real world, broadly-applicable experience that could be leveraged in any engineering discipline that the students end up pursuing. Instrumentation and control applications are found throughout all engineering disciplines. For Mechanical, Civil and other, non-EECS engineering programs, these lab kits — or variants of them — could be used in lab activities within your departments’ programs as the students already own the hardware (including a multimeter!) and have eight months of experience using them in hands-on activities, sourcing parts and maintaining their experimental setups.

Lab kits via the Bookstore

We partnered with the YorkU Bookstore to supply lab kits to the students.  Unlike other universities that loan out equipment to students, we chose to go the student-owned route for a few reasons, not the least of which is that it is important for students to learn to source and maintain their own engineering equipment. Furthermore, we kept the price of the kits in the neighbourhood of a typical $100 textbook (and had them purchase it in lieu of a textbook).

While the vast majority of students purchased the Bookstore kit, some did not.  Those that did not opted to purchase or use other Arduino-compatible boards, either because of cost, shipment timing, shipping restrictions (some countries that students live in are embargoed by Canada) or existing ownership.  Regardless, all students had experience programming some version of an Arduino board in both semesters.

If you’re interested in having the Bookstore supply lab kits for your course, reach out to them!

Examples of Plant-Growing Projects with Either Matlab or Java

Plant watering example with the Arduino-compatible Grove Beginner Kit.
 Plant watering example with the Arduino-compatible Grove Beginner Kit.

All students were required to undertake a “minor project” worth about 20% of their mark in both the Matlab (1011) and Java (1021) classes.  The project involved developing an automated plant-watering application.  A typical setup looked like this:

And here are examples of students explaining their projects, either with Matlab or Java on the host computer:

Example 1 of plant-growing with an Arduino-compatible Grove board with Java (EECS 1021)

Example 2 of plant-growing with an Arduino-compatible Grove board with Java.(EECS 1021)

Examples of Major Projects

All students had the option of undertaking a “major” project to raise their grade above a B+ in both classes.  The major project required that students work on an application that combined Matlab or Java programming with their Arduino board. The following are publicly-available videos of projects  created by our 1st year engineering students, published on YouTube.

An example of Arduino + Matlab major project for EECS 1011.

Another example of Arduino + Matlab major project for EECS 1011.

Another example of an Arduino + Matlab major project for EECS 1011.

Class video material and other teaching resources

If you ‘re interested in seeing more of the material that the students used to learn from, there are three YouTube channels that I’ve created.

  1. James’ Arduino playlist
  2. James’ EECS 1011 playlist
  3. James’ EECS 1021 playlist

Acknowledgements

The EECS tech team and the staff at the Bookstore were instrumental in making these courses a success.  Thank you!