How to make the Watchy vibrate
I am enjoying playing with the eInk Watchy. It is a cute package and is everything I want in a Smart-Watch; geeky, long battery life, and not obnoxious.
But - fuck me! - the documentation is atrocious! Well, that's a lie. There is no documentation. It has the "Chat to us on Discord" anti-pattern that infects so many otherwise great projects.
So I'm left to figure out how to make the Watchy's haptics work.
The example watchfaces have a file called settings.h
which contains .vibrateOClock = true
. Set that and you'll get a little buzz on the hour, every hour.
But how do you make it buzz when you've hit your step-count goal? Or when the time is 13:37? Or whenever you want?
There's no documentation. And searching the code for "vibrate" or "vibe" or "vibration" yielded nothing. But I accidentally typo'd my search and entered "vib" - and that did the trick.
In config.h
there's this line: #define VIB_MOTOR_PIN 13
.
So, pin 13 is wired in to the vibration motor. We can add that line to our own config file. But how do we turn the buzzer on and off?
With a bit of help from Discord, it became clear:
CpinMode(VIB_MOTOR_PIN, OUTPUT); // Set vibration motor pin as an output.
digitalWrite(VIB_MOTOR_PIN, true); // Enable vibration motor
delay(150); // Vibe for 150 ms.
digitalWrite(VIB_MOTOR_PIN, false); // Disable vibration motor.
delay(500); // Wait half a second
digitalWrite(VIB_MOTOR_PIN, true); // Enable vibration motor
delay(250); // Vibe for quarter of a second
digitalWrite(VIB_MOTOR_PIN, false); // Stop vibrating
That's the same as the HTML5 Vibrate API - you can't control the intensity, but you can program your own vibration patterns.
I just don't understand why hardware vendors are so crap at writing documentation. Don't they like people using their products?
Paco Hope #BLM mentioned this.
Jonathan Frederickson said on jawns.club:
@Edent Dang, that's a shame to hear about the documentation. Was thinking about picking one up after your recent posts, but that's almost a dealbreaker for something that's really meant to hack on and isn't a polished product to start with. You'd really want good documentation to help you actually do that
gadgetoid said on fosstodon.org:
@Edent I don’t think I’d ever wear this out, but I appreciate it professionally 🤣
More comments on Mastodon.