needle

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Don’t shoot me, color question! #1437
    needle
    Member

    seems like a nice product 🙂

    any idea how to use this with an arduino?

    couldn’t find a library…

    i also never saw this before

    in reply to: Potentiometers #1434
    needle
    Member

    thanx! now i can mount my potentiometer to the chassis… 🙂

    (i removed the small one because it was in the way of the rj45 connector)

    in reply to: Potentiometers #1432
    needle
    Member

    I’ve got another question about the potentiometer;

    the middle pin is connected to analog 2, but where do the outer pins go to?

    in reply to: Video Twitter Overlay #1422
    needle
    Member

    Alright, couldn’t sleep… so just got out of bed again, thinking about the “while”

    it didn’t work, but the following does 🙂 :

    #include 
    #include

    TVout tv;
    int i=0;
    unsigned char x,y;


    char message[280] = "";
    char s[32];
    unsigned int n = 0;
    int index = 0;
    int messageLen = 32;
    char saveChar;
    //net
    #include
    #include

    byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x4F, 0xAF };
    byte ip[] = { 192,168,1,121 };
    byte server[] = { 195, 211, 72, 36 };

    // Initialize
    Client client(server, 80);

    void setup() {
    //tv
    tv.begin(PAL,120,96);
    initOverlay();
    tv.select_font(font6x8);

    //net
    Ethernet.begin(mac, ip);
    tv.print(0, 0, "connecting...");

    // if you get a connection, report back via serial:
    if (client.connect()) {
    tv.print(0, 10, "connected");
    // Make a HTTP request:
    client.println("GET /~deb5250/other/arduino/twit.php");
    //client.println();

    }
    else {
    tv.print(0, 10, "connection failed");
    }

    }

    void loop()
    {
    if (client.available()) {
    tv.print(0, 20, "filling array");
    for(int j=0;j<=139;j++) {
    char c = client.read();
    message[j]=c;

    }
    }


    saveChar = message[index+22];
    message[index+22] = '';

    for(int x=6;x>=0;x--) {
    if (x<6) {
    tv.delay_frame(1);
    }
    tv.print(x, 67, message+index);
    tv.print(0, 75, " ");



    }
    message[index+22] = saveChar;
    index++;
    if (index > 139) {
    index = 0;

    }




    }





    void initOverlay() {
    TCCR1A = 0;
    TCCR1B = _BV(CS10);
    TIMSK1 |= _BV(ICIE1);
    EIMSK = _BV(INT0);
    EICRA = _BV(ISC11);
    }

    ISR(INT0_vect) {
    display.scanLine = 0;
    }

    http://www.youtube.com/watch?v=5xF_ASm_lo4

    now i have to change it to refresh after a X period of time….

    in reply to: Video Twitter Overlay #1420
    needle
    Member

    Ah right! that’s a good suggestion, i’ll try that asap when i get of work tomorrow 🙂 i’ll keep you posted.

    in reply to: Video Twitter Overlay #1417
    needle
    Member

    there is no problem getting the tweets from the web and into the arduino, i’ve written a small piece of PHP, that get’s the latest #-tag i specify.

    and put’s that into a single line, so i don’t have to do anything to change it inside the arduino program,

    http://195.211.72.36/~deb5250/other/arduino/twit.php

    i guess the problem is when adding characters to the message array.

    if i add it at the beginning like this:


    char message[] = "...this line is exactly a 140 character's long. like a tweet has a max. of a 140 character's. i'm almost there and only 25 chars to go.ABCDE...this line is exactly a 140 character's long. like a tweet has a max. of a 140 character's. i'm almost there and only 25 chars to go.ABCDE";

    and leave out this:



    message=c;


    so if i don’t add anything to the array but just give it a pre defined array it works very nicely…

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