>
>
>
> rtstofer wrote:
> >
> >> All I want is for the OOPic to read the encoder. When I twist it a
> > specific
> >> amount (1 to 2 revolutions), I want it to beep, wait a second, then
> > reset
> >> and allow me to twist it again.
> >
> > There is a simple example in the Manual for the oQencode object. It
> > simply outputs the count to an oDIO8.
> >
> > You can just look at the count in A and when it reaches some value do
> > whatever you want. Just make sure you stay in the loop.
> >
>
> Then, do I just use an if statement to compare it, or should I use the
> oCompare object in the OOPic library?
Either way... With the oCompare you can have some event kick off when
the compare triggers and you don't need code in a loop to do it.
Executing code is slow on the OOPic so virtual circuits is the way to
make things happen.
> Also, is there any way to submit
> feedback to the computer so I can see in real-time what the value of the
> counter is as I turn the encoder?
Sure! Use an oSerialPort (call it s) and just do
s = str$(MyEncoder {or whatever you call it})
Make sure you set the serial port properties. Use can use the
terminal box in the IDE if you wish. Set the port for 9600,n,8,1
Richard
> --
> View this message in context:
http://www.nabble.com/Encoder-Communication-tp14936159p14957784.html
> Sent from the OOPic mailing list archive at Nabble.com.
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment