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.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.

Installing the Teensyduino software
Please follow the instructions at www.arduino.cc/en/software to install Arduino IDE 2.0.3 on your computer.
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 navigate to the subfolder "resources\app\node_modules\arduino-serial-plotter-webapp\build\static\js". Make a copy of the file main.35ae02cb.chunk.js, in case something goes wrong, and then use any text editor to open the original main.35ae02cb.chunk.js file. Use the text editor's search function to find the text U=Object(o.useState)(50) in the file, then change the 50 to 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. And for Mac users, you can find usually find the installation folder by searching the Application folder for Arduino IDE.app , then right clicking on it, and choosing "Show Package Contents".

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.

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
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. 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).
  4. 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.
  5. 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.
  6. 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!