Show Posts
Pages: [1] 2 3 ... 12
1  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 29, 2013, 12:54:21 am
Gary
An important file to look at is the memorysaver.h and the rest is done when you initialize the display. Very simple one line to configure the whole lot. Some folks had to change pin definitions but this is also very easy.
2  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 28, 2013, 03:36:34 pm
Pardon, the Shield says CTE, but the displays do not.

I have a 7" and it has a CTE label on. It does come from them although it might not seem so at a glance.
3  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 28, 2013, 03:34:03 pm
You get the CTE stuff from ebay as the links indicated. As far as I know that is the only way to buy from them. The library works with the CTE stuff smiley
4  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 28, 2013, 03:01:25 pm
Quote
However, at some fundamental level, they both take touch input,
and both erase and draw pixels on areas of the screen, right?

And, the Due is substantially faster, but both use a parallel
(8 or 16 bit) interface to write the screen, rather than an SPI
type serial input?

Yes it is true, but the CTE LCD back plane pcb is not laid out the same as the Iteadstudio stuff for instance. At the low level, the CTE makes use of the SPI interface to get to the fonts that are in the chip. The others do not use the SPI. At the driver level a lot has changed not just with hardware layout and pins but also with the SPI and the way it uses it. It will not be easy to convert back to another setup (in my opinion at least).
The 8/16 bit interface is true only for the lcd driver chips that allow that. Some of the lcd driver chips that the Karlsen UTFT library support are serially driven.
My advice, get some CTE stuff and enjoy the library.
5  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 28, 2013, 02:34:02 pm
The Karlsen libraries have been substantially modified to work with the CTE screens and shields. It is true that the UTFT stuff will be able to work but then it defeats the point of having the graphic library as it is. The UTFT is more a low level driver with a second tier interface giving the likes of lines and circles. The DUEGui library goes a level or two up to provide graphics at an object level. Buttons, panels, labels etc.
6  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 28, 2013, 01:40:12 pm
This version does not work with the 2560 and untested with sizes other than 5" and 7" at the moment.

I am using it on the 7" and it works great. It will not work on other screens unless they have the font chip installed ( I tried a lot). Unless I have it wrong, the chip fonts are the only ones that can be accessed by the code at this time. I asked the guys from CTE to embed a seven segment font as well but I have not heard from them. They would not release info on how to get custom fonts onto the chip either.
7  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 21, 2013, 12:27:29 am
Somebody asked about a charting feature. I would also like to see that. I attached a chart library that I adapted from somewhere else to work with a custom UTFT library that I did for the DUE before the UTFT was available for the DUE. Maybe it could be of some help.
8  Products / Arduino Due / Re: DueGUI - upload of custom fonts to chip on: August 21, 2013, 12:12:27 am
There is a number of useful fonts on the Karlsen website. I am looking at embedding the Seven Segment Number fonts. They are also in the defaultfonts.c format which is just an array basically. If you specify one of these fonts they get compiled and linked into the code so it is not stored in the raw format. The question is how to go about putting them in the chip.
9  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 19, 2013, 03:46:14 am
I am happy that you got it working. The first demo that you tried was for an older release. I think it was just not removed or updated. Anyway, you found the right stuff.
10  Products / Arduino Due / DueGUI - upload of custom fonts to chip on: August 19, 2013, 03:10:31 am
Hi
Has anyone attempted to upload a new font or even one of the UTFT fonts to the on board font chip? The widgets are written to except an int number as the font identifier. This means that you cannot use any of the supplied fonts with the widgets. As far as I can tell, the widgets will only use the flashed fonts.
11  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: August 19, 2013, 01:37:16 am
What is the error that you get?
The URNnull means that the object has no Unique Reference Number assigned to it and you cannot refer to it later. You will use a URN if you need to make reference to the object later in your code. URNnull should not give an error. The URN is defined at the top of the file. It is just an int number.
12  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now version 0.13] on: July 01, 2013, 01:56:39 pm
Hi,
I am trying to get this library to work with the Itead Studio ITDB02-5.0. Should I have to make a lot of changes or is there just some pin configs that I am getting wrong?
13  Development / Other Hardware Development / Re: Favorite I2C Digital Pot? on: January 02, 2013, 12:56:40 pm
What I normally do is to look at the examples. I copy and paste parts that I need. Look at the Analog examples and the Serial examples. You will have to scale your setting according to the value of the pot and the range that it represents in your circuit. The better way though is to use PWM (analogWrite(pin, value)) to a pin in stead of the pot. Look at the analogWrite examples in the libraries and use pin 13 on the UNO. The LED is coupled there.
14  Development / Other Hardware Development / Re: Favorite I2C Digital Pot? on: January 02, 2013, 09:37:14 am
You included the header file in your sketch instead of the code file. I included the header so that you can see how the chip was wired and to better understand the code. My code has many other files and was not done in the Arduino IDE but rather with a makefile.

This will compile. Please look at the comments for connection data. Also look at the spec sheet of the chip. There are only three signals in all.

NOTE: I did not initialize the pins in this sketch, you must do it in the setup section.

