Timeline for How to store values inside an empty array and get the average integer? [UPDATED QUESTION]
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 24, 2015 at 12:20 | answer | added | Majenko | timeline score: 1 | |
Jun 24, 2015 at 12:13 | comment | added | Mick Waites | I'm guessing that the code you posted is not copied from your sketch as the for loop will do nothing. You initialise i to zero then only run the loop whilst i is greater than 10, which it will never be... | |
Jun 24, 2015 at 12:11 | comment | added | Edgar Bonet |
Since you do not change micValue, soundArray[i] = micValue is always storing the same number. You probably mean soundArray[i] = analogRead(micPin) .
|
|
Jun 24, 2015 at 12:00 | history | edited | Caspert | CC BY-SA 3.0 |
Update the question
|
Jun 24, 2015 at 11:50 | comment | added | Majenko | I have a library that does what you want: github.com/MajenkoLibraries/Average | |
Jun 24, 2015 at 11:41 | answer | added | jami | timeline score: 1 | |
Jun 24, 2015 at 10:56 | history | edited | Caspert | CC BY-SA 3.0 |
deleted 83 characters in body
|
Jun 24, 2015 at 10:42 | review | First posts | |||
Jun 26, 2015 at 6:18 | |||||
Jun 24, 2015 at 10:37 | history | asked | Caspert | CC BY-SA 3.0 |