Arduino Yun + App Inventor

182 views
Skip to first unread message

SLTPPR

unread,
Oct 20, 2015, 3:04:14 AM10/20/15
to mitappinv...@googlegroups.com
Hi, I made an WebPanel (https://www.arduino.cc/en/Tutorial/TemperatureWebPanel) that I can access in my browser. I need the value in App Inventor to control things, but I only can get raw HTML code, which is not usefull because it is something like this:
<script type="text/javascript" src="zepto.min.js"></script>
 <script type="text/javascript">
  function refresh() {
  $('#content').load('/arduino/temperature');
  }
</script>

How can I obtain the value?

I also tried using the REST functions (http://arduino.local/digital/13/0), but there are 5 of them and there are too many request making (it goes down after a while and it is very slow).

How can I fix this or should I use another method?

Ghica

unread,
Oct 21, 2015, 12:03:32 PM10/21/15
to MIT App Inventor Forum
What you can do is to use the web component and the webviewstring variable to pass values between AI2 and a JavaScript script.
Cheers, Ghica.

SLTPPR

unread,
Oct 28, 2015, 6:30:48 AM10/28/15
to MIT App Inventor Forum
Thanks! I will try it out :)
Reply all
Reply to author
Forward
0 new messages