Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 17 of 17

Thread: Please Post Code & Details In Your Question!

  1. #1
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    266

    Please Post Code & Details In Your Question!

    Please, when asking a technical question, provide enough information for us to help!


    • Complete Source Code (or a link to the code)
    • Screenshot or the exact text of any error messages
    • Which PJRC product you're using
    • Part numbers of any other chips or modules + links to their info
    • Wiring details - how exactly have you connected the hardware (a photo's worth 1000 words)
    • Software setup, Arduino vs C+makefile, running on Windows, Mac or Linux?Versions?
    • Any other information needed to reproduce the problem.....


    Providing enough detailed information to reproduce your problem saves everyone time and greatly increases the odds we'll be able to help you with a useful answer.

    If you haven't connected wires or run code yet, please post your question in the Project Guidance forum.

  2. #2
    is there a way -tags or otherwise - to format attached code? If I copy and paste code in it is wrapping long lines and removing indention.

  3. #3
    Senior Member ZTiK.nl's Avatar
    Join Date
    Dec 2012
    Location
    Amsterdam
    Posts
    179
    use the [ CODE] and [ /CODE] tags for that.
    If you want to see all tags, click on the 'Go Advanced' button below the Quick Reply field :)

  4. #4
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,068
    Unfortunately the forum software hides the button that inserts code tags, unless you click 'Advanced'. Its the button that looks like this: #

    Click image for larger version. 

Name:	codetags.png 
Views:	437 
Size:	17.3 KB 
ID:	240

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,720
    You can also attach the file. Click "go advanced" and then it's Manage Attachments below your message. Often when looking at someone's, I load it into vim, so I get familiar syntax highlighting. But the code tags work nicely for small bits of code.
    Last edited by PaulStoffregen; 03-01-2013 at 07:30 PM.

  6. #6
    Junior Member
    Join Date
    Aug 2014
    Posts
    5
    When I try to run the movie2serial program, it could not load the file. Im not sure if the path I wrote is in the correct format. The fp.avi and the movie2serial is in the same folder already.
    I've try both of this but none of them work.

    Movie myMovie = new Movie(this, "/tmp/fp.avi");
    Movie myMovie = new Movie(this, "fp.avi");

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,720
    Quote Originally Posted by yustinusa agung View Post
    i have question about Analog input ..
    You should start a new thread, in the project guidance section, to discuss this in more detail.

    can i read analog output 1-5 v with teensy 3.1
    The ADC pins are limited to 3.3V max measurement range. You'll need to use resistors or a circuit to reduce the signal to match Teensy's input range.

  8. #8
    Paul: Can the Forum page top rule be a hyper link to this page/post?

    https://forum.pjrc.com/threads/15136...ll=1#post17615

  9. #9
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    I'd suggest that the DMA chaining scheme could interleave the bytes: 1st pass does half, second pass does others. But DMA hardware requires address aligned buffers.

  10. #10
    I am trying to merge two Audio Workshop tutorial sketches together to run the part 3-2 FFT1024 with the part 3-3 Add a TFT Display. I have a breadboard large enough to incorporate the (2.8 in ILI9341 display), audio board and Teensy 3.2 board. Of course, both tutorial sketches work fine by themselves. So I have attached the combined sketches as one file inwhich I commented out the bar drawing in 3-3 as I was just trying to print one of the FFT numbers (leftNumber) to start with instead of the peak1 or peak2 functions. The sketch compiles except at the end it gives the following error (region 'FLASH' overflow by 3768 bytes):

    Click image for larger version. 

Name:	Error Capture Part_3_02_Rourier_Transform_Mod FLASH overflow.jpg 
Views:	162 
Size:	21.9 KB 
ID:	7618

    Not sure how to attach/upload the sketch as I am new to this forum, but here is the section I have imported from the 3-3 sketch into the bottom of the FFT sketch along with inserting the necessary TFT setup and include statements in the top part. Is it possible to print to the display as well as the serial port? I have reduced the variable "n" to an integer for the leftNumber, but somehow it is creating a FLASH overflow?

    int leftNumber = (int)n; // Change leftNumber to integer of n

    if (msecs > 15) {
    // if (n.available() {
    msecs = 0;
    delay(10); // wait for library to parse WAV inf - is this necessary
    // float rightNumber = n;
    Serial.print(leftNumber);
    Serial.print(", ");
    // Serial.print(rightNumber);
    // Serial.println();

    // draw the verticle bars
    // int height = n * 240;
    // tft.fillRect(60, 280 - height, 40, height, ILI9341_GREEN);
    // tft.fillRect(60, 280 - 240, 40, 240 - height, ILI9341_BLACK);
    // height = n * 240;
    // tft.fillRect(140, 280 - height, 40, height, ILI9341_GREEN);
    // tft.fillRect(140, 280 - 240, 40, 240 - height, ILI9341_BLACK);
    // a smarter approach would redraw only the changed portion...

    // draw numbers underneath each bar
    tft.setFont(Arial_14);
    tft.fillRect(60, 284, 40, 16, ILI9341_BLACK);
    tft.setCursor(60, 284);
    tft.print(leftNumber);
    // tft.fillRect(140, 284, 40, 16, ILI9341_BLACK);
    // tft.setCursor(140, 284);
    // tft.print(rightNumber);
    }
    // }
    }
    Last edited by jshooks; 07-14-2016 at 05:34 AM. Reason: Tried something else, but didn't work

  11. #11
    Quote Originally Posted by jshooks View Post
    ... Not sure how to attach/upload the sketch ...
    See post #3 or #4 above for CODE insertion. And see post #7 about creating a new thread ... perhaps there or in "Technical Support & Questions"

  12. #12
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,720
    Quote Originally Posted by jshooks View Post
    The sketch compiles except at the end it gives the following error (region 'FLASH' overflow by 3768 bytes):
    This means your program is too large to fit into Teensy's flash memory.

    The FFT code uses large lookup tables that consume a lot of flash memory. If you're using the example which plays a guitar sound (can't see all of your code... you didn't follow the Forum Rule... so I'm trying to help with blind guessing), that data for the guitar also consumes a lot of memory. The fonts for the display are also large, if you use any of the larger sizes (again, can only see Arial_14, hard to know if you've got any others).

    You need to trim some stuff from your program so it'll fit into Teensy's memory. Especially if you have that guitar sound in your code, deleting that should free up plenty of space.

  13. #13
    https://forum.pjrc.com/threads/37218...-bad-soldering
    Teensy 3.2 Through-hole damaged due to bad soldering

  14. #14
    I'm searching for weight, dimensions, voltage & amperage for Teensy 3.1 and 3.5. Would you provide me such info please ?

  15. #15
    Moderator Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    939
    Everything is in the data sheets which you can download from the prjc.com website. Attention: The Teensy 3.1 is discontinued in favor of the more robust 3.2

  16. #16
    Moderator KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,075
    @Paul, @Robin - This thread has been spammed a few times.

    Wonder if it would make sense, to edit this thread, and maybe remove most everything except the first posting, where you might merge in a few of the details from other postings, like use the # button to get the code tags, which is now also available on the quick reply....

    And then lock it.

  17. #17
    Senior Member
    Join Date
    Dec 2016
    Location
    Canada
    Posts
    705
    I vote for bumping this thread all the time, it might help people read it eventually since the static red text is ignored lol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •