inicio mail me! sindicaci;ón

How does the PC software work?

This page gives you a quick outline of how the bouncing ball application from here works.  The bouncing ball application is coded in Visual Basic 6 - even for people who do not know much about this, it should be pretty much easy to understand because its a kids language.

Basically, the PC Software listens to the selected COM port using the MSCOMM OCX control.  When it receives formatted data (as outlined in this page), it parses it.  It uses the X and the Y sensor data to apply force to the ball in the X + the Y direction.  The game loop is simple enough for all to understand.

Download the Visual Basic 6 code - Download it now!

You may wish to make use for some other method of reading off the COM ports, but here is the setup (for the MSCOMM OCX) I found to work well:

.Break = False
.DTREnable = False
.EOFEnable = False
.Handshaking = comNone
.InBufferCount = 0
.InBufferSize = MAX_PACKETSIZE
.InputLen = MAX_PACKETSIZE
.InputMode = comInputModeBinary
.NullDiscard = False
.OutBufferCount = 0
.OutBufferSize = MAX_PACKETSIZE
.ParityReplace = Chr(0)
.RThreshold = 1
.SThreshold = 0
.Settings = “115200,N,8,1″
.CommPort = PortNumber

Hopefully, this info results in some interesting motion controlled PC software.  On this page, feel free to ask for more source code/help if necessary.

To discuss BlueMotion in general (e.g reporting bugs), please go here.

ad456 said,

July 16, 2008 @ 1:49 pm

i get the MSCOMM32.OCX is missing or invalid error on Xp Pro, was lookin forward to this too. a fix would be well appriciated

admin said,

July 16, 2008 @ 1:55 pm

Hi, no problem at all. The error is because that file is not normally included in Windows XP (and vista I think)…. You should go to this page to get it working…

http://www.yes-tele.com/mscomm.html

Just download the file and put it into your \windows\system\ folder.

I will update my own listing soon so that other people dont have this problem.

Any other problems, let me know!

admin said,

July 16, 2008 @ 2:23 pm

The file has now been updated in http://www.nirp.co.uk/motion/bluemotion/download-bluemotion/

People should no longer have the MSCOMM32.ocx problem.

ad456 said,

July 16, 2008 @ 3:37 pm

Nice one man tahnks for the quick reply/fix, this is quite cool. Is there a lot of work for you to do before this becomes mappable to existing pc games?

admin said,

July 16, 2008 @ 4:22 pm

ad456. Currently, as you have probably worked out, my PC software only gives a demo of how to use incoming data for controlling the software reading the data.

I haven’t actually started coding the mappable prog yet, but actually, I dont think there is a lot left to do at all. J2me was a totally new language for me so mobile software was the hard part, but now, I can work on VB6 to make a prog to send incoming data to other progs.

I have not looked into this at great detail because of major time constraints, but the only challenge is sending data in analogue form (e.g. like a joystick or a driving wheel).

If you have some expertise, please feel free to contribute.

I will set up a page for this and see if anyone responds.

Deep said,

July 24, 2008 @ 10:59 am

i have windows vista and have copied the MSCOMM32.ocx file in the said folder. but still the same error is coming……………. Please help

admin said,

July 24, 2008 @ 1:02 pm

Deep,

No problem, please see page I have just put up on the site: http://www.nirp.co.uk/motion/bluemotion/common-problems/

Aitor said,

August 5, 2008 @ 12:37 pm

I did pass all the steps correctly but i’m waiting the search PC on the mobile, what’s wrong?

i did try on a Laptop with built-in bluetooth and with a PC with usb bluetooth

RSS feed for comments on this post · TrackBack URI

Leave a Comment