farmbot_os/README.md

90 lines
1.8 KiB
Markdown
Raw Normal View History

2014-01-12 11:54:11 -07:00
farmbot-controller
==================
2014-01-12 11:58:55 -07:00
This software is responsible for receiving the commands from the 'farmbot cloud backend', execute them and report back the results.
Technicals
----------
* Written in Ruby
* Data is stored in nedb
* Running on Raspberry Pi
* Sends commands to hardware using firmata
* Hardware is an Arduino Mega with a RAMPS 1.4 board
* Communication with cloud using skynet
2014-01-15 15:14:52 -07:00
Prerequisits
============
2014-01-25 14:22:40 -07:00
Raspberry PI
2014-01-15 15:14:52 -07:00
------------
Update the RPi, install ruby, firmate and the arduino IDE
sudo apt-get update
sudo apt-get install git-core
sudo apt-get install ruby
sudo apt-get install arduino
gem install firmata
gem install bson
gem install mongo
gem install mongoid
Mongo
-----
git clone git://github.com/RickP/mongopi.git
(next steps take a long time)
cd mongopi
scons
sudo scons --prefix=/opt/mongo install
PATH=$PATH:/opt/mongo/bin/
export PATH
sudo mkdir -p /data/db
sudo chown $USER /data/db
2014-01-16 01:30:43 -07:00
start with: /opt/mongo/bin/.mongod --dbpath /data/db
2014-01-15 15:14:52 -07:00
Arduino
-------
Start the arduino IDE in the graphic environment under the start menu / programming / Arduino IDE
Open File / Examples / Firmata / StandardFirmata
Upload to the arduino
FarmBotController
-----------------
use "git clone" to copy the code to the RPi
Usage
=====
2014-01-16 01:59:59 -07:00
Use "ruby runtime.rb" to start the runtime part of the software. This will read the datbase and send commands to the hardware.
2014-01-16 01:30:43 -07:00
Use "ruby menu.rb" to start the interface. A menu will appear. Type the command needed and press enter. It is also possible to add a list of commands to the file 'testcommands.csv' and use the menu to execute the file.
2014-01-15 15:14:52 -07:00
Still to do
===========
* A lot of the settings for pins, sleep times, timeouts and motor inversions have to be moved to configuration.
* Check if it works with the nema 17 motor from OpenBuilds