Pages: 1 [2] 3   Go Down
Author Topic: Now Hiring!  (Read 3818 times)
0 Members and 1 Guest are viewing this topic.
Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

cheers
Mike

PS UK based, but electrons get everywhere!
Logged

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

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

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

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26341
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No, he wanted to use ultrasonic sensors & stuff.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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!

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26341
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Exactly! 

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


Logged

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!

New York
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Ignorance is curable with education. Stupidity is refusing to be educated.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

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!

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

while I'm there I can do that as well
all integrated in one package or two separate (but related) projects?
Logged

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

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a rough prototype of some code that should make a start.
Code:
#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

Logged

Rob Gray aka the GRAYnomad www.robgray.com

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a version with no interrupts.

Code:
#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
« Last Edit: January 24, 2012, 10:59:59 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

smiley
Logged

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

Pages: 1 [2] 3   Go Up
Jump to: