2014년 12월 8일 월요일

Slider thumbposition convert to integer


i need convert slider position to integer and then send it as 1Byte number via bluetooth. 
can some help me with this ??

-- 

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

--

when i run app and move slider i get "Error 510: Could not decode "55,37" as an integer."



--
use the round block 

Returns the given number rounded to the closest integer. If the fractional part is < .5 it will be rounded down. It it is > .5 it will be rounded up. If it is exactly equal to .5, numbers with an even whole part will be rounded down, and numbers with an odd whole part will be rounded up. (This method is called round to even.)

--
instead of using the evaluate but ignore result block, see here how to connect correctly
A simple Bluetooth Chat with App Inventor 2

--
thx :)

--
is the any chance to add encoder wheel as show on photo ??


--
yes, you could use an image sprite and the wheel as image, then depending on the rotation of the sprite you could extract the corresponding value

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

--
Make a control using an AI2 Canvas.

Here is the concept... I R an Engineer, not an aRtist so bare with IT.   If you are Neet, it won't Bee soooo messy.
Have fun.

You probably don't want to copy all this stuff so try the aia.   Mind the settings on the Design screen and realize, you can fix this up in many different ways.  You can change the "Volume" by touching the dial or by using the buttons ..... oh my, there is not any error control.... don't get burned, when u do it, do it right.

Does that work?


--

댓글 없음:

댓글 쓰기