Home / Software Instructions

Software Instructions

You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.csail.mit.edu) to authenticate, and then you will be redirected back to this page.

This term in 6.310 we will use the Arduino IDE 2.0.3 for editing, compiling, downloading, and plotting (using its serial plotter and serial monitor), but there are modifications and add-ins we will need. In particular, please

  1. Install Arduino IDE 2.0,
  2. Modify the Arduino Serial plotter to plot 500 points
  3. Install the Teensy 4.1 board into the Arduino IDE 2.0.
  4. Download and install the lib6310.zip library
  5. and finally, download and test the the 6310_OPTO_22_23 Sketch.

The instructions for each of the five steps are below, and

DOWNLOAD AND RUN FROM YOUR COMPUTER'S LOCAL FILESYSTEM!!!

We have seen many cases where the software fails when using files located on the cloud, or in dropbox, or some other virtual location. Avoid the problem by only using files resident on your computer.

1) Installing the Teensyduino software

Please follow the instructions at www.arduino.cc/en/software to install Arduino IDE 2.0.3 on your computer.

2) Updating the serial plotter

As installed, the serial plotter for Arduino IDE 2.0 will only display fifty points at a time, insufficient for our purposes. Fortunately, as described at https://github.com/arduino/arduino-ide/issues/803#issuecomment-1338149431 at the end of https://github.com/arduino/arduino-ide/issues/803 , Arduino IDE 2.0's serial plotter is a web application written in javascript, and is easy (sort of) for you to customize and plot 500 points.

Find the installation folder for Arduino IDE 2.0, and then use any text editor to open the file main.35ae02cb.chunk.js in the subfolder "resources\app\node_modules\arduino-serial-plotter-webapp\build\static\js". Use the text editor's search function to find and replace U=Object(o.useState)(50) with U=Object(o.useState)(500) , save the file, and then quit the editor.

For some operating systems, it may be necessary to change the permissions for the main.35ae02cb.chunk.js file before you will be allowed to save your changes.

3) Adding Teensy 4.1 support

Please follow the instructions on /https://www.pjrc.com/arduino-ide-2-0-0-teensy-support/ to install support for the Teensy 4.1 controller.

4) Installing the lib6310 library

  1. Download (but DO NOT UNZIP) our library for the Teensyduino, lib6310.zip (here ) to your Desktop.
  2. Follow the instructions for adding a .zip library on https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE

5) Test the Teensy Speed Control Sketch.

  1. Download to your desktop and unzip the Teensy speed control sketch, (6310_OPTO_22_23.zip ).
  2. Connect your laptop to the Teensy using the USB-to-microUSB or USB-C-to-microUSB cable. Be sure to plug into the microUSB connector on the TEENSY 4.1 (the large socketed microcontroller), NOT the microUSB connector mounted directly on the 6.310 printed circuit board.
  3. Connect the microUSB connector mounted directly on the printed circuit board to a 5V USB power supply. You should then see the LED near the microUSB connector glow red, as shown in the following image from the speed control assembly guide.
  4. Open the Arduino IDE 2.0 on your laptop, and make sure that window in the top banner of the IDE indicates that the board is the Teensy 4.1 (otherwise click on that window and select the Teensy 4.1).
  5. Open the 6310_OPTO_22_23 sketch, and try to compile and download it on to the Teensy 4.1 (click on the right-pointing arrow icon on the lefthand side of the top green banner). If the compile completes with no errors, and the IDE reports a successful upload, then you have installed the IDE, the library, and the control software correctly.
  6. If the upload fails, try pressing the small white button on the Teensy 4.1. Or try unplugging and then replugging the connection to the Teensy. Or just try again. Or ask for help.
  7. Try starting the "serial plotter" by clicking on the zigzag icon on the righthand side the IDE's top green banner, a plot window should open up with three plots, like the figure below.

If the above all works, then the next step is the build the speed controller in Lab0!