Now I've put the same code on the trinket. But this doesn't work.
They just arrived today. So don't judge me to quick. And yes I can do a big research on this.
But time is something I don't have at the moment for this project.
this is the code:
Code: Select all
int randNumber; // variable to store the random value
int motor = 11;
void setup() {
randomSeed(millis()); // sets millis() as seed
} // no setup needed
void loop()
{
randomSeed(millis()); // sets millis() as seed
randNumber = random(255); // random number from 0-255
analogWrite(motor, randNumber); // outputs PWM signal
delay(3500); // pauses for half a second
}