Arduino Forum

Community => Gigs and Collaborations => Topic started by: bmanthey on Oct 26, 2015, 04:47 pm

Title: I need a Programmer... ASAP
Post by: bmanthey on Oct 26, 2015, 04:47 pm
I am not a programmer, and I need a solution quickly, so I don't have time to troubleshoot and learn the programming necessary to make it work. So, anyone that can write me a program and send it to me I would truly appreciate.

I purchased an ARDUINO Uno, and I hope that it will work for the following application.

I'm going to provide as much information as I can here, but if you have a questiopn, please send me an e-mail. Bob@benchmark.us.com

I have attached a Rendering of what we are building, and a basic wiring schematic.

Pit Crew Challenge Lights and Timers

Inputs: (4) N.O. Momentary push button
Start Button = StartButton
Reset Button = ResetButton
Stop Button for Player 1 = StopButtonP1
Stop Button for Player 2 = StopButtonP2

Outputs: (7) 12VDC LED Lights
YellowLight1
YellowLight2
YellowLight3
GreenLightP1
GreenLightP2
RedLightP1
RedLightP2

Outputs: (4) Momentary Closed Contact
TimerStartStopP1
TimerStartStopP2
TimerResetP1
TimerResetP2

The TIMERS are stand alone units. The START and STOP are the same input, and just require a momentary closed circuit, so the output for Start and Stop are the same.
The RESET also just requires a momentary closed contact.

Start - When the operator presses the StartButton, The yellow lights light in order 1,2,3, with a 1 second delay between, then the yellow lights go off and the Green lights come on - at the same time the (2) timers are started.
This is to simulate the starting lights at a Drag Race.

   if (StartButton)  //is pressed
      YellowLight1 = ON
         wait 1 second
      YellowLight2 = ON
         wait 1 second
      YellowLight3 = ON
         wait 1 second
      YellowLight1 = OFF
      YellowLight2 = OFF
      YellowLight3 = OFF
      GreenLightP1 = ON
         TimerP1 = START
      GreenLightP2 = ON
         TimerP1 = START

Once the timers are started, the 2 contestants need to complete their task, when they have finished, they press their STOP button.
When one of the contestants presses their STOP button, that players timer is stopped, their GREEN light goes off and their RED light comes on.
The other contestants timer continues to run and their GREEN light remains illuminated until their STOP button is pressed.

loop  //wait for player input
   if (StopButtonP1) //is pressed
      TimerStartStopP1 = STOP
      GreenLightP1 = off
      RedLightP1 = ON

   if (StopButtonP2) //is pressed
      TimerStartStopP2 = STOP
      GreenLightP2 = off
      RedLightP2 = ON

RESET - When the round is over (Both timers are stopped and both RED lights are illuminated) The operator presses the RESET button. Both Timers are RESET to 00:00 and all of the lights are off.

   if (ResetButton)  //is pressed
      RedLightP1 = OFF
      TimerResetP1 = Reset
      RedLightP2 = OFF
      TimerResetP2 = Reset
Title: Re: I need a Programmer... ASAP
Post by: groundFungus on Oct 26, 2015, 04:54 pm
How much does the job pay?
Title: Re: I need a Programmer... ASAP
Post by: PaulS on Oct 26, 2015, 04:54 pm
You know that the Arduino is a 5V device, right? You'll need transistors to control 12V lights.

The timer displays only need to be turned on or reset to make them count or stop?

The coding seems trivial.
Title: Re: I need a Programmer... ASAP
Post by: bmanthey on Oct 26, 2015, 05:36 pm
The programming is trivial... but I'm not a programmer, so to me it's impossible.

The Timers are complete buy-out devices. I am just tapping into the blister-switches on the device to START-STOP and RESET.

Can I use Relays for the lights? I can set up a dayghter board with relays to handle the 12VDC line.

