Thanks for the answer and i solved it by scaling the voltage. But reading on a digital input vs analog input did unfortunately not solve my problem that communication over bluetooth is to slow to capture the fast changes in the rotary wheel. It just works erratically. How it works is that there are 2 photo resistors placed with a slight offset and a disc with holes that cut the light to them. So when rotating the rotary it cut the light and I'm looking for when one photo resistor cuts before the other and then determine what direction I'm turning the rotary. This works nice with a cable but over bluetooth it misses that offset cut of light from time to time and I can't get a reliable reading.
On Wednesday, April 22, 2015 at 12:40:26 AM UTC+2, Ytai wrote: > > You can't configure the thresholds in software. You can either scale the > measured voltage so that it fits the fixed threshold or use an external > comparator. What rates are we talking about? Are you interested in the > exact pulse count or only their rate? > > On Tue, Apr 21, 2015 at 6:34 AM, Linus Anderberg < > [email protected] <javascript:>> wrote: > >> Is it possible to set a threshold on a digital input to when it should >> report HIGH? >> >> Right now i'm using analog input to read a rotary wheel with photo >> resistors and when connected over bluetooth it is to slow and >> can't determine what direction i'm turning the rotary. connected with a usb >> cable all is fine. >> Correct me if i'm wrong but digital input is much faster than analog >> input? >> >> -- >> 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.
