Thursday 31 July 2014

i2c breakout TheOtherHalf

I started modifying my Shapeways 3d printed TheOtherHalf cover to provide an easy way to wire up the pogo pins on the Jolla to a breadboard or protoboard.

The whole thing is fairly simple, I started off with some copper tape to act as contacts for the pins and ran the strips of copper tape to the back of the cover.



I then cut up some wires bent them into the rough shape I wanted and used epoxy resin to fix them to the back of the case, making sure to hold the wire to the copper contact pad as the resin cured.

Next steps are to terminate the wires into a 4 pin plug, and to figure out a way to fix the wires to the contact pads in a more solid way, at the moment they are just sitting there and continuity is ok but I would prefer something that will give a more reliable connection.


For a first attempt I think this will be workable, I made friends with the guys at the Newcastle Makerspace who have a lot of equipment including 3d printers so I should be able to make something a bit better

The Other Half from Flypig @ Shapeways

 I wanted something I can use as a TheOtherHalf development platform to drill holes in a and glue stuff on to get easy access to the pogopins on the Jolla, and I didn't really feel like destroying the original cover it came with.

Since there is currently an extreme lack of options for TheOtherHalf covers for the Jolla phone, I thought I would order one of the ones from Shapeways 3D printing service as its readily available and less expensive than buying one directly from Jolla.

Initial impressions are fairly poor to be honest, I expected the finish to be a bit rough but the whole thing feels super thin and flimsy, likely to snap with much use, (un)fortunately the case takes very little effort to take on and off the phone so less force needs to be applied than the original cover.

This can probably be remedied in two ways, creating a new shapeways object that is thicker on the back and sides than the original case, but more sturdier as a result. or using something like thin fiberglass to cover the back and sides to give it a bit more rigidity. 

With that in mind, the fact that nobody has used the supplied 3d files in TheOtherHalf SDK and sent them off to an injection molding manufacturer is rather surprising, I might start a conversation with Jolla to see if there is any requirements they have in using the provided files in a commercial manner.



Sunday 20 July 2014

Contacts List UI

Navigating long lists is something that the Jolla doesn't do very well (Media app is a prime example), except in one specific case: The People App.

The problem is that this alphabetic sorted list type menu is heavily baked into the app itself and is only really useful for displaying contacts without a lot of hacking. Ideally I would like to get it to be something flexible that can be customised for specific purposes though Silica components.

Since it seems like something that would be useful for Sailfish app developers to use, I've started to break the menu out into something generic that can be used to display a list data type

https://github.com/r0kk3rz/sailfish-alphabet-sort

All the good stuff is in the qml/pages directory, the rest is just the standard sailfish stuff to get it to run on the device.

The menu is mostly broken out into a standalone object, with the Example.qml showing an example of how to create the menu and get it to display something.

I've made it so the inner menu is passed in as a Component so you can easily customize the look to fit your data.

Aside from the top level A-Z menu, the rest is procedurally generated which is good. It might need some performance tweaks for large lists as the way it generates sublists is fairly inefficient at present

i2c on the Jolla Phone

As part of TheOtherHalf the Jolla has a two wire i2c bus accessible by jump pins on the back, but how to get started with it?

There's plenty of resources around the hobby electronics community about i2c and how to go about using it on linux based devices like the Raspberry Pi and the Beagleboard, and the Jolla is a linux based device so I figured it should be fairly similar.

First Problem

All the guides I've found reference this command line package i2c-tools, which at first doesn't seem to be available on the Jolla through pkcon or any of the third party repositories. Turns out the package works fine you just have to compile it from source on the Jolla, which of course requires installing make, gcc, gcc-c++ via pkcon (if you don't know how, follow this).

Might be an idea to get it submitted to the usual Jolla repository or in mer-tools or something, but thats a story for another day.

Make sure you install it using devel-su otherwise it will fail, but once thats done you can now probe the i2c bus using  i2cdetect -r 1 (/dev/i2c-1 is the i2c port on the jolla) which will probe the i2c bus for connected devices.

This is the output of the Jolla with no devices connected, as you can see the 50x00 to 50x07 addresses are already in use, but all others are free for use.

the i2ctool app on the Jolla Store by kimmoli does mostly the same stuff as i2c-tools, but from a silica app rather than the command line.

Where to Next?

Next I need to actually wire up some i2c devices and try and talk to them using C++ or Python, I'm still deciding which i2c module to buy as there's a fair few out there, currently thinking of making a GPIO breakout TheOtherHalf using one of these i2c GPIO expanders, which should allow some very flexible prototypes with the Jolla.

Sailfish Adventures

Now that I am a proud owner of the Jolla the first commercially released SailfishOS mobile phone I thought I would start collecting my journey into SailfishOS app development from someone fairly unfamiliar with Qt, as well as tinkering with Mer, and TheOtherHalf ideas and prototypes.

Hopefully this helps someone follow in the same footsteps, as there doesn't seem to be many definitive answers out there in the community.

Bon Voyage!