Tag name:programming

Maplin's Touch LCD Shield for Arduino (Sept 2016)

I've been playing around with Maplin's Touch LCD Shield. It's not a bad device (it does seem to be a little slow, but I suspect that's mostly down to the library being used to drive it. That said, I did take a while to get it working since there's not a lot of documentation for it and I notice that I'm not the only one who had problems. So partially as a reminder to myself (and partially to make this visible to search engines) there's what I had to do.

  1. Download the correct library from linkshield's wiki. I eventually downloaded the v2 library.
  2. Copy the example program (again from the wiki).
  3. Fix up the compile errors in that example program - I guess the library was updated AFTER the example:
    1. Remove the declaration of TS_MINX, TS_MAXX, TS_MINY, TS_MAXY (the library has these as #define's and the compiler gets quite confused.)
    2. Changed the test p.z > ts.pressureThreshold to ts.isTouching()  (The library doesn't have a pressThreshold field and the point class doesn't have a z field. On the other hand, the library does have the isTouching method!)
    3. Changed the initTouchScreenParameters method to initialise a touchscreen via TouchScreen(XP, YP, XM, YM) and deleted the setting of TS_MINX, TS_MAXX, TS_MINY, TS_MAXY (again the compiler gets quite confused).

I was then able to run the demo, although the touch output seemed to be completely reversed, so I edited my library header file to switch the values of TS_MIN* with TS_MAX*. This seemed to fix the problem.

I've, for the time being at least, used it to act as a monitor for my Thinkpad that runs my linux server (that is, I got the linux server to talk to it!)

Moving from RTC to fossil (Dec 2015)

I am a fan of IBM's Rational Team Concert, but have reluctantly decided that I need to move from it to something much easier on the operations side. My specific problem is that the Ubuntu machine on which I run the RTC server needs a clean reinstall1. Having tried (on my laptop that also has Ubuntu installed) to use my backup of the repository2 to get a working clone of the RTC system has proved a LOT harder that I would like, I ended investigating alternatives.

Fossil is my selected alternative, at least for the time being. The pro's and con's (at least as compared with RTC) are:

Pro's

  • Install is easy (I'd go as far as trivial) - fossil is a single executable (with executables for Windows and Linux (also Mac, though I don't have any of those at this time))
  • Includes a problem tracking system as well as a source control system (also a wiki)
  • The repository is a single file, yet is still a SQL database (fossil uses SQLite)
  • Its mental model for development is not that dissimilar to RTC
  • Builtin web server for admin and browse capabilities (OK, so you have to run the executable to get the server running...)
  • Moving from RTC will allow me to use an up to date eclipse - not that the current version I'm using is broken!

Con's

  • No integration with eclipse - this one is a shame, but my website and plugins are small enough that I can handle running a commit command to put my changes into the repository
  • No included build support (though fossil can generate a rss feed). I did investigate getting jenkins running, but since there's just me and I already had one-step build running, I've (for the time being at least) decided I can manage to run a manual build instead
  • The lack of build support means there's no immediately obvious way to publish build results - this is next on my investigation list (I suspect using either a wiki page, or technotes might be a substitute, but I'm worried about wanting attachments in some form - I guess that's another con for the moment.

As you can probably guess I do consider this to be a shame, but I don't want to spend lots of time attempting to set up RTC on a reinstalled machine so that it's the same as before

Footnotes

  1. Somehow my kernel and the /boot are not in sync (I think the /boot partition that's being mounted is NOT the one that grub is using at boot time, and since I'm also having to manually select the upstart kernel (the standard kernel locks up in the G15 keyboard handler that I installed) AND the size of the /boot partition is tiny I need to do a reinstall to get to a clean system
  2. OK, I admit it, I didn't prove that I had a backup by attempting the restore on a different machine earlier

Menu woes (Aug 2015)

If you've recently tried to use my top navigation bar, you may have encountered problems with the sub-menus disappearing as you try to move the pointer down into the sub-menu. I'm still working on that (I know the change that caused the problem is that I'm now using a custom menu for the navigation rather than the default, but I haven't yet found a suitable fix.

Still this is a normal kind of debugging!