Pages: 1 [2]   Go Down
Author Topic: pot simulation  (Read 1086 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, you can:

for (int x = 0; x<8; x=x+1){
digitalWrite (INC, HIGH);
digitalWrite (INC, LOW);

but this is a loop that will run 8 times, thus 8 pulses.

I normally declare all my variables at the top of the sketch, vs locally like this. x can always be reused by other loops as long as only 1 at a time is running.

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at
Arduino for Teens available at

Pages: 1 [2]   Go Up
Jump to: