Hi,
I got an idea from an electronics magazine that I’d like to try.
Basically, take an old exercycle, non-electronic, and hook a hall-effect sensor and magnet to get RPM readings. I built the sensor, and the cable plugs into my com port, which supplies the electricity for it. It works!
The code that the magazine supplies is some custom IDE that appears to be related to .NET (the instructions say that .NET must be loaded. However, I want to learn Java and create a game interface. The sample program is pretty basic; it has a racetrack and moves the player and three computer players around the track.
I’ve got two older books on Java, and neither has any information specific to Com ports.
Here’s the code for the test program:
'Exercise Bike Sensor Test
func main()
gconst chBike 1
dim Rot as integer
clearall
if ComOpen(chBike,baud=9600,port = 1) = 0 then
MsgBox(“Error Opening Com Port”)
end
endif
'Power up the connector
ComDTR chBike,1
Loop:
if ComBuff(chBike) > 0 then
Rot = Rot + 1
Print val(ComInput(chBike)),“Count=”+Rot
endif
DoEvents
goto Loop
endfunc
If anyone knows what the specifics are for communicating through the Com port and could share, I’d appreciate it.
I’ve downloaded NetBeans 5.0 IDE. If there’s a better IDE, I’d like your opinion.

