Go to file
Rick Carlino 6f6e67054b Fixed most merge conflicts- possible coupling issues 2015-03-12 08:39:55 -05:00
app/models saving measurement after reading pin value 2014-10-17 20:38:27 -01:00
config Changed db config 2014-06-23 19:57:52 -01:00
db db migration for measurements 2014-10-15 20:30:49 -01:00
lib Fixed most merge conflicts- possible coupling issues 2015-03-12 08:39:55 -05:00
service refactor handle_message 2014-11-22 11:50:20 -01:00
spec Fixed most merge conflicts- possible coupling issues 2015-03-12 08:39:55 -05:00
spec_disabled getting tests up top 99.8% 2015-03-11 22:32:24 +01:00
test Rid ourselves of MiniTest 2014-12-05 07:48:54 -06:00
.gitignore Merge branch 'master' of https://github.com/TimEvWw/farmbot-raspberry-pi-controller into TimEvWw-master 2015-01-18 01:10:22 +01:00
.rspec Rid ourselves of MiniTest 2014-12-05 07:48:54 -06:00
Gemfile Merge branch 'master' of https://github.com/TimEvWw/farmbot-raspberry-pi-controller into TimEvWw-master 2015-01-18 01:10:22 +01:00
README.md Merge branch 'master' of https://github.com/TimEvWw/farmbot-raspberry-pi-controller into TimEvWw-master 2015-01-18 01:10:22 +01:00
README.rdoc switched from mongodb to sqlite3 2014-05-07 19:25:51 -01:00
Rakefile attempting unit test 2014-12-03 19:32:37 -01:00
config.ru switched from mongodb to sqlite3 2014-05-07 19:25:51 -01:00
farmbot.rb Phase out several global variables 2015-03-11 15:28:53 -05:00
farmtalk.rb Phase out several global variables 2015-03-11 15:28:53 -05:00
menu.rb Phase out several global variables 2015-03-11 15:28:53 -05:00
protocols.md fixed a few typos in protocols.md 2015-01-16 12:28:41 -07:00
settings.rb added separate process for messages 2015-02-26 20:05:31 +01:00
testcommands.csv using g-code communication 2014-05-17 18:15:35 -01:00
write_db_settings.rb Phase out several global variables 2015-03-11 15:28:53 -05:00

README.md

farmbot-controller

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 sqlite 3
  • Running on Raspberry Pi
  • Sends commands to hardware using firmata (soon to be replaced with g-code)
  • Hardware is an Arduino Mega with a RAMPS 1.4 board
  • Communication with cloud using skynet (machine instant messaging)

Prerequisites

Raspberry PI

Update the RPi, install ruby, firmate and the arduino IDE

sudo apt-get update
sudo apt-get install git-core ruby-dev sqlite3 arduino bundler

retrieving code from github:

git clone https://github.com/FarmBot/farmbot-raspberry-pi-controller

prepping ruby:

cd farmbot-raspberry-pi-controller
sudo gem install bundler
sudo gem install sqlite3 -v '1.3.10'
bundler update
bundle install

Setup the database

rake db:migrate

Arduino

git clone https://github.com/FarmBot/farmbot-arduino-controller

Start the arduino IDE in the graphic environment under the start menu / programming / Arduino IDE Open File / Examples / Firmata / StandardFirmata Upload to the arduino

Usage

Use "ruby farmbot.rb" to start hardware control and skynet communication

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.

To change parameters manually, edit the file "write_db_settings.rb" and run the command "ruby write_db_settings.rb"

During running in the console, a few basic status parameters are displayed:

x 0000 *- y 0000 -- z 0000 *-

For each axis, the coordinates are shown and the status of the end stops. A "-" means the end stop is not activated, a "*" means the and stop is activated. First the home end point is displayed, then the end-of-line end stop.

Main software structure

/farmbot.rb +-----> /lib/messaging.rb                   
            |                                           
            |           /lib/messaging/messaging.rb     
            |                                           
            |           /lib/messaging/messagehandler.rb
            |                                           
            +-----> /lib/controller.rb                  
            |                                           
            |                                           
            +-----> /hardware/gcode/ramps.rb            

Author

  • Rick Carlino

  • Tim Evers

License

The MIT License

Copyright (c) 2014 Farmbot Project

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.