Monday, May 12, 2008

More drumming thoughts

Here's my scheme to encode two drumsticks and two buttons into a navigation packet.

First, we use Benjie's circuit and the A/D converter to read in the speed of each drumbeat. We encode 5 regions: Stop, Slow, medium, fast, and max as 0-4.

For speed, we take both sticks and add the speed region together. The result is going to be 0-8, so we will scale by 2 for the packet. When neither is pounding, speed is 0. When we're pounding away, it's going to be 8.

For direction, we will first assign a sign to each data, with the button on the drumsticks signaling negative. Then we subtract the numbers. If left is full forwards and right is full backwards, we will have 4-(-4) = 8. If left equals right, we will have 0, going straight. If left is full backwards and right is full forwards, we will have -4-4 = -8. We will then have a number from -8 to 8, we will shift to 0 to 15. This is asymmetric, but we can merge two states in the packet (e.g. turn left slowly and turn left slightly faster will be blended)

Thoughts?

David

No comments: