Software Instructions
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
- Install Arduino IDE 2.0,
- Modify the Arduino Serial plotter to plot 500 points
- Install the Teensy 4.1 board into the Arduino IDE 2.0.
- Download and install the lib6310.zip library
- 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.
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.
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.
- Download (but DO NOT UNZIP) our library for the Teensyduino, lib6310.zip (here ) to your Desktop.
- Follow the instructions for adding a .zip library on https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE
- Download to your desktop and unzip the Teensy speed control sketch, (6310_OPTO_22_23.zip ).
- 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.
- 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.
- 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).
- 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.
- 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.
- 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!