Skywriter breakout issues

Hi!

I have the Skywriter HAT and the breakout board too.
I recently began to try out these devices a few days ago, but I seem to have some issues.

I made some videos, I linked to them at the bottom. I wrote a quick’n’dirty test program in python to better visualize the data given by the Skywriters. In the videos you can see both the Skywriters, and the output of the test program on my monitor. (The text is readable when 1080p is selected.)
In the text line where the “center” “south” “north” “east” “west” labels are visible the first set shows the number of double taps, the second the taps and the last the touch events.

The HAT works well, however there are some curiosities, for example the Z value only goes to zero at the sides (0:16 on the video) But I guess that could be normal, and maybe it’s because of the internal averaging of raw sensor readings. Also it’s visible at 0:36 that after a touch the tap event fires a few times even after I lifted my finger.

The breakout board shows much more erratic behaviour, I don’t even begin to list them, they can be seen on the videos. Earlier I experienced one more kind of behaviour, that I guess I couldn’t managed to record now: the board consistently detected the touch/tap events 2-3 cm above the board.

I used a Raspberry Pi 3 for the test, but earlier I tried the breakout with an Arduino Nano too, with similar results.
With the Raspberry I use the official Raspberry power supply.

Here is a photo of my soldering.


I think it looks okay, right?
(The blue thingy is just a bunch of layers of electrical tape, since using only the feets that came with the board, it was wiggly on my desk. I needed to apply tape only to this corner.)

Videos:

HAT:

Breakout:



The issues you’re having from the HAT sound about in line with my experience- it’s good, but it’s not perfect. I find it’s usually most effective to filter out any events you’re not going to use, since they can sometimes trigger unintentionally.

Something I wanted to add to the library when I had the chance was gesture filtering- you can actually tell the IC to ignore gestures you’re not interested in, which I believe improves the recognition speed and accuracy of the others.

The breakout board sounds like it’s gone awry, though. It might be worth trying a firmware update to see if it helps, or perhaps grab the latest Skywriter code from GitHub:

git clone https://github.com/pimoroni/skywriter-hat
cd skywriter-hat/library
sudo python setup.py install

I didn’t yet look into it since then, but I suspect that I have the latest library installed. If I indeed have, how do I update the firmware?

Hi Emoryy,

Very interesting demo. Is that possible to share your interface code to me? I recently doing some fun project on HAT.

Thanks

Oh, darn! I’ve read your comment when you wrote it, but I totally forgot to answer until now!

Here, I’ve put it into a gist:

It’s not that sophisticated, I only had put something together quickly, just to show the sensor readouts visually.

If it fails to start, then it’s possible that your terminal window is too small. Either resize the window, or change the width and height values at the start of the script.

There is a unused variable named “unscii_ramp” in it, which could be used for visualizing the Z coordinate. It contains some graphical characters from “lightest” to “darkest”. Not every font has them, so you may only see blocks in their place.

(I didn’t get to test the skywriters more since last time)

I didn’t expect your reply. I left this project for a while and continue working it these days. Thanks much for your shared codes, which is a great help.

BTY, if put the coordinates (x,y,z) in 3D space, what platform will you suggest in python? I tried to use matplotlib, which is really slow, not good for real time visualization. Thank you.