MiniFarmbot 專用系統環境

2021/02/26 update (請用此方式安裝, 也建議改用Python3)

====================================================================
  1. Install Raspberry Pi Imager from https://www.raspberrypi.org/software/
      選擇 Raspberry Pi OS(32bit), 建議不要選 Ubuntu 64bit OS, 有很多相容性問題.  
  1. 進入Raspberry Pi 後, Enable SSH/Enable Camera/Enable VNC, 其它 interface 請視情況開啟
     

  1.  進入 Terminal command screen.
  • pi@raspberrypi:~ $ 
  • a. download Mini-farmbot github code
git clone https://github.com/FBTUG/FBTUG_MiniFarmBot.git
     b.  安裝opencv , 有可能只要最後一行, 但全裝保險一點 
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt install python3-opencv
     c. 安裝其它相關的 python 套件
sudo apt-get install -y python-dev python-tk python-numpy python3-dev python3-tk python3-numpy
sudo pip3 install pmw
sudo apt-get install -y python3-pil.imagetk
     d. 執行gui_main.py 
cd ~/FBTUG_MiniFarmBot/Software/FBTUG_Commander_Py3
python3 gui_main.py

請調整 VGA resolution to 1920x1080
  1. Arduino / USB camera 的連線可能須要再update 相關python 套件, 此為共筆文件, 請解決此問題的夥伴自行update 步驟. 
  1. 安裝Arduino
  • 工具安裝:
sudo apt-get install arduino gcc-avr avr-libc avrdude python-configobj python-jinja2 python-serial
mkdir tmp
cd tmp
git clone https://github.com/miracle2k/python-glob2
cd python-glob2
wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python
sudo python setup.py install
git clone git://github.com/amperka/ino.git
cd ino
sudo make install
下載程式
git clone -b 'alpha-1.0' --single-branch  https://github.com/FarmBot/farmbot-arduino-firmware
要將firmware刷新到設備上,請運行以下命令:
cd farmbot-arduino-firmware
ino build
ino upload -p /dev/ttyUSB0
這裡的/dev/ttyUSB0 為arduino mega 2560實際接在raspberry 的PORT