I Need a Buddy PLEASE HELP

Advanced User Please Help

Hi I have had a Head injury and I have fits MOST days some times 0 sometimes say 3 and other times it bites me up the bum and it is one after another for HOURS. I have bought an arduino and done most of the tutorials. I have played with electronics since about 1974 I am now 52 can not work due to my problems. I want something to push my mind to the limit and think arduino could do it. Is there anybody out there that could please help me I will try my best on the programs then want backup to put me right so i know if i am trying to get a program working i have a buddy that will help me and not feel on my own. I have a carer that takes me out on Tues mornings and Friday afternoon only saying that so you know i do have a problem and the help would be VERY much appreciated. (Oh and my spelling is crap). Regards Bill

There are lots of good folks here willing to help. Just post on the right board, give good complete descriptions of what you're trying to do, what difficulty you have, describe your circuit, post your code using the # button, be specific about everything. Sorry to hear about your situation, hope it improves. Arduino is a blast and it sounds like you've already discovered that. There's lots more where that came from. I think you'll end up with more than one buddy. Cheers!

HI Jack Christensen I am trying to run two lots of led's at different speeds. I Think i can run the hardware with mosfet's on my own but programming is the problem. I have tried the following but get one quick flash then one slow flash and i want to have outline of tumble dryer sign running fast at the same time as the drum of a tumble dryer running slow. If that helps. I am looking for a cross turning right as like a clock 12 oclock 5 past 10 past and so on till half past as the led line would go from top to bottom so twenty five to would be 5 past hope you understand.

/* Blink Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain. */

void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); pinMode(12, OUTPUT); }

void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second digitalWrite(12, HIGH); delay (100); digitalWrite12, LOW); delay(100): }

That is just trying to alter blink. Thanks for being the first to reply and hope i can ask you for help again. I dont want code written for me but i think i have made a promiss i can not keep at the moment. Regards Bill

You can NEVER have two timed actions happeing at the same time when you use delay(). You must use the millis() and implement a timer. http://arduino.cc/playground/Code/AvoidDelay

In your case something along the lines

unsigned long Tmr1 , Tmr2 ;
int Led1State, Led2State ;
void setup() { setup pins ... }
void loop() {
  if (millis() - Tmr1 > 1000UL) { ... toggle LedState and digitalWrite it to Led   }
  ditto for 2nd Led

And WHY have you posted the same question twice?!?

Dont do it agin. It annoys some people. You can not "hurry" voluteers for a quicker answer.

billyboy1959, Please don't post the same request for help in numerous places. If it's not the right place to start, a moderator will move it.

You've got PaulS helping you out on this same thing in another thread, figure out which conversation you want to keep.

Sorry i Thought i deleted the other SORRY again And thanks for the reply. Regards Bill

SORRY All I want to delete the other post but can not work out how to do it could a mod please do it for me Regards Bill

Opps, I forgot, "don't cross-post" :blush:

PaulS wrote a VERY good reply on the other thread about blinking two LEDs at different speeds. I happen to have a sketch that does exactly that, I almost posted it, until I saw PaulS' post. Didn't want to spoil it for you in case you wanted to think on that. But if you want me to post it, reply to me on the other thread please. But think on it a while. As someone said, one clue is not to use the delay() function. Second, as PaulS said, the millis() function is your stopwatch. Third, look at the example sketch in the IDE, File > Examples > 2.Digital > BlinkWithoutDelay. That really does what you want, it just needs a second LED added. Once you understand how it works with one LED, adding a second should be straightforward.

billyboy1959: SORRY All I want to delete the other post but can not work out how to do it could a mod please do it for me Regards Bill

No worries, go get those LEDs blinking! XD

Sorry Jack I did not mean it like that i have had a bad day have put 2 posts that has upset people i think i should ask mods to delete both and start again. But hope you would reply SO SO SORRY. I feel so bad now to go on a new forum and start with a bad night i have used many forums in the past and put a lot of input into them but got off on a bad footing here. Sorry to ALL. Regards Bill

Not a problem Bill. Happens a lot, we're used to guiding folks along.