Hi Ytai. Thanks for your help. Problem was somewhere else in the program I 
had written which was causing a rather odd conversion to occur! The error 
was found from reading the link you provided. Once the code was sorted the 
analogues read perfectly. No extra special communication  mechanism needed. 
The IOIO is a marvelous device, thanks once again for all your help. When 
program is fully sorted and commented I intend to place it on github if 
anybody thinks it will be helpful. 

On Friday, September 11, 2015 at 9:16:25 PM UTC+1, Ytai wrote:
>
> Have your GUI code expose a setAnalogReading(float value) method, and have 
> the IOIO code call that method. If there's any requirement in Swing like in 
> Android) that all GUI operations are done from the same thread, use some 
> kind of a a communication mechanism (such as a synchronized queue) to send 
> the message across the thread boundary.
>
> On Fri, Sep 11, 2015 at 12:39 PM, <[email protected] <javascript:>> 
> wrote:
>
>> Hi Ytai. My problem is passing the value from the looper part of the 
>> program to the gui part if that makes sense. I have other labels with 
>> variables from Tables and Sliders that display fine. I have used the IOIO 
>> with Android devices and had no problems displaying values, I was just 
>> hoping that somebody had an example based on the helloIOIOswing program 
>> that used analogues. I have spent many hours browsing the internet and have 
>> failed to find a solution. The IOIO is a marvelous device and thanks for 
>> all the work you have put in. I am now going to read the link you have 
>> posted. Once again thanks.
>>
>> On Friday, September 11, 2015 at 8:02:06 PM UTC+1, Ytai wrote:
>>>
>>> This forum is not necessarily the best place for general swing 
>>> questions. Have you seen this? 
>>> https://docs.oracle.com/javase/tutorial/uiswing/components/label.html
>>> Or is your question about how to read the value from the AnalogInput 
>>> rather than how to display it?
>>> On Sep 11, 2015 11:24, <[email protected]> wrote:
>>>
>>>> Hi. I have a win pc app based on helloIOIOSwing which uses analogue 
>>>> input to control led fitting light level, (dims fitting if light level is 
>>>> high) this all works fine, but I cannot work out how to display value in 
>>>> Jlabel. Can anybody give me some pointers.
>>>> Many thanks in advance.
>>>> Dave,
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "ioio-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/ioio-users.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "ioio-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/ioio-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to