Jhahn6

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: NewPing with the Video Experimenter #8179
    Jhahn6
    Participant

    After some research I have found that Serial does not cooperate with VE. I have made a simpler code to implement one ping ultrasonic sensor:

    
    #include <TVout.h>
    #include <NewPing.h>
    #include <fontALL.h>
    #define W 136
    #define H 96
    TVout tv;
    
    #define MAX_DISTANCE 200
    
    #define TRIGGER_PIN1  11
    #define ECHO_PIN1     10
    
    NewPing sonar1(TRIGGER_PIN1, ECHO_PIN1, MAX_DISTANCE);
    
    void setup() {
      tv.begin(NTSC, W, H);
      initOverlay();
      tv.select_font(font6x8);
      tv.fill(0);
      randomSeed(analogRead(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(ISC11);
    }
    
    // Required to reset the scan line when the vertical sync occurs
    ISR(INT0_vect) {
      display.scanLine = 0;
    }
    
    void loop() {
      int uS1 = sonar1.ping();
      int measure1 = uS1 / US_ROUNDTRIP_IN;
      tv.print(50,50,measure1);
      tv.print("in");
      tv.delay_frame(5);
    
    }
    

    My new question is, does using four ultrasonic sensors put too much load on the Arduino, and am I able to play with delays to increase the accuracy of the readings they provide?

    in reply to: Problem Starting With the Video Experimenter #8177
    Jhahn6
    Participant

    Thank you very much for looking into it. I greatly appreciate it. I will relay back the results shortly.

    in reply to: Problem Starting With the Video Experimenter #8175
    Jhahn6
    Participant

    Here is an image of what is happening on the monitor:

    View post on imgur.com

    Here is the simple code I am using:

    #include <TVout.h>
    #include <fontALL.h>

    #define W 136
    #define H 96

    TVout tv;
    unsigned char x,y;
    unsigned char originx = 5;
    unsigned char originy = 80;
    unsigned char plotx = originx;
    unsigned char ploty = 40;
    char s[32];
    unsigned int n = 0;
    int index = 0;
    int messageLen = 32;
    char message[] = “…OVERLAY TEXT AND GRAPHICS ON A VIDEO SIGNAL…OVERLAY TEXT AND GRAPHICS ON A VIDEO SIGNAL”;
    char saveChar;

    void setup() {
    tv.begin(NTSC, W, H);
    tv.select_font(font6x8);
    tv.fill(0);
    randomSeed(analogRead(0));
    }

    void loop() {
    // put your main code here, to run repeatedly:
    tv.print(“Test”);
    }

    in reply to: Problem Starting With the Video Experimenter #8174
    Jhahn6
    Participant

    I have been looking through the forum threads and have identified the same problem some others have described. When using basic sketches to print “test”, the image seems to run across the page. More specifically there are multiple test images flashing in rows from left to right.

    FYI I purchased the pre-assembled kit from you guys and haven’t changed the configuration at all. Listed below is an image of the experimenter:

    View post on imgur.com

    I apologize for the focus, I did the best I could to get all of the details.

    in reply to: Problem Starting With the Video Experimenter #8173
    Jhahn6
    Participant

    Hello Michael,

    Firstly, thank you for the quick response. I have the jumper set to V.INPUT and the output select switch set to Overlay. As for the R4 potentiometer, it is set to the counter-clockwise most position.

    Cheers!

    in reply to: Problem Starting With the Video Experimenter #8170
    Jhahn6
    Participant

    It seems as though the links to the file folder pictures aren’t appearing. Below are raw URL’s:

    View post on imgur.com

    View post on imgur.com

    View post on imgur.com

Viewing 6 posts - 1 through 6 (of 6 total)