flying_robot 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/History.txt
CHANGED
data/README.rdoc
CHANGED
data/README.txt
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
class Maxsonar < ArduinoPlugin
|
6
6
|
external_variables "unsigned long maxsonar_refresh_rate = 1000"
|
7
7
|
external_variables "unsigned long maxsonar_last_reading_time = 0"
|
8
|
-
external_variables "
|
8
|
+
external_variables "int last_maxsonar_distance = 0"
|
9
9
|
external_variables "int ping_rx"
|
10
10
|
external_variables "bool maxsonar_init_complete"
|
11
11
|
|
12
12
|
add_to_setup "maxsonar_init_complete = false;"
|
13
13
|
|
14
|
-
|
14
|
+
int maxsonar_distance () {
|
15
15
|
return last_maxsonar_distance ;
|
16
16
|
}
|
17
17
|
|
@@ -26,16 +26,15 @@ class Maxsonar < ArduinoPlugin
|
|
26
26
|
|
27
27
|
delay(250);
|
28
28
|
digitalWrite(reset_pin, HIGH);
|
29
|
+
digitalWrite(reset_pin, LOW); // Activating MCU internal pull-down resistor
|
30
|
+
digitalWrite(reset_pin, HIGH);
|
29
31
|
delay(100);
|
30
32
|
last_maxsonar_distance = 0;
|
31
33
|
maxsonar_init_complete = true ;
|
32
34
|
}
|
33
35
|
|
34
36
|
int read_maxsonar(int an_pin) {
|
35
|
-
|
36
|
-
dist = analogRead(an_pin);
|
37
|
-
dist = (dist / 2);
|
38
|
-
return dist;
|
37
|
+
return analogRead(an_pin) / 2 ;
|
39
38
|
}
|
40
39
|
|
41
40
|
void update_maxsonar(int an_pin, int reset_pin) {
|
data/flying_robot.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "flying_robot"
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ron Evans"]
|
9
|
-
s.date = %q{2009-11-
|
9
|
+
s.date = %q{2009-11-17}
|
10
10
|
s.default_executable = %q{flying_robot}
|
11
11
|
s.description = %q{flying_robot takes a standard Ruby Arduino Development (RAD) project, and turns it into a Unmanned Aerial Vehicle (UAV)}
|
12
12
|
s.email = ["ron dot evans at gmail dot com"]
|
data/lib/flying_robot.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flying_robot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ron Evans
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-17 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|