Announcement

Collapse
No announcement yet.

VISI, Arduino and Leddigits

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VISI, Arduino and Leddigits

    Hello,
    I am using a uLCD-144-G2 connected to a ATMEGA2560. My final goal is to have a screen showing some static text and next to it an integer which represents the analogue value coming in from the ATMEGA. I started off with Visi and was able to create a display using LedDigits quite quickly and was impressed with the software and examples. I then tried to connect the Arduino using the 'genieArduino.h' library to find out that I could not get the uLCD to respond. I then tried the slave mode SPE load and looked into 'GoldeloxBigDemo' and thought that this may be the answer albeit not as elegant as the VISI method. I found that I could write characters to the screen using 'Display.putstr()' without problems but could not find a way to send an interger, I tried 'putnum'.but it is not in the arduino library. I have found how to display images using VISI and SPE - http://www.4dsystems.com.au/download...100_R_1_01.pdf but still no method of sending integer's through serial. I think I am on the write track with using VISI and setting the LCD as a slave from Arduino, but please tell me if you can suggest a better method. In regard to sending a integer through the serial am I missing something here?

    Thanks
    Colin

  • #2
    Hello Colin,

    If you design using ViSi, you would need to create your own protocol.

    If you use Serial, you can use the SPE protocol.

    ViSi-Genie is not applicable to Goldelox displays. Hence, you cannot use the ViSi-Genie-Arduino library (genieArduino.h).

    ViSi-Genie, Serial, and ViSi are separate environments. You have to choose only one.


    I found that I could write characters to the screen using 'Display.putstr()' without problems but could not find a way to send an interger..
    Were you able to try the sample sketch "Display_print.ino" that comes with the Goldelox-Serial library?

    Regards,
    Doff

    Comment


    • #3
      Should you wish to proceed with ViSi and create your own protocol, you would have to use the serial comms functions. You could use the project below as a reference.

      4D-CD-00045 Designer or ViSi Goldelox Serial Communication
      http://forum.4dsystems.com.au/forum/...-communication

      Hope this helps.
      Doff

      Comment


      • #4
        I wrote a function that displays an integer value and allows it to be updated:

        Code:
        int setValue( int ival, int xpos, int ypos, int minval, int maxval )
        {
          char str[] = "ival  ";
        
          Display.txt_MoveCursor(ypos, xpos) ;
          itoa(ival, str, 10);
          Display.putstr((char*)"   ") ;  //clear
          Display.txt_MoveCursor(ypos, xpos) ;
          Display.putstr(str) ;
          while (digitalRead(pin_btSelect) == LOW) {
            if( digitalRead(pin_btStep) == HIGH ) {
              ival++;
              if( ival > maxval )
                ival = minval;
              Display.txt_MoveCursor(ypos, xpos) ;
              itoa(ival, str, 10);
              Display.putstr((char*)"   ") ;  //clear
              Display.txt_MoveCursor(ypos, xpos) ;
              Display.putstr(str) ;
              delay(50); }
            delay(50); }
          delay(500);
          return  ival;
        }

        Comment


        • #5
          Thanks guys, I managed to get this working thanks to the example given in this post http://forum.4dsystems.com.au/forum/...8-visi-example . I tried your code PStechPaul and that worked well as well. Looks a lot better as a graphic.

          Comment

          Working...
          X