Code:
#include "Arduino.h"
 
 // POT
#define POT_SELECT 6  // connect the pot_cs of the chip to this pin
#define INC 1         // connect the clk of the chip to this pin
#define UD 5          // connect the direction pin of the chip to this pin
// Pot
#define UP 1
#define DOWN 0
#define SELECT 0
#define UN_SELECT 1
#define uint unsigned int

 void setPot (uint requestedSpeed)
  {
    char val[2];
    //calcPulses(val,config.motorSpeed, requestedSpeed);
    digitalWrite(INC,HIGH);
    digitalWrite(POT_SELECT,SELECT);
    digitalWrite(UD,val[1]);
    for(char i=1;i<val[0];i++)
    {
      digitalWrite(INC, HIGH);   // sets the pin on
      delayMicroseconds(5000);        // pauses for 50 microseconds     
      digitalWrite(INC, LOW);    // sets the pin off
      delayMicroseconds(5000);        // pauses for 50 microseconds         
    }
    digitalWrite(INC,HIGH);
    digitalWrite(POT_SELECT,HIGH);
    delay(20);
  }


  void resetPot (void)
  {
      pinMode(INC,OUTPUT);
      pinMode(POT_SELECT,OUTPUT);
      pinMode(UD,OUTPUT);
      digitalWrite(INC,HIGH);
      digitalWrite(POT_SELECT,SELECT);
      digitalWrite(UD,DOWN);
      for(char i=0;i<100;i++)
      {
        digitalWrite(INC, HIGH);   // sets the pin on
        delayMicroseconds(5000);     // pauses for 50 microseconds     
        digitalWrite(INC, LOW);    // sets the pin off
        delayMicroseconds(5000);     // pauses for 50 microseconds         
      }
      digitalWrite(INC,HIGH);
      digitalWrite(POT_SELECT,HIGH);
      delay(20);
   
  }

  void calcPulses (char val[],uint current, uint requested)
  {
    //char val[2];
    char RpmPp = 550; //config.maxSpeed / 100;
    if(current < requested)
    {
      val[0] = (requested - current)/RpmPp;
      val[1] = UP;
      //return (*val);
    }else
    if(current > requested)
    {
      val[0] = (current - requested)/RpmPp;
      val[1] = DOWN;
      //return (*val);
    }else
    {
      //return (0);
    }
   
   
  }
 
  void setup(void)
  {

  }
 
  void loop(void)
  {
   
  }
 
15  Development / Other Hardware Development / Re: Favorite I2C Digital Pot? on: January 02, 2013, 06:08:07 am
I have this in the header file

Code:
/**
 * @file x9cxx.h
 * @brief digital pot functions
 */
#ifndef x9cxx_H
#define x9cxx_H
// POT PINS
#define POT_SELECT 6
#define INC 1
#define UD 5
// Pot FUNCTIONS
#define UP 1
#define DOWN 0
#define SELECT 0
#define UNSELECT 1
  void setPot (uint requestedSpeed);
  void resetPot (void);
  void calcPulses (char val[],uint current, uint requested);


#endif // #ifndef x9cxx_H

And this bit is the code I used. Not all the variables are define in this piece of code but yoy should be able to see how it is done. Very easy really.

Code:
void setPot (uint requestedSpeed)
  {
    char val[2];
    calcPulses(val,config.motorSpeed, requestedSpeed);
    digitalWrite(INC,HIGH);
    digitalWrite(POT_SELECT,SELECT);
    digitalWrite(UD,val[1]);
    for(char i=1;i<val[0];i++)
    {
      digitalWrite(INC, HIGH);   // sets the pin on
      delayMicroseconds(5000);        // pauses for 50 microseconds     
      digitalWrite(INC, LOW);    // sets the pin off
      delayMicroseconds(5000);        // pauses for 50 microseconds         
    }
    digitalWrite(INC,HIGH);
    digitalWrite(POT_SELECT,HIGH);
    delay(20);
  }


  void resetPot (void)
  {
      pinMode(INC,OUTPUT);
      pinMode(POT_SELECT,OUTPUT);
      pinMode(UD,OUTPUT);
      digitalWrite(INC,HIGH);
      digitalWrite(POT_SELECT,SELECT);
      digitalWrite(UD,DOWN);
      for(char i=0;i<100;i++)
      {
        digitalWrite(INC, HIGH);   // sets the pin on
        delayMicroseconds(5000);     // pauses for 50 microseconds     
        digitalWrite(INC, LOW);    // sets the pin off
        delayMicroseconds(5000);     // pauses for 50 microseconds         
      }
      digitalWrite(INC,HIGH);
      digitalWrite(POT_SELECT,HIGH);
      delay(20);
   
  }


  void calcPulses (char val[],uint current, uint requested)
  {
    //char val[2];
    char RpmPp = config.maxSpeed / 100;
    if(current < requested)
    {
      val[0] = (requested - current)/RpmPp;
      val[1] = UP;
    }else
    if(current > requested)
    {
      val[0] = (current - requested)/RpmPp;
      val[1] = DOWN;
    }
  }
Pages: [1] 2 3 ... 12