If you are interested in contributing to the project – let me know and I’ll add you up to the list of developers.
1. The main file to run is witilt.py
-
You need python, pygame, pyserial
-
You need bluetooth connection ready to be used. By default the demo
uses /dev/rfcomm0 as port number for connection. You can either
hardcode another port or use command line option ‘-p ’.
There is an issue with pyserial in Windows if you are using port
numbers higher than 9, say com12. The way to handle it is to specify
it in special way… (I don’t remember details, but I know where to
look at). So if your BT dongle’s SPP sits on such a port, either
reassign it to lower one or let me know and I’ll figure it out.
- There could be issue with true type fonts that I use to display
text (I work in Ubuntu, which does have different fonts than Windows).
It seems that some default font will be used in the case of error, so
let me know if interface looks ugly…
- You can access original WiTilt V3.3 menu as selecting item 2 in the
main menu. Its functionality is limited, so only the following actions
seem to work well: selecting output mode, gravity range, content of
binary pack. Don’t use it for calibration – there is dedicated
procedure in the code (more reliable that built-in)
- Calibration data. There is the file ‘calib.dat’ in the source
directory. It is used by default to read calibration data. If such a
file is not found – the calibration data are retrived from the
module. Filename is hardcoded, but easily can be changed.
- Calibration procedure. When you are running the process (1 from
main menu), press ‘c’ to activate calibration. Then you’ll need to
follow instructions, which are in selecting calibration axes by means
of placing the module on the surface in certain orientation. The
orientation will be determined automatically and the corresponding
data will be gathered. Upon completing calibration for all 6 axis,
(you will see 1 at all placeholders instead of 0) press ‘c’ again
- Monitoring process. Either acceleration or velocity or position can
be used to affect position of the markers at the monitor screen. You
need to look at DSP.getData() (3 last tuples responsible to the data
passed for drawing. You might need to change the one after self.alpha
to self.a for acceleration, self.v for velocity, self.p for position.
Now it is set that acceleration is used to control position of the
markers withing the monitor screen).
And probably the last comment. I’m using tab size of 3 characters
(instead of default 4) and do not expand tabs by spaces, so if you
will face indentation problem after changing something, restore the
source files from the archive and make adjustment in the IDE of your
choice before editing.