Hack Notes CVA 090326

While we're waiting on more bits and pieces, today we're just going to try and add two more pager motors and then experiement with the different display patterns that having two more motors allows us.

The LCD display is super useful for debugging. As it is now, there are only two open pins left, neither of which will do PWM out. So to keep the LCD on for now, we'll attach motors to those pins and just settle with only being able to set them full on or off.

Looking on digikey also prompted some quick research on alternative economical 3-axis compass chips since the HMC5843 that we all wanted is back ordered until May sometime. We couldn't find anything good, and then diverted into discussing ways, using just software or a tilt-meter and software, to discount the outlier values we expect to be produced by compass mis-readings at the high part of a users stride - thereby allowing use of a 2-axis chip on the ankle without diaflkj....... runonsentencesyaaay.

Set the two remaining binary pins as output, using digitalWrite(pin_num, HIGH/LOW)

Ummm our pulses are broken. ??? we aren't doing the digitalWrite right somehow?

OK, pins 0 and 1, which we were trying to use with digitalWrite(pin_num, HIGH/LOW) have some kind of crazy constraints on them and we're freaking tired of debugging this business. Solution: bye-bye LCD!

Rewrite the code to activate motors directionally rather than the previous pulsing scheme. We'll start by dividing the circle into eight zones, four of which cause only one motor to vibrate, and the other four defined by an overlap which causes two motors to vibrate. If it's possible to detect that two adjacent ones are on rather than just one on, this could give us a resolution of 8 using just four pager motors:

Motor

Range (in degrees, 0=North)

motor 1

-77.5 < angle < 77.5

motor 2

22.5 < angle < 177.5

motor 3

112.5 < angle < -112.5

motor 4

-177.5 > angle > -22.5

OK, we got that working, but let's try without overlapping:

Motor #

Range (in degrees, 0=North)

motor 1

-77.5 < angle < 77.5

motor 2

45 < angle < 135

motor 3

135 < angle < -135

motor 4

-135 > angle > -45

Results: 2 out of 2 expert testers agree, overlapping is feelable, but delivers a kind of fuzzy transition between directions that, rather than delivering a higher resolution, is confusing and less intuitive than the sharp transition felt when it is programmed without the overlap.