Pages: 1 [2]   Go Down
Author Topic: pot simulation  (Read 762 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 436
Posts: 23623
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 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.
Logged

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

Pages: 1 [2]   Go Up
Jump to: