problems displaying serial data?

Store Forums Video Experimenter Bugs/Problems problems displaying serial data?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #786
    oceandesign9
    Participant

    hi, i am trying to display on-screen data that in sent to the arduino uno the video experimenter is plugged into. It is the heading 0-360 from
    a digital compass sensor connected to a remote arduino mega. right now i am sending 2 bytes of data to the uno at about 10 times per second.
    it seems to be accurate at first but the goes haywire within 5-10 seconds with wild readings. I guess my question is this, is this possible to do or
    will something like the video shield interrupts interfere with the serial communication? I hope to display more data as well but just trying to get the heading to work for now.

    Serial.readBytes(buffer_in,2);
    heading_lo = buffer_in[0];
    heading_hi = buffer_in[1];
    heading1 = heading_hi;
    heading1 = heading1<<8;
    heading1_temp = heading_lo;
    heading1 = heading1 | heading1_temp;

    TV.print(55,0,"HEAD ");
    TV.print(heading1);

    does anyone have any suggestions, i really need this to work!

    #2338
    Michael
    Keymaster

    You can’t use the Serial library with the Video Experimenter because the interrupts interfere with the video processing. To do serial communication, use the pollserial library that comes with the enhanced TVout library.


    // declare:
    pollserial pserial;

    // use
    byte in = pserial.read();
    #2339
    oceandesign9
    Participant

    Thanks,

    I saw your example fpv osd example http://nootropicdesign.com/projectlab/2011/05/20/overlay-gps-on-video/
    and followed your suggestion. Works great! thanks

    #2340
    Michael
    Keymaster

    Awesome!

    #9134
    czerepsky
    Participant

    Hi,

    I have some problem with display only speed (for the begin can be something else).
    I make video shield by self (with project from web ;)) and i try to connect GPS (NEO-6M).
    On the screen i have simple line which go up and down (loop) and i need to add on the right corner a real speed. I write simple code to horizontal line:

    #include <TVout.h>
    #include <fontALL.h>
    #define W 136
    #define H 96
    TVout tv;
    int y;
    void setup()  {
      tv.begin(PAL, W, H);
      initOverlay();
      tv.select_font(font6x8);
      tv.fill(0);
    }
    // Initialize ATMega registers for video overlay capability.
    // Must be called after tv.begin().
    void initOverlay() {
      TCCR1A = 0;
      // Enable timer1.  ICES0 is set to 0 for falling edge detection on input capture pin.
      TCCR1B = _BV(CS10);
      // Enable input capture interrupt
      TIMSK1 |= _BV(ICIE1);
      // Enable external interrupt INT0 on pin 2 with falling edge.
      EIMSK = _BV(INT0);
      EICRA = _BV(ISC01);
    }
    // Required to reset the scan line when the vertical sync occurs
    ISR(INT0_vect) {
      display.scanLine = 0;
    }
    void loop() {
      for (y=0; y<90; y++){
      tv.draw_line(0, y, 130, y, 1);
      tv.clear_screen();
      delay(500);
      }
      }
    

    But i can’t connect this with GPS. I try with poll serial, but I don’t know what next 🙁
    Could you help me? I need this for my master of thesis.
    And also sorry for my english, it very poor.

    • This reply was modified 7 years, 5 months ago by czerepsky.
    #9136
    czerepsky
    Participant

    When i try compile your code i have a error:
    In file included from /Users/Czerep/Documents/Arduino/test/test_TV_GPS/OverlayGPS/OverlayGPS.ino:5:0:
    sketch/bitmaps.h:6:8: error: 'prog_uchar' does not name a type
    extern prog_uchar bitmaps[];

    I add a pollserial and i have something in monitor but i don’t known what should do next.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.