Go Down

Topic: Now Hiring! (Read 4423 times) previous topic - next topic

retrolefty


Hi All
I am still looking for anyone to help with the code for my project.  One again,  this is a PAID gig.  I am one week away from the due date and is still in the testing stage.  I can drive the servos and I can test the sensors using the serial monitor but is yet to have the sensor and the servo working together.



It's been almost three months sense your original posting and with one week to blast-off, I assume it's not going to happen you you.

Lefty

mmcp42

#801 here
I'll take a look
you can PM or email me

cheers
Mike

PS UK based, but electrons get everywhere!
there are only 10 types of people
them that understands binary
and them that doesn't

mmcp42

hmm
emails are bouncing
very strange


The original message was received at Mon, 23 Jan 2012 21:30:58 GMT
from localhost.localdomain [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<electric_al@hvc.rr.com>
    (reason: 550 5.1.1 - Invalid mailbox: electric_al@hvc.rr.com)
there are only 10 types of people
them that understands binary
and them that doesn't

Graynomad

It looks like jumpjack tried to contact you.

I'm sure there's many people who are happy to help with a specific problem, maybe those that can do the work are already occupied.

If I read correctly you need to

run for 4 seconds
return to start
run for 8 seconds
return to start
run for 12 seconds
return to start
run for 16 seconds
return to start

Is that it?
______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

No, he wanted to use ultrasonic sensors & stuff.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Graynomad

Just as an over/end of travel measure though isn't it?

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

electric_AL

hi All, email addy is good, just gave Time Warner Cable a piece of my mind. 

this is correct:

run for 4 seconds
return to start
run for 8 seconds
return to start
run for 12 seconds
return to start
run for 16 seconds - by now should reach end of track

then do the same from the other direction.

the sensors are to detect the end of the track.
Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

Graynomad

Quote
then do the same from the other direction.

What does this mean? Move to the other end then repeat the above but reversed?

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

A     B    C     D      E
5 track positions
A-B-A
A-C-A
A-D-A
A-E
E-D-E
E-C-E
E-B-E
E-A
repeat
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

electric_AL

Exactly! 

[font=Verdana]A     B    C     D      E
5 track positions
A-B-A
A-C-A
A-D-A
A-E
E-D-E
E-C-E
E-B-E
E-A

thanks
repeat[/font]


Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

electric_AL

Additionally, I am also in need of an Arduino program to make a lap timer. 

The board:    Mega 2560
The Sensors:  Sharp Proximity sensors = (no contact triggering is a must)
LCD display:   TBD

THe Idea: how long it takes ( seconds/minutes) for my Trolley to travel 10feet of track and display it on a lcd screen and be resettable.  Something similar to a Slot Car lap timing system.


Paid!
Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming

WOW!!!   What a Ride!

mmcp42

while I'm there I can do that as well
all integrated in one package or two separate (but related) projects?
there are only 10 types of people
them that understands binary
and them that doesn't

Graynomad

Here's a rough prototype of some code that should make a start.
Code: [Select]
#define SECTION_TIME 1000  // # of mS to travel a section
#define FOWARDS 1
#define BACKWARDS 0

volatile boolean stop;

void startMotors (int direction) {}; // you write these
void stopMotors () {};

void move (int sections, int direction) {

long time_to_travel = sections * SECTION_TIME;
long start_time = millis();
long stop_time = start_time + time_to_travel;

startMotors (direction);
while (millis() < stop_time && !stop) {}
stopMotors();

stop = false;
}

void fontSensor_ISR() {
stop = true;
}

void backSensor_ISR() {
stop = true;
}

void setup () {
attachInterrupt (0, fontSensor_ISR, RISING);
attachInterrupt (1, backSensor_ISR, RISING);
}

void loop () {

move (1, FOWARDS); // move to A
move (1, BACKWARDS);
move (2, FOWARDS); // move to B
move (2, BACKWARDS);
move (3, FOWARDS); // move to C
move (3, BACKWARDS);
move (4, FOWARDS); // move to D
move (4, BACKWARDS);
move (6, FOWARDS); // move to E (stopped by sensor)

move (1, BACKWARDS); // move to D
move (1, FOWARDS);
move (2, BACKWARDS); // move to C
move (2, FOWARDS);
move (3, BACKWARDS); // move to B
move (3, FOWARDS);
move (6, BACKWARDS); // move to A (stopped by sensor)

delay (1000);

}


It assumes that you get an interrupt from the sensors if you get too close, but now that I think about it that probably is not the case so that should be changed.

Can you use that as a start and build it from there?

I could not get onto the forum most of yesterday so didn't see the new requirements.


______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

Graynomad

#28
Jan 25, 2012, 04:54 am Last Edit: Jan 25, 2012, 04:59 am by Graynomad Reason: 1
Here's a version with no interrupts.

Code: [Select]
#define SECTION_TIME 1000  // # of mS to travel a section
#define FOWARDS 1
#define BACKWARDS 0

void startMotors (int direction) {}; // you write these
void stopMotors () {};
boolean toCloseFront () {}; 
boolean toCloseBack () {}; 

void move (int sections, int direction) {

long time_to_travel = sections * SECTION_TIME;
long start_time = millis();
long stop_time = start_time + time_to_travel;

startMotors (direction);
while (millis() < stop_time) {
if (direction == FOWARDS && toCloseFront()) break;
if (direction == BACKWARDS && toCloseBack()) break;
}
stopMotors();

}

void setup () {
}

void loop () {

move (1, FOWARDS); // move to A
move (1, BACKWARDS);
move (2, FOWARDS); // move to B
move (2, BACKWARDS);
move (3, FOWARDS); // move to C
move (3, BACKWARDS);
move (4, FOWARDS); // move to D
move (4, BACKWARDS);
move (6, FOWARDS); // move to E (stopped by sensor)

move (1, BACKWARDS); // move to D
move (1, FOWARDS);
move (2, BACKWARDS); // move to C
move (2, FOWARDS);
move (3, BACKWARDS); // move to B
move (3, FOWARDS);
move (6, BACKWARDS); // move to A (stopped by sensor)

delay (1000);

}



______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

mmcp42

just for the thread
I'm on the case now
got a solution working not too far from the method suggested by Rob (Graynomad)

:)
there are only 10 types of people
them that understands binary
and them that doesn't

Go Up