MakerLabs ACM
Dev Setup

How-to obtain this repo:

Clone this repo recursively:

git clone --recursive https://github.com/MakerLabsVan/makerlabs-acm
cd makerlabs-acm

Unlock encrypted configuration files

The config files in functions/config.*.yml contain private credentials to access Google Cloud resources from AWS. The files are stored encrypted in the repository via git-crypt, and will appear as normal files after the repository has been "unlocked".

First, obtain the secret password file MakerLabsVan_makerlabs-acm_git-crypt-key from a trusted administrator, then provide the full path of this file to the git-crypt command, and promptly delete the key file as it is no longer needed:

git-crypt unlock ~/Downloads/MakerLabsVan_makerlabs-acm_git-crypt-key
rm ~/Downloads/MakerLabsVan_makerlabs-acm_git-crypt-key

Dependencies & Pre-requisites (macOS):

  • electrical/: Install KiCad 5.0+: http://kicad-pcb.org/download/
  • firmware/, functions/, scripts/, webcomponents/: Install homebrew macOS package manager:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    Install yarn:

    brew install yarn

    Install dependencies (including fetching packages from npm, brew, and downloading an xtensa ESP32 toolchain):

    yarn
    Note
    If you receive the following error while installing package dependencies:
    Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
    You may need to run the following commands to resolve the issue:
    sudo mkdir /usr/local/Frameworks
    sudo chown $(whoami):admin /usr/local/Frameworks
    If you receive the following error while installing package dependencies:
    /usr/bin/python: No module named pip
    error Command failed with exit code 1
    You may need to run the following commands to resolve the issue:
    brew postinstall python@2

Electrical

  • Open the KiCad project:
    open -a kicad electrical/makerlabs-acm-reader-lock_v1.0.0.pro

Firmware

  • Configure firmware settings for a specific machine (i.e. TARS). This includes Wifi SSID/password, Google Spreadsheet ID, etc.:
    yarn firmware TARS menuconfig
  • Build a firmware image, flash it to the connected board:
    yarn firmware TARS flash
  • Same as above, but also monitor the serial data and reboot after flashing:
    yarn firmware TARS

Google Apps Script Webapp / Frontend

  • Login to the Google Apps Script / online UI:

    yarn login

    Enable the Google Apps Script API for your personal Google Apps user: https://script.google.com/home/usersettings

  • (optional, when changes in the Script Editor have been made) Pull changes from Google Apps Script / online UI:
    yarn pull
  • (Make desired changes to files in webapp/)
  • Push changes to Google Apps Script
    yarn push
  • Deploy the latest changes as a webapp:
    yarn deploy

How-to obtain this repo:

Clone this repo recursively:

git clone --recursive https://github.com/MakerLabsVan/makerlabs-acm
cd makerlabs-acm

Unlock encrypted configuration files

The config files in functions/config.*.yml contain private credentials to access Google Cloud resources from AWS. The files are stored encrypted in the repository via git-crypt, and will appear as normal files after the repository has been "unlocked".

First, obtain the secret password file MakerLabsVan_makerlabs-acm_git-crypt-key from a trusted administrator, then provide the full path of this file to the git-crypt command, and promptly delete the key file as it is no longer needed:

git-crypt unlock ~/Downloads/MakerLabsVan_makerlabs-acm_git-crypt-key
rm ~/Downloads/MakerLabsVan_makerlabs-acm_git-crypt-key

Dependencies & Pre-requisites (macOS):

  • electrical/: Install KiCad 5.0+: http://kicad-pcb.org/download/
  • firmware/, functions/, scripts/, webcomponents/: Install homebrew macOS package manager:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    Install yarn:

    brew install yarn

    Install dependencies (including fetching packages from npm, brew, and downloading an xtensa ESP32 toolchain):

    yarn
    Note
    If you receive the following error while installing package dependencies:
    Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
    You may need to run the following commands to resolve the issue:
    sudo mkdir /usr/local/Frameworks
    sudo chown $(whoami):admin /usr/local/Frameworks
    If you receive the following error while installing package dependencies:
    /usr/bin/python: No module named pip
    error Command failed with exit code 1
    You may need to run the following commands to resolve the issue:
    brew postinstall python@2

Electrical

  • Open the KiCad project:
    open -a kicad electrical/makerlabs-acm-reader-lock_v1.0.0.pro

Firmware

  • Configure firmware settings for a specific machine (i.e. TARS). This includes Wifi SSID/password, Google Spreadsheet ID, etc.:
    yarn firmware TARS menuconfig
  • Build a firmware image, flash it to the connected board:
    yarn firmware TARS flash
  • Same as above, but also monitor the serial data and reboot after flashing:
    yarn firmware TARS

Google Apps Script Webapp / Frontend

  • Login to the Google Apps Script / online UI:

    yarn login

    Enable the Google Apps Script API for your personal Google Apps user: https://script.google.com/home/usersettings

  • (optional, when changes in the Script Editor have been made) Pull changes from Google Apps Script / online UI:
    yarn pull
  • (Make desired changes to files in webapp/)
  • Push changes to Google Apps Script
    yarn push
  • Deploy the latest changes as a webapp:
    yarn deploy