Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: el_supremo

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    27
    Views
    454

    I didn't think to try digitalToggleFast! But it...

    I didn't think to try digitalToggleFast! But it compiles to what I show in #6.

    Pete
  2. Replies
    27
    Views
    454

    The digitalToggle function doesn't compile down...

    The digitalToggle function doesn't compile down to a single STR like digitalWriteFast does but you can use this in its place:

    CORE_PIN0_PORTTOGGLE = CORE_PIN0_BITMASK;
    CORE_PIN0_PORTTOGGLE =...
  3. Replies
    27
    Views
    454

    In this message...

    In this message Paul says that digitalWriteFast compiles to a single STR instruction but that it can take two clock cycles to execute.
    @tonton81 may be right that toggling could be faster because,...
  4. Replies
    27
    Views
    454

    Each of those statements is compiled to a single...

    Each of those statements is compiled to a single assembler instruction so I don't think you can improve on it.
    Does it make any difference if you compile with Tools|Optimize: "Fastest" ?

    Pete
  5. Replies
    36
    Views
    413

    Hmmmm. The link in #28 is to...

    Hmmmm. The link in #28 is to https://forum.pjrc.com/attachment.php?attachmentid=21728 which shows the image to me.
    Try again:
    21739
    That seems to have attached in a different way but I used the...
  6. Replies
    36
    Views
    413

    @KurtE: Does the attachment in #28 work for you?...

    @KurtE: Does the attachment in #28 work for you?

    Pete
  7. Replies
    36
    Views
    413

    The rest of your wiring looks OK. I hooked up a...

    The rest of your wiring looks OK.
    I hooked up a T3.6 with several I2C devices, including the Chronodot. I tried two different I2C scanners and both find all 5 addresses on the bus using a range of...
  8. Replies
    36
    Views
    413

    Chandler obviously had problems including an...

    Chandler obviously had problems including an image in a message and has emailed me the photo. I've resized it (it was over 3MB) and include it here:
    21728

    Looks to me like you haven't got SDA and...
  9. Replies
    36
    Views
    413

    If the scanner doesn't find anything, can you...

    If the scanner doesn't find anything, can you post a photo that shows how things are wired?

    Pete
  10. Replies
    36
    Views
    413

    Maybe a picture will help. 21726 This shows a...

    Maybe a picture will help.
    21726
    This shows a T4.1 on a breadboard, but note that I haven't yet soldered it to the header pins (a teensy MUST be soldered to the header pins to work at all).
    The...
  11. Replies
    36
    Views
    413

    Have you tried using external pullups on SCL and...

    Have you tried using external pullups on SCL and SDA - about 2k2? The Adafruit board has 10k pullups which may not be sufficient.

    Pete
  12. I hadn't changed the clock - how would I do that?...

    I hadn't changed the clock - how would I do that?

    Pete
  13. WOW! It works! This is an FV chip which never...

    WOW! It works! This is an FV chip which never completed an erase before.

    PSRAM: 0 MB

    Enter 'y' in 6 seconds to format FlashChip - other to skip

    Erasing... (may take some time)
    ...
  14. Thanks. Pete

    Thanks.

    Pete
  15. @mjs513: which cpp file are you referring to? ...

    @mjs513: which cpp file are you referring to?

    Thanks
    Pete
  16. Replies
    8
    Views
    203

    I had been looking at the code for playSDRaw and...

    I had been looking at the code for playSDRaw and was wondering if it was handling interrupts properly but hadn't got around to actually doing anything about it. Specifically, I was wondering if it...
  17. What exactly do you mean by doesn't work? That...

    What exactly do you mean by doesn't work?
    That code (with the #define) runs fine for me on a T3.2 and a T4.0 (on Win 10 with Arduino 1.8.13 and TD 1.53).

    Pete
  18. Replies
    8
    Views
    203

    I haven't got the hardware to be able to play...

    I haven't got the hardware to be able to play around with the code so I can only suggest things to try to see if they make things better or worse.
    The thing I would try is to add a delay between...
  19. FWIW: I'm having the same problem with Winbond...

    FWIW: I'm having the same problem with Winbond 25Q128JVSQ on the T4.1 and also occasionally have had it happen on the T3.6. Can't figure out what's wrong. I'm hoping you come up with a solution!
    ...
  20. Replies
    8
    Views
    203

    Try adding playSdRaw1.stop()/playSdRaw.stop() in...

    Try adding playSdRaw1.stop()/playSdRaw.stop() in the appropriate places so that the currently playing object is stopped properly before being restarted.

    Pete
  21. I missed this: both windSpeedRotations and...

    I missed this: both windSpeedRotations and rainfallTipCount must be declared volatile if they are modified in an interrupt.

    Pete
  22. // RAINFALL INITIALIZE digital.pinMode(16,...

    // RAINFALL INITIALIZE
    digital.pinMode(16, INPUT_PULLDOWN, RISING); // Rainfall
    attachInterrupt(digitalPinToInterrupt(16), rainfallGetSample, RISING);

    // WIND SPEED INITIALIZE
    ...
  23. In what way does it fail? What happens in...

    In what way does it fail?


    What happens in this case?

    Post your code which uses the attachinterrupts.

    Pete
  24. Why? It will only take a microsecond or so longer...

    Why? It will only take a microsecond or so longer to "wait its turn" than a directly attached function.

    Pete
  25. Replies
    9
    Views
    389

    Like KurtE, I have also run into this but can't...

    Like KurtE, I have also run into this but can't remember which sketch or how I fixed it.

    But this compiles:
    velocity.h

    const static float VELOCITY[2][5] PROGMEM = {
    {1.0f, 1.0f, 1.00f,...
  26. Replies
    4
    Views
    245

    The Goldwave audio editor has a filter which it...

    The Goldwave audio editor has a filter which it just calls "Noise Reduction". To use it, you select a small segment of your audio file which contains only the noise and copy this to the clipboard....
  27. As far as I can see, there is no failure here. It...

    As far as I can see, there is no failure here. It is doing precisely what you're telling it to do, which is to spend more than 99.9% of the time repeatedly printing W on a line of its own. This...
  28. This statement isn't correct: ...

    This statement isn't correct:

    Serial.write("\nValue Read:\n",inByte);
    This form of Serial.write requires the address of a buffer as the first argument and the length of that buffer as the...
  29. Justa sec. How are you testing this? ...

    Justa sec. How are you testing this?

    inByte = Serial.read();
    Serial.write("\nValue Read:\n",inByte);
    If your Teensy is reading data from the PC's COM3, the string that you write back...
  30. Use CreateFileA. This is probably why you...

    Use CreateFileA.

    This is probably why you don't see anything when it establishes the connection:


    int SerialBuffer = 0;
    int BytesWritten = 0;
    SerialBuffer = 123;
    Status...
  31. Replies
    5
    Views
    255

    Correct. There's nothing wrong with the...

    Correct.

    There's nothing wrong with the "while". If there are no characters in the Serial2 buffer then the while is bypassed. The if statement does two things. First, the "gps.encode(c)" passes...
  32. Replies
    4
    Views
    118

    I presume that you're using PlaySDWav in which...

    I presume that you're using PlaySDWav in which case the audio design documentation for that says "Only 16 bit PCM, 44100 Hz WAV files are supported".

    Pete
  33. Replies
    4
    Views
    118

    What are you using to play the wav files? If new...

    What are you using to play the wav files?
    If new wav files don't work, maybe they have the wrong sample rate, etc.

    Pete
  34. I presume that you want to have the variable...

    I presume that you want to have the variable "previous_count" hold the value before the count went to zero.
    In which case, this code

    count = FreqCount.read();
    count =count*1000;
    previous_count...
  35. If the plotter works in the same way as the...

    If the plotter works in the same way as the Serial Monitor and you only type the 'g', it won't be sent. You have to hit Enter as well.

    Pete
  36. The example in msg #2 uses SoftwareSerial on pins...

    The example in msg #2 uses SoftwareSerial on pins 3 and 4 at 4800 baud instead of Serial1 on pins 0 and 1 at 9600 baud.
    Try this code which reads the raw GPS output at 9600 baud on Serial1. It works...
  37. Your sample code in msg #4 is not the same as the...

    Your sample code in msg #4 is not the same as the snippet in #1.

    p = strstr("Test String", "str");
    will return NULL because "str" does not occur in "Test String".
    Your tests in #4 all use "Test...
  38. Replies
    5
    Views
    178

    Which Teensy are you using? Pete

    Which Teensy are you using?

    Pete
  39. It could also be a problem with the code. Post...

    It could also be a problem with the code. Post it.

    Pete
  40. No, like this: void setup() { } void loop(){...

    No, like this:

    void setup() {
    }
    void loop(){
    uint32_t start = ARM_DWT_CYCCNT;
    ....
    ....
    program
    ....
  41. Replies
    6
    Views
    291

    You then refer to the i'th element as Nom[i]....

    You then refer to the i'th element as Nom[i].
    Serial.println(Nom[2]) would print
    Lyon

    Pete
  42. Replies
    6
    Views
    291

    char...

    char *Nom[10]={"Paris","Marseille","Lyon","Rennes","Toulouse","Strasbourg","Grenoble","Lille","Nantes","Bordeaux"};

    or

    char...
  43. Replies
    15
    Views
    418

    Those are longer pins than the ones I thought you...

    Those are longer pins than the ones I thought you had used. They look good.

    Pete
  44. Replies
    15
    Views
    418

    When you solder the Teensy header on the bottom...

    When you solder the Teensy header on the bottom of the board, you will have used the shorter end of the header pin, which is then shortened even more by the solder. This will prevent the pins making...
  45. Replies
    12
    Views
    344

    I think this is the datasheet...

    I think this is the datasheet you need. See Figure 5 at the bottom of page 4.

    Pete
  46. Replies
    12
    Views
    344

    What you called a step-down transistor is a...

    What you called a step-down transistor is a voltage regulator. If you really are using a L7812CV, as shown in your diagram, it is the wrong one and would probably have burned out the T3.2 instantly....
  47. The default sample rate is 44100Hz. You can...

    The default sample rate is 44100Hz. You can change that rate at startup but I don't think you can change it on the fly and AFAIK you can only change it to a small range of frequencies (e.g. 8kHz,...
  48. Replies
    5
    Views
    229

    @ Beserker When you return the switch to the...

    @ Beserker
    When you return the switch to the neutral position, you will have just turned either the "left" (pin 0) or "right" (pin 1) side of the switch off. If you use the Bounce library, it is...
  49. I posted a (fairly) simple example of using...

    I posted a (fairly) simple example of using readBuffer/freeBuffer and getBuffer/Playbuffer here which might help you. It simply reads the stereo input (MIC or LINEIN) and plays it back to the...
  50. I vote for isodate too. Pete

    I vote for isodate too.

    Pete
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4