Blocks of My App
I'm a newbie in MIT App Inventor, can any expert tell me how to solve this? I can get my result/response properly, but with the problem of runtime error...
I'm able to get the desire result in my handphone
I'm a newbie in MIT App Inventor, can any expert tell me how to solve this? I can get my result/response properly, but with the problem of runtime error...
the web component works asynchronously...
you are trying to round a value before it has been received in the Web.GotText event
therefore move your label blocks into the Web.GotText event
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
Thank you very much Taifun! Your reply had inspire me in rearranging the blocks!
I'm copy and paste from Youtube tutorial, not really know how it works actually. Moving the block to the Web.GotText will result in fail to receive data from ThingSpeak...
The reason that made the runtime error is the "null" data ("0") sent from ThingSpeak...
this sounds very strange...
you like to display the result in the 3 labels after the data has been received in the Web.GotText event, therefore this would be the correct solution
Will this possibly cause by the limitation of data transfer interval by ThingSpeak...?
The value of clock is 1000.
No, this is caused by your desire for instant gratification.
Accept that some things (Internet requests, file access, messages) take time, and you must relinquish control and have the necessary event blocks in place to wake up and handle the incoming data if and when it arrives.
This is an especially hard thing to learn for people who started off programming in non-interactive languages that hide the timing delays behind the scenes.
Is there any recommendation for newbie like me which never touch Java, but know a bit in Arduino language, to learn MIT App Inventor?
Yes. Read the manual described below, do some tutorials and possibly take the free course.
Here are some resources to help you learn to use the AI2 tools. 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 look here http://kio4.com/appinventor/index.htm and here http://www.imagnity.com/tutorial-index/ for more tutorials.
Learn about components http://ai2.appinventor.mit.edu/reference/components/
and visit the Library http://appinventor.mit.edu/explore/library Help>Library on the MENU
You are not providing a list from which to select the second item, you appear to be providing html. Check your blocks and data inputs.