Комментарии:
Thanks Paul
Ответитьi ENJOYED ANOTHER GREAT LESSON FROM YOU, PAUL!
ОтветитьThanks Paul for another great video
Ответить❤
ОтветитьWow, such elegant demonstration! It is technically as a video - visually perfect - and in substance it has excellent narrative! I love how you are programming hardware to do something specific. Thank you Paul for choosing to spend your time to share your knowledge and experience with the world <3
ОтветитьThank you Paul. You're the best!
ОтветитьI have a bug I don't find, I broke my head above it, ...finally I downloaded Paul's code... but the same bug persists : " Please Input Grade1... the program doesn't WAIT" ! It prints " Please input Grad1, Please input Grade 2 " and only then waits for a first entry.
26
27
28
29
float grades[25];
int numGrades;
int i;
String myPrompt;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("How Many Grades? ");
while (Serial.available() == 0) {
}
numGrades = Serial.parseInt();
for (i = 0; i < numGrades; i = i + 1) {
myPrompt = "Please Input Grade: "+String(i+1);
Serial.println(myPrompt);
while (Serial.available()==0){
}
grades[i]=Serial.parseFloat();
}
Serial.println();
Serial.println("Your Grades Are: ");
for (i=0;i<numGrades;i=i+1){
Serial.println(grades[i]);
}
for (i=0;i<numGrades;i=i+1){
}
}Any ideas?
I finally got my homework video done. Kept making mistakes. Another excellent video. Thanks
ОтветитьHi Paul, I have a video suggestion for you. "Controlling 3 wire PC fan speed with Arduino"
ОтветитьGreat content, Paul! Here is my solution to the homework assignment:
I keep getting deleted, so here is the title: arduinoR4AvgGradeHomework