Skip to content

crasu/go-light

Repository files navigation

Go-Light

Lua code to convert a toy traffic light into a extreme feedback device

Setup for ubuntu

  1. Install python

  2. Install virtualenvwrapper

    apt install virtualenvwrapper
    . /usr/local/bin/virtualenvwrapper_lazy.sh # add to .bashrc as well
  1. Create a virtualenv
    mkvirtualenv nodemcu
  1. Install esptool
    workon nodemcu
    pip install esptool
    pip install nodemcu-uploader

Firmware for nodemcu

  1. Change to this repo

  2. Make sure the microcontroller is connected to ttyUSB0 (needs: timer, gpio and string module)

    esptool.py  --port /dev/ttyUSB0 erase_flash
    esptool.py  --port /dev/ttyUSB0 write_flash --flash_mode dio 0x00000 nodemcu-master-*-integer.bin
  1. Check if flashing worked (press the reset button while doing this and wait about 10 sec for the repl to appear)
    cu --nostop -s 115200 -l /dev/ttyUSB0
  1. Customize config.lua

  2. Upload the source the lua source to the nodemcu

    ./upload.sh

Preconfigured Ubuntu VM

  1. To mitigate driver issues and platform hassle, just install VirtualBox and Vagrant.
  2. Call vagrant up && vagrant reload from the repository root.
  3. Call vagrant ssh to access the VM.
  4. Continue with chapter 'Firmware for nodemcu' as all reguired dependencies have already been installed. Repository root is available as shared folder /vagrant, changes are immediately propagated to the host.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •