licht

i have small problem with mosfet
i use this code in the program that you can download .
but dont work what is wrong?
this code work great as stand allone

const int myPins[] = {3, 5, 6};
int mosFet =0 ;
const int TIME = 30;

void setup() {
randomSeed(analogRead(0));
pinMode(3, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
void loop() {
mosFet=random(3,7);
delay(TIME);
digitalWrite(mosFet, HIGH);
delay(TIME);
digitalWrite(mosFet, LOW);
}

Bompro_5.ino (6.28 KB)

domination.ino (7.76 KB)

keys.ino (3.91 KB)

lang.ino (858 Bytes)

menu.ino (6.61 KB)

sabotage.ino (6.37 KB)

searchdestroy.ino (6.36 KB)

zutils.ino (3.46 KB)

Sorry, but what!??

(deleted)

Figuring out what is wrong would require knowing what you expected to happen and how that differs from what you observe. It would probably also require knowing how things are connected. Please provide the needed information if you want help.

oke this code i have import in the bombpro (attachment) and not work
you cane find the code in bombpro 5 ino and in zutils.ino
in the game i have tell the software whit the code activateMosfet(); but it is not working .
why it is not working?????
the game play well but not the mosfet settings .

the code shoals above work perfect.

You might have wired it wrong. The code does exactly what it is coded to do. Of that we can be certain. Since you won't say what you want the code to do, there is nothing anyone can do to help you.

delta g i have this code import to the code in the attachment make a map and put all the ino in it .
start the code Bompro and look in the script . you cane see i hoop that nothing is wrong, but it is not working.

the arduino wire as 3 ,5,6 output this wire go tho IRFZ44N pin 1 and pin 2 go tho the ledstring 12 volt rgb color pin 3 go tho ground . and this is working perfect in the code above. before you tell my answer see code bompro

dinoshop:
before you tell my answer see code boom pro

Before I will look at any code, you have to describe how you want it to act. Otherwise how will I know what to look for?

The code there does EXACTLY what it is supposed to when written this way. How the hell should I know how to change it if I don't know what you expect it to do?

I guess by Licht in the title you meant light ?

Anyway, the code that you say works (included between code tags in your original post) has some odd behaviour.

  1. You have explicitly defined 3 output pins: 3, 5 and 6.
  2. You (potentially) write to pins 3,4,5,6,7 using mosFet=random(3,7);

What pins have you wired the mosfet to ? Have you a schema ?

Can I confirm that the situation is this:

The code in code tags works - it correctly flashes random MOSFETs?

The code included as links includes that code somewhere and doesn't seem to work?

Its rather hard to cope with 7 files to download, perhaps if you gave us a .zip file?

Yes the dutch word for Light is "Licht"
ahh i think he is dutch i can see it on his comments on one of his .ino's

en als je nederlands bent. er is een nederlandse sectie op deze forum.
meschien kan je het daar proberen in je eigen taal.