Skip to content

agh-cs-imbeciles/beehive-scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beehive Scale

Arduino for Visual Studio Code project setup (Linux)

  1. Install Arduino extension for Visual Studio Code.
  2. Download and install Arduino CLI.
  3. Add 2 files to .vscode folder.
    • .vscode/settings.json
      {
          "arduino.useArduinoCli": true,
          "arduino.path": "/path/to/arduino-cli/folder",
          "arduino.commandPath": "arduino-cli",
          "arduino.logLevel": "info",
          "C_Cpp.errorSquiggles": "enabled",
      }
    • .vscode/arduino.json
      port is a path to the connected board via USB, e.g. /dev/ttyUSB0
      {
          "port": "/path/to/USB/port",
          "prebuild": "./prebuild.sh",
          "board": "esp32:esp32:esp32",
          "sketch": "beehive_scale.ino",
          "output": "./build",
          "configuration": "JTAGAdapter=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=info,EraseFlash=none",
          "buildPreferences": [
              [
                  "compiler.cpp.extra_flags",
                  "-fexceptions"
              ]
          ],
          "programmer": "esptool"
      }
  4. In Command Pallette select "Arduino: Board Manager" and then select "esp32 by Espressif Systems Version 2.0.16" board.
  5. In ~/Arduino/libraries/ put folders containing following libraries:
  6. Copy file config/esp32_template.json into config/esp32.json. Then set proper values in this file.
  7. Copy .env_template into .env and set PORT to port to which ESP32 is connected. (It is rather unlikely that you will have to change other variables, but it is possible)
  8. Verify files (press CTRL + ALT + R in beehive_scale.ino).
  9. Upload files (press CTRL + ALT + U in beehive_scale.ino).
  10. You can now open Serial Monitor and watch logs.
  11. Run scripts/flash_filesystem.sh.
  12. Click en button on ESP32 board.
  13. Warning! This app isn't foolproof yet. There may be a lot of bugs. Sometimes a lot of random things are logged.