"I had to write all the code in one function"



  • I hope this just came out wrong: "the Arduino (ATMega1280) being
    single-theaded, I had to write all the code in one function."

    WTF?

    [Removed your duplicate link. -bs]



  • Given the average intelligence of Arduino users (I'm really almost ashamed to have one myself) I'm going to guess he meant that exactly how you read it.



  • "... as soon as a complete package is received, it updates the control lights
    and speed / RPM signals ..." (Emphasis added)

     This must be some new meaning of the word "package".




  • Maybe he means a single thread of code?



  • @Zecc said:

    Maybe he means a single thread of code?

    I've got a horrible feeling he really has got a single massive loop polling for serial bytes and the two timers he mentions later. It sounds like he may not even be using interrupts.

    It's not like Arduino threads are impossible.



  • @scgtrp said:

    Given the average intelligence of Arduino users (I'm really almost ashamed to have one myself)

    You have an Arduino user? Where do you keep him, in the basement?



  • @derula said:

    @scgtrp said:
    Given the average intelligence of Arduino users (I'm really almost ashamed to have one myself)

    You have an Arduino user? Where do you keep him, in the basement?

    No no, Arduino user is the object of the preposition, not the subject of the sentence.  What he's saying is that he's ashamed to have the average intelligence of Arduino users.  I would be too.




  • @scgtrp said:

    Given the average intelligence of Arduino, users, I'm really almost ashamed to have one myself

     

    FTFY



  •  Well, you see, on an embedded system you must.... oh, wait...



  • @derula said:

    You have an Arduino user? Where do you keep him, in the basement?
     

    Yes, how did you know?

     

    I would appreciate it if you would stop snooping in my basement.



  • @scgtrp said:

    I would appreciate it if you would stop snooping in my basement.

    I will. As soon as you uninstall that livestream webcam.



  •  I've been trying to make a Reprap with my brother. I have my Sanguino and so far I'm extremely nonplussed with not only the low reliability of the chip programming tool (it crashes all the time AND often fails to connect to the chip), but also with the general sloppiness of everything related. Half the time at least one of the files is missing from the G code interpreter's repository and the wiki (which is a horrible, horrible mess in its own right. For how little content it actually has, it's as hard to navigate and search as Microsoft.com) doesn't explain the slight modifications needed to the files to get them to work. They're things people with any kind of general coding experience can figure out, but I can't see your average layman figuring it out. Wouldn't be a problem, except they're trying to get the Reprap as much popularity as possible.



  •  the Arduinos were designed for stupid Javafags to run Processing programs on. Really, thats about it. And processing isn't even all that /bad/ its just that it was not in any shape or form designed to run on an embedded device. This... this is the open source project that is killing people.

    you end up with code like

    void drawBlobsAndEdges(boolean drawBlobs, boolean drawEdges)
    {
    noFill();
    Blob b;
    EdgeVertex eA,eB;
    for (int n=0 ; n<blobs.getBlobNb() ; n++)
    {
    b=blobs.getBlob(n);
    if (b!=null)
    {
    // Edges
    if (drawEdges)
    {
    strokeWeight(3);
    stroke(0,255,0);
    for (int m=0;m<b.getEdgeNb();m++)
    {
    eA = b.getEdgeVertexA(m);
    eB = b.getEdgeVertexB(m);
    if (eA !=null && eB !=null)
    line(
    eA.xwidth, eA.yheight,
    eB.xwidth, eB.yheight
    );
    }
    }

    // Blobs
    if (drawBlobs)
    {
    strokeWeight(1);
    stroke(255,0,0);
    rect(
    b.xMinwidth,b.yMinheight,
    b.wwidth,b.hheight
    );
    }

    }

    }
    }

     

    Note here that this is using variables from /another/ file. You heard me, Another File. The complete listing is in java, and basically is a concatonation of everything. /EVERYTHING/. you use in the project. 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.