0% found this document useful (0 votes)
69 views1 page

Moto Mama Motor Shield Testing

The code sets up pins 11-13 and 8-10 as outputs. It then uses a for loop to gradually increase the brightness of pins 11 and 10 from 0 to 255, with a 10ms delay, while toggling pins 12/8 and 13/9 high and low. It repeats this process, toggling the other pair of pins.

Uploaded by

Navaneeth Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views1 page

Moto Mama Motor Shield Testing

The code sets up pins 11-13 and 8-10 as outputs. It then uses a for loop to gradually increase the brightness of pins 11 and 10 from 0 to 255, with a 10ms delay, while toggling pins 12/8 and 13/9 high and low. It repeats this process, toggling the other pair of pins.

Uploaded by

Navaneeth Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

void setup() { pinMode(11, OUTPUT); // sets the pin as output pinMode(12, OUTPUT); // sets the pin as output pinMode(13,

OUTPUT); // sets the pin as output pinMode(8, OUTPUT); // sets the pin as output pinMode(9, OUTPUT); // sets the pin as output pinMode(10, OUTPUT); // sets the pin as output } void loop() { int i; digitalWrite(12,HIGH); digitalWrite(8,HIGH); digitalWrite(13,LOW); digitalWrite(9,LOW); for(i = 0;i<256;i++) { analogWrite(11, i); // analogRead values go from 0 to 1023, analogWrite val ues from 0 to 255 analogWrite(10, i); delay(10); } digitalWrite(13,HIGH); digitalWrite(9,HIGH); digitalWrite(12,LOW); digitalWrite(8,LOW); for(i = 0;i<256;i++) { analogWrite(11, i); // analogRead values go from 0 to 1023, analogWrite val ues from 0 to 255 analogWrite(10, i); delay(10); } }

You might also like