Can you do the programming for the ARDUINO UNO for me.
Title: Re: I need a Programmer... ASAP
Post by: DVDdoug on Oct 26, 2015, 05:53 pm
sorry...  I've rather pessimistic about this...

Professional programmers generally charge around $100 USD an hour for consulting/contract work  (about the same price as a plumber or auto mechanic).   Most of us here are hobbyists so you can get plenty of free advice and help if you want to do it yourself, or maybe you can hire someone cheaper.  But, a custom program is NEVER a 1-hour job!  You can negotiate whatever you want, but usually these are by-the-hour contracts (not fixed-price), sometimes with a "not to exceed" stipulation.   But, if the programmer agrees not to exceed 8 hours, that doesn't mean the program will meet your expectations in 8 hours...     It means if you want additional work, he can't charge you without your approval.

This might be a one day job if all the specs & requirements are nailed-down, but they usually aren't.   There's usually some back-and-forth, tweaking & debugging and it might turn into 2 or 3 days.

For a microcontroller project, the programmer usually needs his hands on the hardware (or a reasonable approximation/simulation of the final hardware).

Anything for competition usually needs to be calibrated, verified, and certified so that no one questions the timing.  A backup system might be required too.   Nobody is going to trust a homemade timing mechanism.   For "serious" competition, sometimes there is a sanctioning body, and they may need to approve any timing system. 
Title: Re: I need a Programmer... ASAP
Post by: PaulS on Oct 26, 2015, 06:11 pm
Quote
Can I use Relays for the lights?
Sure. You need transistors to drive them... Transistors are cheap. Relays are not.
Title: Re: I need a Programmer... ASAP
Post by: TomGeorge on Oct 27, 2015, 09:56 am
Hi,

I'd say you will need a circuit diagram as well to go with the program?

Tom..... :)
Title: Re: I need a Programmer... ASAP
Post by: PaulMurrayCbr on Oct 30, 2015, 07:13 am
I might have a look at this over the weekend. Tonight I play D&D, and then go out and get drunk.

Now - this "momentary closed contact" - how "momentary" is momentary? I'll assume that your timer is fast enough to catch a consecutive write of a high and a low: the pulse will be on the order of microseconds.

We don't have a "closed" output. You can have earthed, +5v, or (I think) floating. For instance, we can raise a pin from earth to +5v - the usual case I imagine, but it might be reversed.

Assuming that the referee should be able to press reset at any time.

Assuming that you don't care what happens if a player is holding down their button during the countdown - although I could code in some 'foul!' functionality. Make the guilty player's red light flash, perhaps.

I count 15 pins required to make this go, which is two too many on my arduino UNO. If we combine the timer reset for both players, it's still too many. Cheapest way to fix this is to use the analog inputs for the four buttons. This will require a few resistors.


(EDIT)

Oh, and no - you can't use relays for the lights. Relay coils are a heavy inductive load and draw a lot of current. I have had a lot of success using a 'darlington array' chip. They are five bucks or so.
Title: Re: I need a Programmer... ASAP
Post by: DuaneDegn on Oct 30, 2015, 05:10 pm
Oh, and no - you can't use relays for the lights. Relay coils are a heavy inductive load and draw a lot of current. I have had a lot of success using a 'darlington array' chip. They are five bucks or so.

Relays work fine for lights. Most relay coils draw more current than you'd want to source from an I/O pin but normally the relay is powered through a transistor. There are lots of relays with a coil current of a few tens of milliamps. Besides the transistor you need a diode to allow the coil's current to continue to flow once the coil is turned off.

If the lights will be on for a long time you don't want to continually power the relay, you could use latching relays. A latching relay requires power to change its state but not to maintain state.

While relays are an option, they may not be the best option. Your original darlington array idea would likely be easier to implement.
Title: Re: I need a Programmer... ASAP
Post by: Vaclav on Oct 31, 2015, 04:45 pm
sorry...  I've rather pessimistic about this...

Professional programmers generally charge around $100 USD an hour for consulting/contract work  (about the same price as a plumber or auto mechanic).   Most of us here are hobbyists so you can get plenty of free advice and help if you want to do it yourself, or maybe you can hire someone cheaper.  But, a custom program is NEVER a 1-hour job!  You can negotiate whatever you want, but usually these are by-the-hour contracts (not fixed-price), sometimes with a "not to exceed" stipulation.   But, if the programmer agrees not to exceed 8 hours, that doesn't mean the program will meet your expectations in 8 hours...     It means if you want additional work, he can't charge you without your approval.

This might be a one day job if all the specs & requirements are nailed-down, but they usually aren't.   There's usually some back-and-forth, tweaking & debugging and it might turn into 2 or 3 days.

For a microcontroller project, the programmer usually needs his hands on the hardware (or a reasonable approximation/simulation of the final hardware).

Anything for competition usually needs to be calibrated, verified, and certified so that no one questions the timing.  A backup system might be required too.   Nobody is going to trust a homemade timing mechanism.   For "serious" competition, sometimes there is a sanctioning body, and they may need to approve any timing system. 
Excellent and long overdue here. Thanks.

I would add
It is important to have open communication during facts finding and negotiation phase.

The solicitor (?) already failed to answer few questions...

So to paraphrase "Sharks tank" ( popular US TV show ) ... I am out...



Title: This sketch seems to work ok.
Post by: PaulMurrayCbr on Nov 01, 2015, 05:02 am
Ok, man: here you go. Sketch attached.

I have added "foul" detection, and I have added logic so that if the player's button is pressed during the "stopped" state, then it blips the timer start/stop pin. Maybe this isn't a good idea, but whatever.

This seems to work ok for me with LEDs. The analog inputs are attached to resistors that are orange-orange-orange-gold, and then those resistors are plugged into 5v. The four input buttons ground the analog out. Seems to work ok. (Instead of buttons, I just touched a wire to the correct side of the resistor. Touch it to the wrong side and the Arduino goes bye-bye for a second or two.)

Issues:

* I can't test that the timer works correctly. I hope it does.

* If one player fouls during the countdown, then the sketch is left in "countdown" state. This means that any press by the other player will also be counted as a foul

If you wanna send me money, we can do it via paypal. 2 hours. Normally I charge $100/hr AUD, but that's for Java at which I have years of experience. For C++ on an arduino - let's say a quarter of that and $50AUD for the two hours and not a word to the tax man.

---

(EDIT) Crap, I forgot to turn debugging off. Just comment out that line where DEBUG gets defined.

(EDIT 2) Video at https://www.youtube.com/watch?v=wcDVXKPXJgQ
Title: Re: I need a Programmer... ASAP
Post by: Vaclav on Nov 01, 2015, 04:24 pm
Ok, man: here you go. Sketch attached.

I have added "foul" detection, and I have added logic so that if the player's button is pressed during the "stopped" state, then it blips the timer start/stop pin. Maybe this isn't a good idea, but whatever.

This seems to work ok for me with LEDs. The analog inputs are attached to resistors that are orange-orange-orange-gold, and then those resistors are plugged into 5v. The four input buttons ground the analog out. Seems to work ok. (Instead of buttons, I just touched a wire to the correct side of the resistor. Touch it to the wrong side and the Arduino goes bye-bye for a second or two.)

Issues:

* I can't test that the timer works correctly. I hope it does.

* If one player fouls during the countdown, then the sketch is left in "countdown" state. This means that any press by the other player will also be counted as a foul

If you wanna send me money, we can do it via paypal. 2 hours. Normally I charge $100/hr AUD, but that's for Java at which I have years of experience. For C++ on an arduino - let's say a quarter of that and $50AUD for the two hours and not a word to the tax man.

---

(EDIT) Crap, I forgot to turn debugging off. Just comment out that line where DEBUG gets defined.

(EDIT 2) Video at https://www.youtube.com/watch?v=wcDVXKPXJgQ

Ok, man: here you go. Sketch attached.

I have added "foul" detection, and I have added logic so that if the player's button is pressed during the "stopped" state, then it blips the timer start/stop pin. Maybe this isn't a good idea, but whatever.

This seems to work ok for me with LEDs. The analog inputs are attached to resistors that are orange-orange-orange-gold, and then those resistors are plugged into 5v. The four input buttons ground the analog out. Seems to work ok. (Instead of buttons, I just touched a wire to the correct side of the resistor. Touch it to the wrong side and the Arduino goes bye-bye for a second or two.)

Issues:

* I can't test that the timer works correctly. I hope it does.

* If one player fouls during the countdown, then the sketch is left in "countdown" state. This means that any press by the other player will also be counted as a foul

If you wanna send me money, we can do it via paypal. 2 hours. Normally I charge $100/hr AUD, but that's for Java at which I have years of experience. For C++ on an arduino - let's say a quarter of that and $50AUD for the two hours and not a word to the tax man.

---

(EDIT) Crap, I forgot to turn debugging off. Just comment out that line where DEBUG gets defined.

(EDIT 2) Video at https://www.youtube.com/watch?v=wcDVXKPXJgQ

Let's get this straight.

The OP asks for programmer.
One of the replies is- "how much will you pay?" .
The OP does not reply / reacts to the "how much " question.
Pretty nice description on how contract programming works is posted.
The OP does not reply / reacts.
"PaulMurray" posts a code, video etc.

What's wrong with the picture?

OP gets free software !

Is this whole discussion ethical?

IMHO not - maybe someone could use few $ , but "PaulMurray" is now a hero.

Or maybe not, OP did not reply / react.




Title: Re: I need a Programmer... ASAP
Post by: PaulMurrayCbr on Nov 01, 2015, 08:11 pm
What's wrong with the picture?
OP gets free software !
It's a hobby.
A hobby.

The Arduino platform (software, bootloader, IDE) is not a serious, industrial-grade platform and isn't meant to be. It's about hobby, learning, community. If the OP's problem was a days or weeks of work and required someone who understands the platform more thoroughly than my bit of fooling about with it, well that might be different. But it was a couple of hours on a Sunday while the machines (coincidentally, also powered by microprocessors) did my laundry for me.

If the OP actually goes ahead and pays me, well: I was first in, lowest price. Yay for the free market! Isn't that the way it's meant to be?

I hope people read my code and go "Holy shit! This is tres cool and a fine way to put together moderately complex behaviour!" I will not be charging them tuition.

----

(EDIT) Actually - come to think of it, my washing machine and dryer are powered by clockwork. But that's not the point.
Title: Re: I need a Programmer... ASAP
Post by: Vaclav on Nov 01, 2015, 11:43 pm
It's a hobby.
A hobby.

The Arduino platform (software, bootloader, IDE) is not a serious, industrial-grade platform and isn't meant to be. It's about hobby, learning, community. If the OP's problem was a days or weeks of work and required someone who understands the platform more thoroughly than my bit of fooling about with it, well that might be different. But it was a couple of hours on a Sunday while the machines (coincidentally, also powered by microprocessors) did my laundry for me.

If the OP actually goes ahead and pays me, well: I was first in, lowest price. Yay for the free market! Isn't that the way it's meant to be?

I hope people read my code and go "Holy shit! This is tres cool and a fine way to put together moderately complex behaviour!" I will not be charging them tuition.

----

(EDIT) Actually - come to think of it, my washing machine and dryer are powered by clockwork. But that's not the point.
Indeed "holy shit" !

Hobby or no hobby, you missed my point.
Allow me to do the same - changing the subject and taking things out of context as you did.

If it is a hobby who cares about ethics, right?


Title: Re: I need a Programmer... ASAP
Post by: tmd3 on Nov 02, 2015, 04:26 am
Is this whole discussion ethical?
Why wouldn't it be?  Which ethical code would apply here?
Title: Re: I need a Programmer... ASAP
Post by: DuaneDegn on Nov 02, 2015, 04:53 am
Let's get this straight.
One man's work is another person's play.

Nice work PaulMurry

I enjoyed the video. Thanks for posting.
Title: Re: I need a Programmer... ASAP
Post by: PaulMurrayCbr on Nov 02, 2015, 06:27 am
If it is a hobby who cares about ethics, right?
Ok. Can you please articulate the ethical rules that my post violated. The only thing you mention is "maybe someone could use few $", so I'll address that.

Every dollar that "someone else" makes in this circumstance is a dollar that bmanthey pays. So it's ethically neutral from that POV, unless this "someone else" somehow deserves the money more than bmanthey. Now for all I know, bmanthey is doing his pit-stop challenge for poor crippled children, working in a freezing garret on his hobby during his few hours between 10-hour shifts at Mr Scrooge's dickensian insurance adjusting sweatshop. Meanwhile, this "someone else" might have a resume dishonestly padded out to a mile long and knock the project over in 2 hours like I did and charge two full days work at $100/hr.

For all I know.

Another possible ethical violation is that I am setting the price low for everyone else. That I am what trade-unionists term a "scab", here in Australia. Well, what you are proposing is that we here on the arduino forums engage in collusion and price-fixing, which is not only dishonest, but in some places illegal. I'll make this exception: trade unionism and solidarity is moral and just when you are fighting large companies that hold a monopoly over employment and use that monopoly to create unfair working conditions. I don't think bmanthey fits the bill.

Another objection is that my doing this for fifty bucks might discourage the young-uns who might think of making a career coding up microprocessors, who would have been able to add this job to their resume and also earn some pocket-money. I have denied them their first taste of earning actual, sweet sweet moneys for their craft.

This, to me, is the most serious objection, and the thought of it does indeed give me a twinge of guilt.

All I can say is: kids, you are not going to be able to make a living coding up one-off personal arduino projects for dudes on the internet. You are certainly not going to be able to charge $100/hr for it. This may be a brave new world of internet enterprise, but you are almost certainly going to need a job, working for an employer, and doing regular hours. At least at first. In a world where kids are building actual robots in high school, flashing some lights in sequence doesn't really cut it as commercial experience. Those kids who are honestly excited about programming and robotics, and those kids with a knack for entrepreneurship - they won't be put off by this.

Finally, my motivation for doing this was partly vanity. Yes, yes! You're right! I confess - I did it to "be a hero". Does that make my actions wrong? Maybe. At least, to the extent that it does.

But my motive was not entirely vanity: a large part of it was to show people how to use object oriented coding in the context of microcontroller programming, to showcase the principle of encapsulation. Not every arduino program needs to be a rat's nest of globally declared variables. I did this to show people how I think it ought to be done. When a bloke gets to be a certain age, he gets an urge to teach. I think it's instinctive.

So ok, maybe I did a bad thing. But when I think about those crippled orphan children's precious faces lighting up as they do their pit-stop challenge, I think that maybe I didn't.

On balance.
Title: Re: I need a Programmer... ASAP
Post by: PaulMurrayCbr on Nov 02, 2015, 06:52 am
Oh, and you'll notice that bmanthey has not replied to any of this. Why? Because people started blathering on about professional work and charging $100 an hour. Great work, DVDdoug and Vaclav - you have frightened away someone who had a project. Someone who might have used an Arduino for something cool.

I see it all the time on this board. Someone says "I was thinking of doing X" and suddenly its a swarm of downers and nay-sayers. Are there any posts in this subforum, any at all, that are success stories? Where someone said "I need X" and someone else said "I can do X" and everyone was happy?

And then you turn around and give me a hard time about doing it after already declaring that you were "out" (http://www.taleswithmorals.com/aesop-fable-the-dog-in-the-manger.htm).

Do click the link. It links to an old story concerning ethics.