Hi is anyone is having answer for these questions.
Attachments
-
65.8 KB Views: 34
if i would have done it then why i would have asked you
Because having someone do your homework for you would be cheating.if i would have done it then why i would have asked you
The rules in this forum is that the members can't provide the direct answer to the poster as you, and only could help you to get the answer step by step, otherwise the member who provide the direct answer will be prohibit to come to this Homework Help forum, setup the rules is for the students to learn how to solve the problems.if i would have done it then why i would have asked you
Your code would be easier to read with code tags:this my solution please let me know if anything needs to be changed
#include<stdio.h>
void setup() {
//nested loop to initialize all the pins
int n;
for (int i = 0; i < 1; i++) {
for (int j = n; j > 0; j--) {
pinMode(pinMatrix[j], OUTPUT);
}
}
}
void loop() {
//nested loop which will turn each LED on and off in sequence
for (int i = 0; i < 1; i++) {
for (int j = n; j > 0; j--) {
digitalWrite(pinMatrix[j], HIGH);
}
}
}
You're missing a lot. The program as written won't compile and it wouldn't do anything without a main(). The loop function doesn't loop. The matrix size is undefined.where pin matrix is written after that i is missing..