Skip to main content Skip to local navigation
Home » Page 3

Blog posts

VPL: testing arrays in Java with cloning

On a recent final exam I had students create a method that could interleave two halves of an array. The original exercise came from a Schaum's Outline book. If you're not careful, by passing values by reference you can have the student's solution pollute the original input test value. To solve this in Java you […]

Main Project Example for EECS 1021

The following is an example of a main project for the EECS 1021 course. While I think that it's important to provide concrete examples it's also important not to provide examples that are trivial to copy and, thus, reduce the effectiveness of the example as a learning tool. As such, I'm providing this example using […]

Unit testing for a project in Java

It's important to create test frameworks for your programs. In Java we use the jUnit system to do so. Here is an example of setting up a unit tester to make sure that that a method returns the values it's supposed to. First, let's look at the method. I'm using it to convert values that […]

MPLAB X on Apple Silicon

A lot of people have been asking whether Microchip's MPLAB X runs on Apple Silicon machines. The answer is: Yes. I have just tested it out on my Apple M3 Pro MacBook Pro. It works fine so far. I have installed MPLAB X v6.20 and the XC8 compiler. I've hooked up a PIC16 board and […]

Trying out the M5Stack

My colleague, Eric Prandovszky, has been discussing the M5Stack system with me for a while and acquired a few modules to us to try out. Today I tried out the M5Stack Core 2 AWS module. My objective is to see if we can program it using the legacy Arduino 1.x IDE on macOS with Apple […]

Driver for the Grove Beginner Kit for Arduino (updated 2024)

[updated for Windows ARM users] For students attempting to get the USB drivers working for the Grove Beginner Kit for Arduino please follow these instructions: First: make sure that you're not using the white USB cable.  Use a different one. Second: install the USB driver for the board. a) Go to Seeed Studio's wiki: https://wiki.seeedstudio.com/Grove-Beginner-Kit-For-Arduino/ b) […]

VPL: A Java Unit Test Example

The following is an example of the files needed to create a working Virtual Programming Lab exercise for Java: vpl_run.sh vpl_evaluate.sh MainClass.java StudentSolution.java TeacherReferenceSolutions.java TheTestClass.java With this you can evaluate one student submission against a single reference solution. Two methods are run: one is the student's method and one is the teacher's method. The output […]

Testing the LEDs and Button 1 on the ChipKit I/O with KL25

As part of a research project I'm resurrecting some KL25Z boards and ChipKit basic I/O shield boards and seeing if they can be used together. The ChipKit has some pushbuttons and LEDs. The following code, with the help of single-stepping and the debugger can get the LED bank and BTN1 on the ChipKit I/O board […]

Air Quality Training (WHSC)

Summary The Ontario Workers Health & Safety Training Centre provides training on Indoor Air Quality.  It’s valuable training for Joint Health and Safety Committee members to provide them on background to better understand how to go about gathering and analyzing information on indoor air in the workplace.  The training covers common issues, limitations, and responsibilities. (preview here)  Given the importance of […]

Java and Arduino: Serial Communication

Before we started using Firmata and Firmata4j in the EECS 1021 class, Richard Robinson and I put together lab activities that used the Fazecast jSerialComm library paired with customized Arduino serial code. The approach is summarized in three videos: Video 1: The Plan for Sending Data to an Arduino We need to send information, in […]