跳到第一則未讀訊息

Lukas

未讀,
2016年12月29日 下午3:14:252016/12/29
收件者:MIT App Inventor Forum
Hello,
I want to make a list and print the average of the list to a label:
If the app receives a new value from the arduino per bluetooth, it should replace the previous one in the list and so on

but i do not know how...

Lukas

Taifun

未讀,
2016年12月29日 下午3:38:422016/12/29
收件者:MIT App Inventor Forum
to get the average, use a for each item in list loop, add all the items and in the end divide by the number of items


in case you are familiar with JavaScript you also could use some JavaScript... see my sort example here
which could be adjusted accordingly to provide the average instead

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn  App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by  Taifun.         



回覆所有人
回覆作者
轉寄
0 則新訊息