Pebble Tinkerer Support?

Is anyone interested in Tinkerer (or general Spark Core) support on the Pebble Watch? I was going through the Pebble SDK 2.0 docs earlier and came up with the idea. Wouldn’t be hard to build, but it would require the Spark Team to add some hooks in the iOS and Android apps. (When the source is published I could easily do this and make a pull request.)

4 Likes

That would be awesome! Coincidentally we all have Pebble watches here as well, so a pairing between the two seems very appropriate. :smile:

1 Like

My Pebble watch says hooray! Would absolutely love to see this.

Awesome! Who on the team should I get in contact with to work on this? Basically you guys will need to add some simple hooks into the iOS and Android apps, to allow the Pebble app to communicate with it. So if I can talk directly with whoever codes the app that would be perfect. :smiley:

So this is a dirty mockup of what I imagine the UI to be like (this is in the actual size of the display, obviously the fonts will look much better):

You’d use the up and down buttons to select each pin; the outer circle of the pin would turn black to indicate which pin you’ve got selected. You’d press the center button to open a menu for that pin, letting you select from the available functions (digitalRead, digitalWrite, analogRead and analogWrite). When you select a function, a bubble will appear next to the pin (as seen in the photo). Selecting the pin again will toggle between LOW and HIGH for digitalWrites and let you select a value for analogWrite; selecting a pin assigned to digitalRead or analogRead will update the value. To differentiate the pins assigned read and write, I’m thinking maybe we could fill the inner circle with a gray color (dithered) for a write and the outer circle for a read. Or maybe use a pen/pencil and notepad/book icon. Anyway, to get back into the selection menu for an already assigned pin you could long hold the center button.

Basically it would work in an almost identical fashion to the iPhone/Android app. :smile:

2 Likes

I’d use it too. My pebble has had a new lease of life in the last week, might as well add this to the list!

That looks so awesome. :smiley:

I love this.

We quietly released the Android app on Friday (blog post to come tomorrow):

iOS app hasn’t yet had the closed source stuff (TI’s stuff) torn out of it. But if you want to dig in and make a pull request to enable Pebble functionality, that would be amazing! Also happy to give you access to the iOS app since we can’t open source it quite yet.

Okay cool, I’ve never done any Android programming but have worked on iOS apps, so that would be the best route for me to go. I’ve gone through the rigamarole with TI and have access to the closed source CC3000 software myself, so I should be good to go on that front.

I can do the iOS side so it should be easy to port to Android.

1 Like

Very cool idea.

I’ve been eyeing the new Pebble Steel for the last week but haven’t’ pulled the trigger yet.

Having this feature to use with the Pebble sounds awesome.

1 Like

Just wanted to cross post here that @ChrisLewis has something working:

1 Like

Thanks @bko for the mention. I had no idea this thread was here! Excited to support such an endevour.

As mentioned in my blog post, I do hope to polish the watchapp up a bit and add more features over the summer, even just for my own Core tinkering.

Neat app @ChrisLewis! I too have an App working that the team will be releasing as the “official” app very soon! I wish I’d have known about your work previously. Perhaps we can collaborate a bit?

The way I ended up going was to build a Pebble JSKit applet into the Pebble app which uses the Tinker API to talk directly to the cloud, this way no extra changes were needed to the Android/iOS apps.

Hi @timb, I would love to collaborate!

I assume you’ve seen my source on GitHub, and I’m interested to know more about your approach; as far as I know, my use of PebbleKit JS does not involve any modification of the Android app, but I could be missing something!

EDIT: Although after a bit more thought my approach does require the access token and device ID to be hardcoded and compiled, which could be avoided with a PebbleKit configuration page, but I have not used those yet.

I had looked over your source briefly before my post. My post was more to address the original idea I had, which was to add direct Pebble support to the iOS and Android Tinker apps. I ended up deciding to just talk to the Cloud API directly like you did to simplify things!

So I think a PebbleKit config page is the most natural way to do this. The ideal method would be to allow the user to enter their Spark login and password, and have the page pull in all the relevant auth-tokens, etc. I think.

Basically, I want to do a really good job implementing the PebbleKit and JS stuff, and release it as Spark-Pebble-Base. This would take care of all the intermediary stuff that happens between the Watch and the Core, which would hopefully make it easy for people to build custom Pebble apps for their specific projects. Does that make sense?

So I say we should start our collaboration there and lay down a really solid groundwork. If you’re up for it, I’ll get an official Repo setup through the Spark account and get you access. :smile:

1 Like

Indeed, a base ‘platform’ approach is best. More flexibility the better! I have not implemented configuration pages yet due to a lack of hosting but I do understand how they work. That would offer the best method of data entry (as you mentioned).

Let’s give it a go!

1 Like

@ChrisLewis I’m trying to get your pebble-tinker app working on the CloudPebble IDE. Can you give me some advice on how to add all of the necessary files? I’ve Forked your repo, and imported the project… but it only imports the main.c and pebble-js-app.js It then obviously fails on cl_util.h, so I added that under the C source, but then it fails to find the functions. I also tried adding the libcl_util.a as a binary blob but I’m sure I did something wrong. I can get the apps on my watch no problem, just no interaction with the Spark Core yet.

@timb post 'em if you got em! I like your screen layout as well. Nice subliminal messaging.

Also, if anyone knows…how to install the Pebble SDK on windows for local builds, where’s the tutorial for that?

cc: @Hypnopompia

1 Like

Hi @BDub, you will not be able to link the libcl_util.a file in CloudPebble, it is already compiled.

You can set up an SDK install on Windows via a Ubuntu Virtual Machine, some instructions are here, but may be a little outdated - I wrote them about a year ago!

If you still struggle, I’ll release the full source. The reason cl_util.c is not public is it is a collection of convenience functions for my own development and a complete mess!

@ChrisLewis Because I'm pressed for time, I'd love to be able to compile your Pebble App from the CloudPebble. Actually, seeing the source to cl_util.c would also be a big help to me in figuring out the interface between the pebble app and the PebblekKit javascript, no matter what state it's in. If you wouldn't mind sharing it with me (via link in PM or email), I won't publish it anywhere :smile:

I’ve tidied up and added cl_util.c to the repo. The interface is actually quite simple, once you follow the path a message takes from Pebble to PebbleKit JS and then on the the Spark Cloud.

1 Like