sketch_jul22a onst int pwm = 2; onst int in_1 = 8; onst int in_2 = 9; onst int ledpin1 = 11; onst int ledpin2 = 12; onst int ledpin3 = 13; Did setup() inMode (pwm, OUTPUT); inMode (in_1, OUTPUT); inMode (in_2, OUTPUT); inMode (ledpinl, OUTPUT); inMode (ledpin2, OUTPUT); inMode (ledpin3, OUTPUT); Did loop() igitalWrite (in_1, HIGH); igitalWrite (in_2, LOW); halogWrite (pwm, 255); igitalWrite(ledpin2, HIGH);

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

Create a Fritzing or Diagram for this code .

sketch_jul22a
const int pwm = 2;
const int in_1 = 8;
const int in_2 = 9;
const int ledpin1 = 11;
const int ledpin2 = 12;
const int ledpin3 = 13;
void setup()
pinMode (pwm, OUTPUT);
pinMode (in_1, OUTPUT);
pinMode (in_2, OUTPUT);
pinMode(ledpinl, OUTPUT);
pinMode (ledpin2, OUTPUT);
pinMode (ledpin3, OUTPUT);
}
void loop()
{
digitalWrite (in_1, HIGH);
digitalWrite (in_2, LOW);
analogWrite (pwm, 255);
digitalWrite(ledpin2, HIGH);
Done compiling.
Sketch uses 1108 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
Transcribed Image Text:sketch_jul22a const int pwm = 2; const int in_1 = 8; const int in_2 = 9; const int ledpin1 = 11; const int ledpin2 = 12; const int ledpin3 = 13; void setup() pinMode (pwm, OUTPUT); pinMode (in_1, OUTPUT); pinMode (in_2, OUTPUT); pinMode(ledpinl, OUTPUT); pinMode (ledpin2, OUTPUT); pinMode (ledpin3, OUTPUT); } void loop() { digitalWrite (in_1, HIGH); digitalWrite (in_2, LOW); analogWrite (pwm, 255); digitalWrite(ledpin2, HIGH); Done compiling. Sketch uses 1108 bytes (3%) of program storage space. Maximum is 32256 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,