top of page
Writer's picturevac023

Software Programming for "home builders"

Updated: Feb 29, 2020

Lenny recently put together a set of instructions for loading software for folks that are building their own Gen 2 V3 system:


1. Download Arduino 1.8.7 from here:

https://www.arduino.cc/en/main/OldSoftwareReleases We are intentionally using an older release. Someone tried compiling with a newer one and some of the libraries didn’t work. We know this one works on both Mac and PC. Install Arduino and run it once so it saves config files. 2. Download TeensyDuino 1.47 For Windows: https://www.pjrc.com/teensy/td_147/TeensyduinoInstall.exe For Mac: https://www.pjrc.com/teensy/td_147/TeensyduinoInstall.dmg (except Catalina) Install Teensyduino, including all of the example files and libraries. 3. Increase buffer memory available to serial ports on the Teensy. On Windows: C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3\serial1.c

Note: On Windows, you need to change permissions on the .c files to edit / save them.

Right click in the file, select Properties > Security then change user to write (All permissions).  Originally it's Read and Execute

On Mac ▸ ⁨Applications⁩ ▸ ⁨Arduino.app⁩ ▸ ⁨Contents⁩ ▸ ⁨Java⁩ ▸ ⁨hardware⁩ ▸ ⁨teensy⁩ ▸ ⁨avr⁩ ▸ ⁨cores⁩ ▸ ⁨teensy3⁩ ▸ serial1.c replace this line: #define SERIAL1_RX_BUFFER_SIZE     64. with #define SERIAL1_RX_BUFFER_SIZE     8192 to increase the serial buffer. Do this with serial1.c, serial2.c, serial3.c and serial4.c

4. Download the Arduino code and libraries needed from our Github repository:

On the page above click on the green Clone or Download button and then Download Zip file.

Unzip the file into a temporary folder and then copy the contents of the Software/Arduino folder to the Documents/Arduino folder on your computer. This includes the Arduino code for both chips and all the libraries needed to compile them.

5. Now start Arduino, go to Preferences and add this line to the board manager URLs: https://dl.espressif.com/dl/package_esp32_index.json Then go to Tools -> Board <- Board Manager Type in ESP32, install esp32 by Espressif Systems version 1.0.4. Now you have all the Arduino environment set up. 6. Here's how to program the chips: A. Wifi chip: Remove the Wifi chip form its socket. The first time you need to connect to the ESP32 chip via USB to program it (After that you can load the new firmware via Wifi.). Open the OnSpeedWifi.ino file with Arduino. Select  Tools -> Board -> ESP32 Pico Kit Select Tools -> Port -> /dev/cu.SLAB_USBtoUART (on Mac, something similar on a Serial port on PC) Sketch -> Upload

Once you are done the wifi hotspot named OnSpeed will show up. Connect to it and then go to onspeed.local in a browser (on Mac) or 192.168.0.1 (on Windows)

You can now load new firmware from this wifi interface. No need for USB. Compile it with the Arduino using Sketch -> Export compiled binary. A new .bin file will show up in the folder next to the OnSpeedWifi.ino file. In the wifi interface go to Tools -> Upgrade Wifi module and then load the .bin file. It will reboot after a few seconds and you’re on the new firmware. B. Teensy chip: The Teensy can be programmed in place. Plug into the microUSB.

Open the OnSpeedTeensy.ino file Select Tools -> Board -> Teensy 3.6 Select Tools -> Port -> Port with Teensy 3.6 Serial in its name Select Tolss -> CPU Speed 180Mhz Sketch -> Upload After the chip reboots go to Tools -> Serial Monitor to open the serial monitor and you’ll see a command console help text. Go back to the Wifi interface and format the SD card. Teensy can also do it from the command console. Our latest code is available on our GitHub site. You can find the link on our hardware page. Please post any comments or ask any questions in our Forum -- we're happy to help! Lenny

645 views0 comments

Recent Posts

See All

Comments


bottom of page