Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

Close

Finishing
GatebreadboardDrainbreadboardSourcebreadboard1breadboard_female2breadboard_female3breadboard_female4breadboard_female5breadboard_female6breadboard_female7breadboard_female8breadboard_femaleCathodebreadboardAnodebreadboardCathodebreadboardAnodebreadboardNegativebreadboardPositivebreadboardTerminal 1breadboardTerminal 2breadboardPositivebreadboardNegativebreadboardPB5breadboardPB3breadboardPB4breadboardGroundbreadboardPB0breadboardPB1breadboardPB2breadboardVccbreadboardGatebreadboardDrainbreadboardSourcebreadboardTerminal 1breadboardTerminal 2breadboardGatebreadboardDrainbreadboardSourcebreadboardTerminal 1breadboardTerminal 2breadboardCathodebreadboardAnodebreadboard
T1JP1D3D4+-Bat1R1BAT1PB5PB3PB4GNDPB0PB1PB2VccU1T2R2T3R3D1
081708170817
Layers
Top
Bottom
View
Grid
Board
Chat
24
 
1
2
int low = 10;
3
int high = 9;
4
5
void setup() {
6
  pinMode(0, OUTPUT);
7
  pinMode(1, OUTPUT);
8
  pinMode(2, OUTPUT); 
9
}
10
11
int on_time = 20; //in ms
12
int refresh_rate = 1; // per second
13
int pins = 3;
14
int off_time = (1000 / (refresh_rate * (pins + 1))) - on_time; //in ms
15
16
void loop() {
17
   for (int pin = 0; pin <= pins; pin++) {
18
    digitalWrite(pin, HIGH);
19
    delay(on_time);
20
    digitalWrite(pin, LOW); 
21
    delay(off_time);
How it works
1. Add breakpoints by clicking on the linenumbers.
2. Start simulation
3. Hover over the variables while paused to see their value.
Sorry, it seems like your code has some errors preventing us from running the code.
Sorry, something went wrong
We have encountered a serious error, very sorry about that, our engineers have been notified, try to refresh the page to see if that solves the problem.