Skip to main content Skip to local navigation

Blog posts

Firmata4j and a Simple DHT20 example

Firmata4j and a Simple DHT20 example

After my earlier blog post from today, I wanted to verify that I could read single bytes of data from other sensors on the Grove Beginner Kit for Arduino. The next target? The DHT20 sensor. According to the data sheet, I should be able to be able to request a status byte and that that […]

VPL: testing arrays in Java with cloning

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

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

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

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

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

Driver for the Grove Beginner Kit for Arduino

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) click on the USB driver […]

VPL: A Java Unit Test Example

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 […]