Skip to main content

TouchShield Slide user interface development

Posted in

I have implemented most (15) of the designed screens on the TouchShield last weekend. That means I can run through a lot of the screens that are in the OpemMoco Wireframe 01a design. Navigation is working and I can edit (some) of the numeric settings through the button pad that was designed too.

It is time to further develop the Wireframe prototype. We need, for example, need to think about how complete OpenMoco scripts can be edited by the user interface. Some additional screen designs including bitmaps need to be developed too.

How many of you own a TouchShield Slide? I can put the complete source including my patched TouchShield core and bitmap images on SourceForge if you like. The main patch in the core is done by Joao who made it possible to upload 132 bitmaps to the device. I really need feedback and a further designed wireframe before we can continue working on the interface.

Who is interested in trying out the first demo of the TouchShield Slide UI?

I decided to put all a have

I decided to put all a have created for the TouchShield on SourceForge. I hope you all get your TouchShield Slide now in order to have a small portable controller for the timelapse engine. This is a prototype version only. It is meant to start a discussion that should result in a final wireframe for the initial fully functional release. You need to have some understanding about the Arduino and TouchShield Slide when you want to install this.

Step 1: Get the source.
Download the TouchShield OpenMoco UI code from SourceForge
Download all the OpenMoco libraries from SourceForge

Step 2: Install the three libraries.
I have put them under /Documents/Aruino/libraries on my Mac

Step 3: Install some additional libraries from Arduino.cc and arduiniana.org
http://www.arduino.cc/playground/Code/Time
http://www.arduino.cc/en/Tutorial/TextString
http://www.arduino.cc/playground/Code/Button
http://arduiniana.org/libraries/NewSoftSerial/
Note that not all of these libraries are fully used at the moment, but they will be in the future.

Step 4: Install the OpenMoco TouchShield core
The current TouchShield core software has bugs. It can only upload 33 bitmap images. We need a lot more of them. Joao Barros fixed this! Replace the core provided by LiquidWare for the one that is provided in the touchSlide folder of the first download.

Step 5: Upload the images
The image folder contains 110 bitmaps. These need to be uploaded to the TouchShield slide. Install the following Sketch on your Slide:

void setup() {
background(0); //set the entire screen to black

open(FlashTransfer); //Waits for the IDE to send files to TouchShield’s flash storage.
}

void loop() {
// Do nothing!
}

Get the latest Antipasto IDE. You can use this IDE to upload the images. The uploader is in the Tools menu. This IDE can crash (a lot) an Macs. I do this upload from XP (ouch).

Step 6: Install the Arduino code
This step is optional for now because the current demo doesn't really connect with the TLE yet. You can install the required Arduino Sketch by installing the code from TS_Arduino_Controller on the Arduino that is carrying the TouchShield. I use this Sketch to get readings from analog input devices (like a joystick or accelerometer) to the TouchShield.

Step 7: Install the TouchShield Slide code
Install the code from TS_OpenMoco_Controller on the TouchShield.

That's it. You now should have a graphic user interface on the TouchShield that can control the OpenMoco TLE (in the future).

Let's start discussing the final functionality of this application!

Here is an image of this nice OLED touchscreen:

Cronix that looks great! Now

Cronix that looks great! Now is this just an interface to command another Arduino that does the work and controls the cameras and motors?

Cheers

The aim is to have a

The aim is to have a graphical user interface on this device that controls the engine. All engine commands should be supported by the hand held device. The Arduino that you see on the picture doesn't do much. I only use it to create a (wireless) serial connection to the Arduino that is running the engine. I also use this Arduino to connect a real time clock and other input devices like a joystick and accelerometer.

The actual application is running on the TouchShield. Even the commands to the TLE are given by the TouchShield.

Hey Andre - great work! I'm

Hey Andre - great work! I'm trying to get a few things knocked out this week, but I've got the hardware so I can start playing w/ it next week.

I'm really of the opinion that 'scripts' shouldn't be treated as such, instead one should just take the "DWIM" (do what I mean) route... e.g.: To set motor keyframes, manually move to a position, hit a button to "do something" (i.e. keyframe), and then say what you want to do: "Move another motor", "stop motor", "slow down", "speed up", "change exposure", etc.

The async stuff is working + integrated now, needs some tweaking to be "ready" expect that to be done in the next couple of days. Supports continuous motion, etc. (Although API commands aren't ready for that yet.) Still need to optimize the code down, added way too much to the base image (nearly 2k). BUT, since it now exceeds the safe level for the Atmega164, time to increase the keyframes, etc. (static ram [not including stack size] usage is only ~500 bytes right now =)

!c

I was almost afraid that you

I was almost afraid that you missed this post :-). I have mainly implemented the left buttons and some of the main buttons (check the wireframe).

I go with your thoughts about 'scripts'. But I still believe you should be able to modify commands of change the order of certain commands. We already have the up/down buttons available. I think this is the main "issue" that needs to be solved to have a DWIM / very easy to use interface.

I am now running into other issues though. It seems that the Arduino.CC IDE 0018 is not good in compiling sketches over 64k. I have not tried to put in the 4.4.0 of 4.5.0 GCC compiler myself. I am hoping that this will be done by the Arduino guys while I am on my holiday next week.

Other issue is that LiquidWare did a bad job with the bootloader that they have used. They claim that a sketch can be 256k, but in fact it can only be 128k because of a wrong bootloader that they have used in the TouchShield Slide. I am now on 77k. So there is still room, but I would like to see this solved too. There are 6 pins left on the Slide, lets hope it is an ICSP connector. We have asked this to LiquidWare, but they are always a bit slow in reacting to email.

Regarding sketch sizes. I discovered a strange thing a few days ago. I have this big if/then/else structure in the Slide UI code. I thought it was time to change that into a case statement. Guess what? My sketch became 4k larger! You could try that with the Engine code. There are large switch statements in the serial code. But that is a lot of work just to check if that reduces your sketch size.

Nah, didn't miss it =) I was

Nah, didn't miss it =) I was on vacation all last week and was doing my level best to rest as much as possible *grin*

It's funny you mention the serial code.... Switch statements can be more efficient if you're moving through a handful of cases, but if you have ranges or a lot of code to happen inside of the cases, then if/then/else can be more efficient. Sometimes it's a crapshoot as to what GCC is going to optimize away! I've gone through trying to optimize code down in all sorts of ways, just to write the "more efficient" form and see the binary size grow!

... I say it's funny you mention serial stuff, because one of my biggest concerns was not so much the sketch size, but the stack size the serial code results in. Maximum stack size no matter what option you end up at -- I plan on breaking it out into separate functions for each sub-command, thereby reducing stack size greatly, as it's not recursive and no sub-command calls another.

!c

I have been browsing through

I have been browsing through the Slim examples and are beginning to understand how the key frames work. Threecolor mailed me that the key frames were the most difficult to design when the current wire frame was designed.

It would be great if you can test this the next week. I will be on holiday afterwards which gives me a lot of time to think about how a more final wire frame could look like.

I have added a dev branch on

I have added a dev branch on SourceForge. It's better to use that one if anyone wants to give it a try. De new dev contains more generic code. Just enable Hershey fonts in font.h of the Slide core if you want to run dev.

Hi Cronix How's the

Hi Cronix
How's the development of the touchscreen going? I would love to be able to integrate this into my setup in the next couple of months. I am also interested in just connecting via a serial cable as a lot of places I will be working have severe RF interference so wire will be more reliable. This just connects via 2 wires and ground to the Arduino that does the work. Is that correct?

Thanks for your hard work.

I am away from home now. I

I am away from home now. I will respond to your questions when I get back. That will be around the 12th of July