Announcement

Collapse
No announcement yet.

uVGA-II Arduino Sketch

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

  • uVGA-II Arduino Sketch

    I'm having difficulties getting my Arduino 2560 to talk to my uVGA-II SGC. I get the 4d Logo on the screen, but it doesn't seem to be accepting commands over Serial3. Does anyone have a simple sketch that will put anything on the screen so I can verify it's working?
    Steve Spence KK4HFJ
    http://arduinotronics.blogspot.com

  • #2


    If you get the 4d logo - you have missed the U - autobaud - there are libraries for 4d screens - would have thought these will work for most thing

    Comment


    • #3


      I'm sending the autobaud statement, but it's like the card is ignoring it. I have yet to find anyone with a working sketch I can try.

      HTML Code:
      void setup(){
      Serial3.begin(9600); 
      Serial3.flush();       
      delay(1200);      // wait for uVGA to power up
      VGA_sendCommand(0x55); // autobaud - sync the communication speed
      VGA_GetResponse();
      clearScreen();         // clear the screen
      VGA_sendCommand(0x42); // set background color
      VGA_sendCommand(0x00); // indexed color value for black
      VGA_GetResponse();
      VGA_sendCommand(0x4F); // opaque text
      VGA_sendCommand(0x01); 
      VGA_GetResponse();
      }
      
      // send instruction to uVGA module
      void VGA_sendCommand(byte command){
      Serial3.write(command);
      }
      
      // get confirmation byte from video module saying it completed drawing
      void VGA_GetResponse(){
      while (!Serial3.available()) {}    // Wait for data available
      Serial3.read();                    // burn read incoming byte
      }
      
      // clear screen
      void clearScreen(){
      VGA_sendCommand(0x45); 
      VGA_GetResponse();
      }
      
      
      void loop()
      {
      }
      Steve Spence KK4HFJ
      http://arduinotronics.blogspot.com

      Comment


      • #4


        Ok, my initial sketch is now working. I had a bad uVGA-II. Got a replacement, and I'm now outputting data to the vga screen. I've tried the potter library in the hopes that it would make life easier to display variable data inside boxes and circles, but it doesn't compile on my Arduino 2560. Is there an easy to use library available for this card?
        Steve Spence KK4HFJ
        http://arduinotronics.blogspot.com

        Comment


        • #5


          do you have a link to the library that does not work?

          Comment


          • #6


            http://thepotterproject.net/TPPNews/?page_id=39
            Steve Spence KK4HFJ
            http://arduinotronics.blogspot.com

            Comment


            • #7


              it will compile if you

              1 put all the files in the zip in the Picaso folder - it puts some in the librairies folder

              2 install the NewSoftSerial from the link on his site

              Or it compiles for me

              Comment


              • #8


                I get:

                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:icaso()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:icaso()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::ResetDisplay()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::GetResponse()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `PicSerial'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::Init()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::Send(unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetResolution(unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::CheckBounds(unsigned int, unsigned int, unsigned int, unsigned int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::CheckTextBounds(unsigned int, unsigned int, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetBGColor(unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::GetRGB(int, int, int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::GetMSB(unsigned int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::GetLSB(unsigned int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::Clear()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetFontSize(unsigned int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetFill(unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawSingleChar(unsigned int, unsigned int, unsigned int, unsigned int, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawText(unsigned char, unsigned char, unsigned char, char*, unsigned int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawUnformattedChar(char, unsigned int, unsigned int, unsigned char, unsigned char, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawUnformattedText(unsigned int, unsigned int, unsigned char, unsigned char, unsigned char, unsigned char, char*)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawLine(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawRectangle(unsigned int, unsigned int, unsigned int, unsigned int, unsigned char, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawCircle(unsigned int, unsigned int, unsigned int, unsigned char, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawTriangle(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawTextButton(bool, unsigned int, unsigned int, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, char*)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::CopyBitmap(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned char, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawEllipse(unsigned int, unsigned int, unsigned int, unsigned int, unsigned char, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawPolygon(int, unsigned char, PicasoPoint, PicasoPoint, PicasoPoint, PicasoPoint, PicasoPoint, PicasoPoint, PicasoPoint)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawBitmap()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetOpaqueText(bool)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:rawPixel(unsigned int, unsigned int, unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::GetPixel(unsigned int, unsigned int)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetDisplayPage(unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetReadPage(unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso::SetWritePage(unsigned char)'
                Picaso.cpp.oicaso.cpp:27: first defined here
                Picaso/Picaso.cpp.o: In function `global constructors keyed to PicSerial':
                /home/sspence65/sketchbook/libraries/Picaso/Picaso.cpp:27: multiple definition of `Picaso:emo()'
                Picaso.cpp.oicaso.cpp:27: first defined here
                core.a(main.cpp.o): In function `main':
                /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp:7: undefined reference to `setup'
                /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp:10: undefined reference to `loop'
                collect2: ld returned 1 exit status
                Steve Spence KK4HFJ
                http://arduinotronics.blogspot.com

                Comment


                • #9


                  Libraries should be in the ardunio folder or mine are

                  Comment


                  • #10


                    I have the picaso folder in the library folder in the sketchbook folder, as it should be.
                    Steve Spence KK4HFJ
                    http://arduinotronics.blogspot.com

                    Comment


                    • #11


                      I ended up writing my own functions (with some guidance from others), and not using a separate library.

                      Working project at

                      http://tech.groups.yahoo.com/group/arduinohome/files/Arduino%20-%20VGA%20-%20Micrometer/
                      Steve Spence KK4HFJ
                      http://arduinotronics.blogspot.com

                      Comment

                      Working...
                      X