Nice, I wish I had seen this before I wrote my own library, although I needed the goldelox SGC command set.
I did implement all of the SD card functions in the 4D command reference (my thread is at the bottom of the first page ATM) but I didn't really find anything unusual about them compared with any of the rest of the commands. The only one that needed any special handling was ReadSector, for which I found I needed to increase the Rx buffer to be much larger or else I would lose 75% of the block (which in turn would cause my version of nacAck() to lock forever, so I added a simple timeout to prevent the worst case).
Ya SGC commands for both generations of chips are identical in almost every case. The other one that I remember that's different are some of the control flags, like the goldelox does not support the landscape setting.
Here's a real model where the touch-screen acts as a dashboard to manage the stepper motor. The model combines an Arduino board and fischertechnik building blocks.
I noticed in the example file that you draw your own buttons using your button.h/button.cpp. Was just wondering why you chose to do it that way instead of using the button drawing commands built into the 4D Serial language?
4D LABS—PICASO-SGC Command Set—Software Interface Specification:
the size of the button is automatically calculated and drawn on the screen with the string text relatively justified inside the button.
there's no built-in touch-screen management for the button boolean check();
I bought a more powerful Arduino-like board with a 80 MHz controller: the chipKIT UNO32.
Porting my Serial_LCD.h library for the from Arduino to the chipKIT UNO32 wasn't a major task, provided some precautions:
Coping with implicit types as int, which don't mean the same on a 8-bit environment and a 32-bit one: all variables require explicit types.
Adding full support to the chipKIT UNO32 hardware second serial port, without loosing the software emulated serial port.
Making the main Serial_LCD.h library immune from hardware / software serial port: I added an abstraction layer.
Trying to understand why an #if#include statement doesn't work.
Dealing with over-speed, a 80 MHz board working with a 12 MHz display.
Enjoy
CAUTION The latest NewSoftSerial release 11 is required for the abstraction layer. Although the library is now named SoftwareSerial, rename it to NewSoftSerial.
nice, the bump up to 230400 baud on the hardware serial port really helps frame rates as well.
I got around needing a serial proxy by just passing a reference to the Stream object type. Both the Arduino hardware serial ports and NewSoftSerial (beta 11 and newer) are of this type, so you can setup whatever kind of serial port you want, pass it to your constructor and everything just works.
Thanks to the 4D Labs support, the new release 6 implements sound playing.
Actually, the 4D Labs ?LCD-32PT(SGC) 3.2” Serial LCD Display Module requires up to 250 mA, more than the Arduino built-in regulator could provide, when it plays sound.
CAUTION The latest NewSoftSerial release 11 is required for the abstraction layer. Although the library is now named SoftwareSerial, rename it to NewSoftSerial.