Software Instructions for Fall 2021

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.mit.edu) to authenticate, and then you will be redirected back to this page.

This term in 6.302, we will use the Teensyduino IDE for editing, compiling, downloading, and plotting (using its serial plotter and serial monitor). Please install the Teensyduino software on your laptop, and then install our library, as per the following instructions.

Installing the Teensyduino software

Please follow the instructions at https://www.pjrc.com/teensy/td_download.html to download and install the latest version of the Teensyduino software. Depending on your computer and operating system, that may mean first installing the Ardunio software, and then downloading and installing the Teensyduino software. There are versions of both packages for linux, macosx and microsoft windows. Please DO NOT TRY TO USE AN earlier version of either software package!!!! Older versions have issues that interact with the tools we use in ways that are very hard to debug.

If your system requires that you first install the Arduino IDE, DO NOT USE THE PORTABLE, APP OR ON-LINE VERSIONS of the ARDUINO Software! AND DO NOT TRY TO INSTALL THE TEENSYDUINO SOFTWARE UNTIL YOU RUN THE ARDUINO IDE AT LEAST ONCE!!! There are some file permissions that will not be set correctly otherwise.

Installing the lib6302 library

First, download (but DO NOT UNZIP) our library for the Teensyduino, lib6302.zip (here ) to your Desktop.

You can use the Teensyduino IDE to install the lib6302.zip library. Just follow the instructions given for the Arduino IDE here https://www.arduino.cc/en/guide/libraries#toc4 . Roughly, you open the Teensyduino IDE, go to the "Sketch" pulldown menu, hover over "include library", and click on "add ZIP library" when it appears. Then you navigate to the directory with the lib6302.zip, and click on it. Done.

We recommend you use the library manager to install the our library, but if that fails, there are also manual instructions. If you decide to install the library manually, you will have have to find the directory where the IDE keeps its library files. If you open the preferences page for the IDE, it should show you a sketchbook directory. The libraries directory is usually a subdirectory of that, and you can install the library by moving the lib6302.zip file to the libraries subdirectory and unzip it.

Connecting the laptop.
  1. Download to your desktop and unzip the Teensy speed control sketch, 6302_OPTO_21.zip (here ).
  2. Connect your laptop to the control Teensy (the larger microcontroller on your PC board, a Teensy 3.6) using the USB-to-microUSB or USB-C-to-microUSB cable. Then open the Teensyduino IDE on your laptop, and make sure that on the "Tool" dropdown menu, the tag "board" indicates the Teensy 3.6 (or hover over the board tag, then the Teensyduino tag, and finally and select the Teensy 3.6 option).
  3. Hover over the ports tag in the tools menu, and you should see two Teensy related options, one in the list of "Teensy Ports" and the other in the list of "Serial Ports". CLICK ON THE Teensy port IN THE SERIAL PORTS LIST! You will not be able to send commands from the Teensyduino plotter if will you click on the wrong port!!!
  4. Open the 6302_OPTO_21 sketch, and try to compile and download it on to the Teensy 3.6. If the compile completes with no errors, and the IDE reports a successful upload, you have installed the control software correctly.
  5. If you get an error message indicating the arduino application is damaged, and a recommending that you delete it, please do so. Then try the above instructions again, but this time REALLY open a sketch with the Teensyduino IDE before installing the Teensy duino.
  6. Set the port by clicking on the "Port" tag in the Tools drop-down menu, and then clicking on the Teensy entry in the list of "Serial Ports". Do NOT click on the Teensy entry in the "Teensy Ports" list. See the figure below.
  7. Try starting the "serial plotter" by clicking on its tag in the Tools drop-down menu.
  8. IF YOU HAVE A PROBLEM WITH UPLOADS OR DOWNLOADS, TRY DISABLING ANY BLUETOOTH DEVICES, SUCH A BLUETOOTH MICE OR KEYBOARDS.

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