Saturday, January 17, 2015

SolidDigi Color Image Shield Revisited

As previously mentioned, the SolidDigi Color Image Shield is very similar to the (now retired) SparkFun Color LCD Shield, but does have some differences. I had converted some of the code found around the internet that was available for the SparkFun shield so it would work on the SolidDigi shield. Now, I've decided to take a lot of that same code and make it work on the pcDuino. So, if you have a pcDuino, this shield will now have some sample code that works on the pcDuino.

Below is a list of what has (and has not been converted) of those mentioned in a previous post:

  • The Color LCD Shield Library - converted and working.
  • The Arduino-O-scope - converted and working,
  • The SparkFun Sample - not converted (although I did move over the Mandelbrot and RGB Image code to the SolidDigi Sample (just run the SOLID application and press the 1st and 3rd buttons simultaneously to see the demo(s) work).
  • The SolidDigi Sample (with color tweaks) - converted and working.

You can find the code here.    Just unzip the two directories (Solid and ColorLCDShield) into the c_environment directory.  Change to the directories and run a make clean followed by a make to rebuild everything.   The samples will a end up, ready to run in the directories' sample/bin directory.  Don't forget you have to run with a ./ preceeding the sample name if the directory isn't part of the path.  So, for example, you would run the SOLID sample by typing ./SOLID and pressing enter (while being in the ~/c_enviroment/Solid/sample/bin directory).

A couple of notes:

- This isn't the fastest running code in the world (for example, the clock sample included with the Color LCD Shield library...I had to add 2 seconds to every update for the clock to keep up (and it actually does pretty well accuracy wise ... no promises on absolute accuracy though ... consider it just a sample for the shield, not necessarily an accurate clock!).

- The main problem with speed is that I haven't found a way (yet) to have direct access to the GPIO pins (I do use the file writing method ... which works, but not nearly as zippy as a memory mapped technique, etc).

If anyone knows about a faster method of setting pin modes and performing digital writes on a pcDuino, I'd love to hear about it.   Something similar to the PORTB/DDRB abilities on an Arduino.

For now, these samples do work.   I'm using the Translatiion T Board with this shield.  Not so much that I need to ... but, I'm just not 100% convinced I don't need to.   Even with 3.3V shields, they work just fine with the T Board.  I'd rather be safe than sorry.


02-16-2015 - Libraries and Sketches moved to Github.

No comments:

Post a Comment