seeduino project

hi,
i want to use a small arduino package, seeduino ? to

  1. when turned on lights a red led
    2)by pressing a momentary switch lights another led, which i can also use to turn a mosfet switch on
    3)again pressing the momentary switch lights another led, which i can also use to turn a mosfet switch on
    4)again pressing the momentary switch lights another led, which i can also use to turn a mosfet switch on
    5)again pressing the momentary switch lights another led, which i can also use to turn a mosfet switch on

only the red led on start up needs to remain on after each press of the switch.

would it be possible for someone to write me a sketch for this?

i am afraid i am not a programmer and it is way beyond my understanding.
any comments welcome.

thank you
dave

(deleted)

It does not quite work like that. We can guide you so you can learn.

You can ask a moderator to move it to the Gigs section if you're not prepared to learn. Be prepared to pay a little or lots.

Which LED's do you plan to use?

I plan to use cheap red bog std leds

maybe I am a bit naïve to expect someone to write what I guess is a few lines of code (from what I can gather)and what to them maybe no more than 10 to 15mins work realistically, for free.

my main interests lie elsewhere and I find the forums I use people are far more shall I say friendly and offer help to new users, than they appear to be here.

I frequently help people for free and do not act like the mercenary poster above suggesting payment.

great welcoming post people, keep it up.

This is not a "hire someone for free to do my work"-kind og situation. Which type of Arduino board are you using?

byte led1 = 2;
byte led2 = 3;
byte led3 = 4;
byte led4 = 5;
byte led5 = 6;
byte button = 7;
byte ledNext = 2;

void setup(){
pinMode (led1, OUTPUT);
digitalWrite (led1,  HIGH);
pinMode (led2, OUTPUT);
pinMode (led3, OUTPUT);
pinMode (led4, OUTPUT);
pinMode (led5, OUTPUT);
pinMode (button, INPUT_PULLUP);
}
void loop(){

if ((digitalRead (button) == LOW) &&  (ledNext ==2)){
digitalWrite (led2,  HIGH);
ledNext = 3;
delay(1000);
digitalWrite (led2,  LOW);
}
if ((digitalRead (button) == LOW) &&  (ledNext ==3)){
digitalWrite (led3,  HIGH);
ledNext = 4;
delay(1000);
digitalWrite (led3,  LOW);
}
if ((digitalRead (button) == LOW) &&  (ledNext ==4)){
digitalWrite (led4,  HIGH);
ledNext = 5;
delay(1000);
digitalWrite (led4,  LOW);
}
if ((digitalRead (button) == LOW) &&  (ledNext ==5)){
digitalWrite (led5,  HIGH);
ledNext = 2;
delay(1000);
digitalWrite (led5,  LOW);
}
}

See if you can figure out the wiring.

CrossRoads:

byte led1 = 2;

byte led2 = 3;
byte led3 = 4;
byte led4 = 5;
byte led5 = 6;
byte button = 7;
byte ledNext = 2;

void setup(){
pinMode (led1, OUTPUT);
digitalWrite (led1,  HIGH);
pinMode (led2, OUTPUT);
pinMode (led3, OUTPUT);
pinMode (led4, OUTPUT);
pinMode (led5, OUTPUT);
pinMode (button, INPUT_PULLUP);
}
void loop(){

if ((digitalRead (button) == LOW) &&  (ledNext ==2)){
digitalWrite (led2,  HIGH);
ledNext = 3;
delay(1000);
digitalWrite (led2,  LOW);
}
if ((digitalRead (button) == LOW) &&  (ledNext ==3)){
digitalWrite (led3,  HIGH);
ledNext = 4;
delay(1000);
digitalWrite (led3,  LOW);
}
if ((digitalRead (button) == LOW) &&  (ledNext ==4)){
digitalWrite (led4,  HIGH);
ledNext = 5;
delay(1000);
digitalWrite (led4,  LOW);
}
if ((digitalRead (button) == LOW) &&  (ledNext ==5)){
digitalWrite (led5,  HIGH);
ledNext = 2;
delay(1000);
digitalWrite (led5,  LOW);
}
}



See if you can figure out the wiring.

well , many thanks to you sir ! at least that gives me something to work with and try to understand the lines of code. I don't think I will have too much trouble with the wiring I should be able to work that out.
once again, KUDOS to you and thank very much !

so,
I have just used an Arduino nano, had some minor trouble uploading the sketch, but I sorted that out, and
IT WORKS !!!

so THANK YOU once again for the code, I adjusted the delay time to suit me, some lines I understand, some i'm not sure of like

if ((digitalRead (button) == LOW) && (ledNext ==3)){

so yes, I am learning bits

thank you:)