Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

.gitignore is now working

  • Loading branch information...
commit a88833a3f0875ba7743f5e1d6ffdfca5a2aee5c4 1 parent 963ce9e
Jonathan Katon authored
17 .svn/all-wcprops
... ... @@ -1,17 +0,0 @@
1   -K 25
2   -svn:wc:ra_dav:version-url
3   -V 22
4   -/svn/!svn/ver/19/trunk
5   -END
6   -Has_Orange_and_Yellow_Working.pde
7   -K 25
8   -svn:wc:ra_dav:version-url
9   -V 56
10   -/svn/!svn/ver/18/trunk/Has_Orange_and_Yellow_Working.pde
11   -END
12   -README.txt
13   -K 25
14   -svn:wc:ra_dav:version-url
15   -V 33
16   -/svn/!svn/ver/21/trunk/README.txt
17   -END
105 .svn/entries
... ... @@ -1,105 +0,0 @@
1   -10
2   -
3   -dir
4   -19
5   -https://emma-5-navigation.googlecode.com/svn/trunk
6   -https://emma-5-navigation.googlecode.com/svn
7   -
8   -
9   -
10   -2012-02-07T19:03:13.998866Z
11   -19
12   -jkaton125
13   -
14   -
15   -
16   -
17   -
18   -
19   -
20   -
21   -
22   -
23   -
24   -
25   -
26   -
27   -012973a8-93a4-64ee-d692-0806c915260c
28   -
29   -.git
30   -dir
31   -
32   -NavControl
33   -dir
34   -
35   -Has_Orange_and_Yellow_Working.pde
36   -file
37   -
38   -
39   -
40   -
41   -2012-02-07T18:59:02.000000Z
42   -d4e8736e4fb8a2896bc74c42f02f4187
43   -2012-02-07T18:59:12.346214Z
44   -18
45   -jkaton125
46   -
47   -
48   -
49   -
50   -
51   -
52   -
53   -
54   -
55   -
56   -
57   -
58   -
59   -
60   -
61   -
62   -
63   -
64   -
65   -
66   -
67   -6335
68   -
69   -README.txt
70   -file
71   -21
72   -
73   -
74   -
75   -2012-02-09T01:06:35.000000Z
76   -7c93d2cfa97ccd950a0b324b7db27e2e
77   -2012-02-24T02:57:01.888704Z
78   -21
79   -jkaton125
80   -
81   -
82   -
83   -
84   -
85   -
86   -
87   -
88   -
89   -
90   -
91   -
92   -
93   -
94   -
95   -
96   -
97   -
98   -
99   -
100   -
101   -807
102   -
103   -Unused Code
104   -dir
105   -
275 .svn/text-base/Has_Orange_and_Yellow_Working.pde.svn-base
... ... @@ -1,275 +0,0 @@
1   -//For now and now get rid of summing and averages, get it to work with just what is going on now, and then move into arrays
2   -
3   -
4   -// accelerometer part # A7260
5   -// K911014
6   -// Yellow and Purple wire need to both input 00 into the accelerometer. yellow wire is in arduino pin #22, purple is in #23
7   -//x output is blue wire arduino pin 13, y output is orange wire arduino pin 14, z output is red wire arduino pin 15.
8   -
9   -#define maxCurb 0.1016 //max height of scalable curb
10   -
11   -#include <math.h>
12   -
13   -//definitions
14   -#define angle 0.972412853719443 //1.2065 meters is bottom of triangle 0.56515 is side
15   -#define sensorElev 0.5842 //.186182 meters
16   -
17   -//ultrasonic
18   -#define bw 24
19   -#define rx 25
20   -#define aAN 0
21   -#define bAN 1
22   -
23   -//accelerometer
24   -#define gs1 22
25   -#define gs2 23
26   -#define xPin 13
27   -#define yPin 14
28   -#define zPin 15
29   -#define offset 1690
30   -
31   -// mV/g for each axis
32   -#define sz 830
33   -#define sx 850
34   -#define sy 680
35   -
36   -#define g 9.81
37   -#define numSampls 50 //Trying a lower number, original was 100
38   -
39   -#define slowVal 1.1144
40   -#define stopVal 0.5064
41   -#define slowValu 0.1524
42   -#define stopValu 0.0508
43   -
44   -#define inclineLimit 2 //max incline
45   -#define declineLimit 2 //max decline
46   -
47   -//pins for testing, will be replaced by writes to the bus
48   -#define testSlow 51
49   -#define testStop 48
50   -#define testGo 50
51   -
52   -
53   -//global variables
54   -int SumX, SumY, SumZ, Xavg, Yavg, Zavg;
55   -//float Xavg, Yavg, Zavg, aX, aY, aZ, vX, vY, vZ, pvX, pvY, pvZ, cpY, tElev, tDist;
56   -float aX, aY, aZ, vX, vY, vZ, pvX, pvY, pvZ, cpY, tElev, tDist;
57   -unsigned long dt, prevTime;
58   -int yPs[10];
59   -int tEs[10];
60   -int aVal = 0; //The value read from pin A0
61   -//int bVal = 0; //The value read for pin A2
62   -int aSum = 0; //Sum of the read values of a
63   -//int bSum = 0; //Sum of the read values of b
64   -//float bAvg = 0; //Average of the sums of b
65   -float aAvg = 0;
66   -float sensorInput;
67   -float slope;
68   -
69   -//setup
70   -void setup(){
71   -
72   - Serial.begin(9600);
73   -
74   - //testing
75   - pinMode(testSlow, OUTPUT);
76   - pinMode(testStop, OUTPUT);
77   - pinMode(testGo, OUTPUT);
78   -
79   -
80   - //pinMode(gs1, OUTPUT);
81   - //pinMode(gs2, OUTPUT);
82   -
83   - pinMode(bw, OUTPUT);
84   - pinMode(rx, OUTPUT);
85   -
86   -
87   - //analog inputs
88   - pinMode(aAN, INPUT);
89   - pinMode(bAN, INPUT);
90   -
91   - //hold BW HIGH
92   - digitalWrite(bw, HIGH);
93   -
94   -
95   - //start sensors
96   - digitalWrite(rx, HIGH);
97   - //hold RX high for 20-50 microseconds
98   - delayMicroseconds(20);
99   - pinMode(rx, INPUT); //return to "HIGH IMPEDANCE STATE"
100   -
101   -
102   - //digitalWrite(gs1, LOW);
103   - //digitalWrite(gs2, LOW);
104   - Serial.begin(9600);
105   -}
106   -
107   -
108   -void loop(){
109   -
110   -
111   - //it would probably be better to alternate an accelerometer and ultrasonic reads
112   -
113   -
114   - //get brief average of accelerometer reads
115   - SumX = 0;
116   - SumY = 0;
117   - SumZ = 0;
118   -
119   - analogReference(EXTERNAL);
120   - //Serial.println(xPin);
121   - //Serial.println(yPin);
122   - //Serial.println(zPin);
123   -
124   - for(int i=0; i<numSampls; i++){
125   - SumX = SumX + analogRead(xPin);
126   - SumY = SumY + analogRead(yPin);
127   - SumZ = SumZ + analogRead(zPin);
128   - Serial.println(SumX);
129   - Serial.println(SumY);
130   - Serial.println(SumZ);
131   - }
132   -
133   - Xavg = SumX/numSampls;
134   - Yavg = SumY/numSampls;
135   - Zavg = SumZ/numSampls;
136   - //Serial.println("x value is" + Xavg);
137   - //Serial.println("y value is" + Yavg);
138   - //Serial.println("z value is" + Zavg);
139   -
140   - aX = (((Xavg * 3.301)-offset)/sx)*g;
141   - aY = (((Yavg * 3.301)-offset)/sy)*g;
142   - aZ = (((Zavg * 3.301)-offset)/sz)*g;
143   -
144   - dt = micros()-prevTime;
145   -
146   - vX = pvX + aX*dt; //velocity
147   -
148   - cpY = yPs[0] + .5*aY*dt*dt; //position
149   -
150   - //an array of previous positions. should be a for loop with a definition indicating the length of the array
151   - yPs[9] = yPs[8];
152   - yPs[8] = yPs[7];
153   - yPs[7] = yPs[6];
154   - yPs[6] = yPs[5];
155   - yPs[5] = yPs[4];
156   - yPs[4] = yPs[3];
157   - yPs[3] = yPs[2];
158   - yPs[2] = yPs[1];
159   - yPs[1] = yPs[0];
160   - yPs[0] = cpY;
161   -
162   - prevTime = prevTime + dt;
163   -
164   -
165   -
166   -
167   - //get distance sensor input
168   -
169   - aSum = 0;
170   - //bSum = 0;
171   -
172   - analogReference(DEFAULT);
173   - //The loop sums up 100 values read from the sensors
174   - for (int i=0; i<numSampls; i++) {
175   - aSum = aSum + analogRead(aAN); //Get sensor read and convert the values into meters
176   - //bSum = bSum + analogRead(bAN);
177   - }
178   -
179   - //Average the sums of the values. The for loop and this step together provide a
180   - //more precise reading of the distance.
181   - aAvg = aSum / numSampls;
182   - //bAvg = bSum / numSampls;
183   - sensorInput = aAvg/*+bAvg)/2*/ * 0.01295;
184   -
185   -
186   -
187   - //testing
188   - Serial.print("sensor input ");
189   - Serial.println(sensorInput);
190   -
191   - tElev = sensorElev - cos(angle)*sensorInput;
192   -
193   - //testing
194   - Serial.print("Elevation is ");
195   - Serial.println(tElev);
196   -
197   - //array of target elevations
198   - /*tEs[9] = tEs[8];
199   - tEs[8] = tEs[7];
200   - tEs[7] = tEs[6];
201   - tEs[6] = tEs[5];
202   - tEs[5] = tEs[4];
203   - tEs[4] = tEs[3];
204   - tEs[3] = tEs[2];
205   - tEs[2] = tEs[1];
206   - tEs[1] = tEs[0];
207   - tEs[0] = tElev;*/
208   -
209   -
210   - tDist = sin(angle)*sensorInput;
211   -
212   - //testing
213   - Serial.print("Distance is ");
214   - Serial.println(tDist);
215   - Serial.println("");
216   -
217   -
218   -
219   - if (tDist <= slowVal && tDist > stopVal) {
220   - digitalWrite(testSlow, HIGH);
221   - //delay(500);
222   - //digitalWrite(testSlow, LOW);
223   -
224   - }
225   - if (tDist > slowVal && tDist > stopVal) {
226   - digitalWrite(testSlow, LOW);
227   - }
228   -
229   -
230   - if (tDist <= stopVal) {
231   - digitalWrite(testStop, HIGH);
232   - // delay(500);
233   - //digitalWrite(testStop, LOW);
234   - digitalWrite(testSlow, LOW);
235   - }
236   - if (tDist > stopVal) {
237   - digitalWrite(testStop, LOW);
238   - }
239   -
240   - //at the moment, it just uses the extremes (oldest and newest) of it's stored data to calculate the slope, there is a better way to do this
241   - slope = (tEs[9]-tEs[0])/(yPs[9]-yPs[0]);
242   -
243   - //if(slope>inclineLimit || ((slope*-1)>declineLimit) )}
244   - //^uphill too much //^downhill too much
245   -
246   -
247   - //check to see if the height is scalable
248   - if(tElev<maxCurb){
249   - //scaleable
250   - //drive
251   -
252   - //testing for now
253   - digitalWrite(testGo, LOW);
254   - //delay(500);
255   - //igitalWrite(testGo, LOW);
256   - }
257   -
258   - //else{
259   - if(tElev>=maxCurb){
260   - //not scaleable
261   - //stop the robot
262   - digitalWrite(testGo, HIGH);
263   -
264   - //testing
265   - //digitalWrite(testStop, HIGH);
266   - //delay(500);
267   - //digitalWrite(testStop, LOW);
268   -
269   - }
270   - }
271   -
272   - //testing
273   - //delay(1000);
274   -//}
275   -
41 NavControl/.svn/all-wcprops
... ... @@ -1,41 +0,0 @@
328 NavControl/.svn/entries
... ... @@ -1,328 +0,0 @@
123 NavControl/.svn/text-base/DriveControl.cpp.svn-base
... ... @@ -1,123 +0,0 @@
51 NavControl/.svn/text-base/DriveControl.h.svn-base
... ... @@ -1,51 +0,0 @@
191 NavControl/.svn/text-base/NavControl.ino.svn-base
... ... @@ -1,191 +0,0 @@
57 NavControl/.svn/text-base/UltrasonicSensors.cpp.svn-base
... ... @@ -1,57 +0,0 @@