Wednesday, December 14, 2011

The Final Countdown

Did I mention I can control the mouse position with the reed switch now? Yep. Using the Java robot class, I can position the mouse on the screen based on the incoming RPMs from the rotating reed switch (I'll edit a screen cap in in a bit). Right now it's ugly -- I need to work a smoothing function in there, but I'm happy that it works at all.

And have I mentioned exactly what's going to come of this? Meet Pedal Poetry, where predictive text meets stream of consciousness, and the need for speed meets the need to read. How fast can you pedal and still produce sensible language?

From Wikimedia Commons
Pedaling controls your position on the x axis, which controls the speed at which you fly through an alphabetical landscape that adapts to your words. Two buttons control movement on the y axis, which controls which box you ultimately fly through. You can stop, but you can't backspace! ...because I have no way of detecting which direction you're pedaling in.

There are only a few aspects left to hammer out:
  • Button control: I've got the button board set up, looking like a lofi NES controller or something, and I've got the Arduino to relay button presses to the computer, but I haven't done anything with them yet.
  • Smoothing: Right now, RPM changes translate to jolty changes in the mouse position. I'll be setting up a control loop to smooth things out
  • Reassembling the bike: It's been much easier to prototype while the rotation mechanism is on my desk rather than in the bike. So far I've been "pedaling" by spinning the switch by hand. I'll need to reassemble the bike and figure out a decent way to mount everything on it safely.
  • Putting it all together: The batch file that runs the input/mouse movement program will also need to load Dasher in fullscreen mode. And then it's time to pedal bikes like Percy Bysshe.
I'll be posting progress updates throughout the day, so keep an eye out. Today is the last day of finals, but I'll probably keep tweaking things long afterward. It's not over yet!

No comments:

Post a Comment