Ydps = (_Y - 8340) / 13.774696296296296296296296296296;
Ydps *= 2000;
inxt-generation wrote:It seems that none of you can make up your minds... Anyways, I will be testing it soon.
The general rule for condition 2 is to use a pull-up resistor (R1) that is an order of magnitude (1/10th) less than the input impedance (R2) of the input pin. An input pin on a microcontroller has an impedance that varies around 100k-1MOhm. For this discussion, impedance is just a fancy way of saying resistance and is represented by R2 in the picture above. So, when the button is not pressed, a very small amount of current flows from VCC through R1 and into the input pin. The pull-up resistor R1 and input pin impedance R2 divides the voltage, and this voltage needs to be high enough for the input pin to read a high state.
Another thing to point out is that the larger the resistance for the pull-up, the slower the pin is to respond to voltage changes. This is because the system that feeds the input pin is essentially a capacitor coupled with the pull-up resistor, thus forming a RC filter. And RC filters take some time to charge and discharge. If you have a really fast changing signal (like USB), a large pull-up can limit the speed at which the pin can reliably change state.
I bought two non-OEM nunchucks to try to interface with the NXT. However, so for no go. I removed the pullups, and have 47k pullups (on the NXT end of the cable). I also have diodes to drop the voltage (Xander, I measured before connecting this one ). I am trying to get this program to work:
Users browsing this forum: No registered users and 1 guest