farmbot-serial 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61087c538ee886dd6030ebb713f7463f912017d3
4
- data.tar.gz: 84166a472181c9dad33a0f4a6477a7af6ee700d3
3
+ metadata.gz: 36f578bd91bd95febe44ce8f75b1590d668cbf99
4
+ data.tar.gz: e5cdea88aa5cab14e18e939af4628df061b4ec24
5
5
  SHA512:
6
- metadata.gz: fdbcadb1607ee0cc2d0146f860d82129a6417c415c98819ef6abaab2c71076e7031f0afec753ce09c815f53bbde591e1e1ead1c623260e5e8d243093cdb4d79f
7
- data.tar.gz: f154ffb8c945c40ae88e7976a6dfe51bb2eca1fdf2316547d9a55b1f10ad4d7b7bf801b830cc3464b7b154f0e173cbaf51ec3dbea4e7b6b64ffe4ff5ea89fc82
6
+ metadata.gz: 6c0365da760d44e89efedfb3e2ea6355895fc9158a6b894671a289283dbd3dec851c45aafffce5ee092f8a2de080ef687aa655c464a7b8b382d4edcf98214ecb
7
+ data.tar.gz: d88848b219d0dac50f3693fc2944b88d04ffa6a3ce04405fd4d2d1ee0f5b0dd97a8a495b94c050559d7f7da110307d668f48e7edf7d9392fd3c8bea9421d1698
data/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ # STOP! You might not need this.
2
+
3
+ `farmbot-serial` is a component used by the [Farmbot Raspberry Pi](https://github.com/FarmBot/farmbot-raspberry-pi-controller). If you are just trying to install a FarmBot, you do not need to use this. This component will be auto installed when you install the [Raspberry Pi Controller](https://github.com/FarmBot/farmbot-raspberry-pi-controller).
4
+
5
+ If you are a developer looking to work directly with the FarmBot serial interface, you're in the right place.
6
+
1
7
  # Farmbot-Serial
2
8
 
3
9
  A ruby gem for controlling Farmbot via serial line with EventMachine.
data/lib/arduino.rb CHANGED
@@ -4,8 +4,9 @@ require_relative 'arduino/incoming_handler'
4
4
  require_relative 'arduino/outgoing_handler'
5
5
  require_relative 'arduino/event_machine'
6
6
  require_relative 'arduino/status'
7
- # Communicate with the arduino using a serial interface
8
7
  module FB
8
+ # Software abstraction layer for the Arduino's serial interface. Translates
9
+ # Ruby method calls into serial commands.
9
10
  class Arduino
10
11
  Position = Struct.new(:x, :y, :z)
11
12
 
@@ -1,5 +1,5 @@
1
1
  module FB
2
- # Handles Gcode that moves from the Arduino to the Pi (Arduino -> Pi).
2
+ # Handles Gcode that was sent by the ARDUINO to the RASPBERRY PI.
3
3
  class IncomingHandler
4
4
  attr_reader :bot
5
5
 
@@ -1,6 +1,6 @@
1
1
  module FB
2
- # Responsible for writing to the serial line. Sends Gcode from the pi to the
3
- # arduino. (Pi -> Arduino)
2
+ # Writes GCode to the serial line. Creates messages the travel from the PI to
3
+ # the ARDUINO.
4
4
  class OutgoingHandler
5
5
  attr_reader :bot
6
6
 
@@ -1,5 +1,8 @@
1
1
  require 'ostruct'
2
2
  module FB
3
+ # A status register that caches the state of the Arduino into a struct. Also
4
+ # broadcasts changes that can be hooked into via the onchange() event.
5
+ # bot.status[:X] # => Returns bot X coordinate.
3
6
  class Status
4
7
  # Map of informational status and default values for status within Arduino.
5
8
  DEFAULT_INFO = {X: 0, Y: 0, Z: 0, S: 10, BUSY: 1, LAST: 'none', PINS: {}}
@@ -1,8 +1,9 @@
1
1
  require 'serialport'
2
2
 
3
- # This object creates a Serial IO with sane defaults, since most FarmBot setups
4
- # follow the same serial configuration setup. You can build your own SerialPort
5
- # object also, if that's what you need.
3
+ # This object creates a Serial IO Object with sane defaults, since most FarmBot
4
+ # setups follow the same serial configuration setup. You can build your own
5
+ # SerialPort object also, if that's what you need. DefaultSerialPort is just a
6
+ # suggestion, rather than the only option. Any serial connection will work.
6
7
  module FB
7
8
  class DefaultSerialPort < SerialPort
8
9
  COM_PORT = '/dev/ttyACM0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: farmbot-serial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Evers
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-12 00:00:00.000000000 Z
12
+ date: 2015-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - ">="
171
171
  - !ruby/object:Gem::Version
172
- version: 2.2.0
172
+ version: 1.9.3
173
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  requirements:
175
175
  - - ">="