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. This might be the problem: sprintf (...

    This might be the problem:

    sprintf ( outgoingBytes , "s,%2.4f,%2.4f,%2.4f,%2.4f,e" , var1 , var2 , var3 , var4 ) ;
    The format specifiers aren't right. %2.4f means that the whole field is two...
  2. Replies
    14
    Views
    311

    I can't find a WAV file in that project. Pete

    I can't find a WAV file in that project.

    Pete
  3. You need to set the mode of the input pins too. ...

    You need to set the mode of the input pins too.


    // setup the input pins
    for(int i = 8; i <= 9; i++){
    pinMode(i, INPUT_PULLUP);
    }

    Do you have a resistor in series with the...
  4. The bitClear will fix the incoming parity issue....

    The bitClear will fix the incoming parity issue. You've implied that the parity bit is added to transmitted characters so you should be OK.

    Pete
  5. P.S. to clarify: that is why you don't match EOT....

    P.S. to clarify: that is why you don't match EOT. You are looking for 0x04, but it is received as 0x84. And you can match '3' because it is already even parity, but you can't match '2' because it is...
  6. The 8 bits you read are 7 bits of data and the...

    The 8 bits you read are 7 bits of data and the parity bit (in the high order position).
    The character '3' is hex 0x33 = 00110011. There are an even number of bits in the 7 data bits so the high...
  7. You aren't timing the Teensy. You are timing how...

    You aren't timing the Teensy. You are timing how long it takes to fetch the data from the ICM_20948 using I2C protocol.

    Pete
  8. Your code snippet doesn't include the code which...

    Your code snippet doesn't include the code which prints "20;2" which is where the problem is almost certain to lie. Post the code which prints this value.

    Pete
  9. Post some code which demonstrates the error(s)....

    Post some code which demonstrates the error(s). (Defragster beat me to it by 1 minute)

    Pete
  10. The setthetime funtion does not adjust the GPS...

    The setthetime funtion does not adjust the GPS time to local time. It sets the RTC to GPS time (UTC).
    When doing arithmetic on time values, such as adjusting the timezone, I find it best to use the...
  11. The return statements are preventing the code...

    The return statements are preventing the code doing anything at all.

    return (FlapsOBleft_pos, (0));
    should presumably be:

    FlapsOBleft_pos = 0;
    and the other return statements also...
  12. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    579

    De nada! And that has almost exhausted what I...

    De nada!
    And that has almost exhausted what I know of the Spanish language :)

    Pete
  13. Replies
    11
    Views
    485

    Can you check the output voltage of the...

    Can you check the output voltage of the smartphone charger with no load and then when it is connected to the T4? It may be producing more than 5V. Chargers aren't power supplies.

    Pete
  14. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    579

    In init_priv you need to change Wire.begin() to...

    In init_priv you need to change Wire.begin() to Wire2.begin().
    Also, remove Wire2.begin(0x27) from the setup function - it will be done by init_priv.

    Pete
  15. Replies
    4
    Views
    317

    What sort of filtering did you use? Pete

    What sort of filtering did you use?

    Pete
  16. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    579

    P.S. I also use the standard one-bus I2C scanner...

    P.S. I also use the standard one-bus I2C scanner and defined Wire to be Wire2. That also finds the ds3231 and the EEPROM.

    Pete
  17. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    579

    This code (don't remember where I found it) will...

    This code (don't remember where I found it) will scan for I2C devices on Wire, Wire1 and Wire2 on a T4.1.


    // i2c_scanner
    // http://playground.arduino.cc/Main/I2cScanner
    //
    // Version 1
    // ...
  18. Replies
    5
    Views
    250

    FastCRC and the website also agree when given the...

    FastCRC and the website also agree when given the input as a character string.

    /*
    FastCRC-Example
    (c) Frank Boesing 2014
    */

    #include <FastCRC.h>

    FastCRC8 CRC8;
  19. Replies
    5
    Views
    250

    You have to encode those 24 bits as 3 bytes - in...

    You have to encode those 24 bits as 3 bytes - in hex they are 0x64,0x29,0x22. This website gives 0x93 as the CRC8 of those three bytes.
    FastCRC agrees:

    /*
    FastCRC-Example
    (c) Frank Boesing...
  20. Replies
    5
    Views
    250

    Post the code you used to test the CRC. Pete

    Post the code you used to test the CRC.

    Pete
  21. Replies
    18
    Views
    896

    return (uint8_t) ((rawregvalue >> 20) +...

    return (uint8_t) ((rawregvalue >> 20) + (rawregvalue >> 16)) & 0x0f;
    Shouldn't that be & 0xff ?

    Pete
  22. I don't think that would be useful. Having an...

    I don't think that would be useful. Having an option of using sign-magnitude for the DHT22 is pointless and potentially confusing because it only uses twos-complement. Similarly, there's not much...
  23. I see one potential problem with your fix. The...

    I see one potential problem with your fix. The DHT21 might use sign-magnitude in which case you would need to split the DHT21 and DHT22 cases so that they handle the negative numbers correctly for...
  24. That should do it. Pete

    That should do it.

    Pete
  25. Replace the debug printf with this which will add...

    Replace the debug printf with this which will add my interpretation of the temperature (I hope - untested):

    Serial.printf("DEBUG: %02X %02X %02X %02X : %02X (%6.2f)\n",...
  26. What is the actual temperature? I'm suspicious...

    What is the actual temperature?

    I'm suspicious that the device actually represents the temperature as twos-complement, whereas both libraries treat it as sign-magnitude.
    If it is twos-complement,...
  27. Try this: DHT dht(DHTPIN, DHTTYPE, 27); and...

    Try this:

    DHT dht(DHTPIN, DHTTYPE, 27);

    and see my old thread about problems with the DHT22 on Teensy 3.

    If that doesn't help, let's try adding a debugging print in the library. Near the end...
  28. Can you try the Adafruit library - it's in the...

    Can you try the Adafruit library - it's in the Library Manager?

    Pete
  29. Which library are you using? The one I have (by...

    Which library are you using? The one I have (by Adafruit) does not have a read22() method.

    Pete
  30. Replies
    12
    Views
    692

    You are reading the RMS result thousands of times...

    You are reading the RMS result thousands of times a second even when it is not available. Try changing your loop function to this:

    void loop()
    {
    if(rms1.available()) {
    x = rms1.read();
    ...
  31. Replies
    12
    Views
    1,440

    I've not been able to find one for the M7 so I...

    I've not been able to find one for the M7 so I have presumed that the M4 info is a lower bound on the performance of the M7 :)

    Pete
  32. Replies
    12
    Views
    1,440

    This webpage...

    This webpage has a description of the FPU instructions and their timing. There's also a PDF version of the M4 DSP instructions.

    Pete
  33. I tried your code with an M-Audio keyboard which...

    I tried your code with an M-Audio keyboard which has a modwheel. No matter how much I roll the wheel and play chords and arpeggios, the total note count is always zero at the end.
    You didn't include...
  34. Replies
    10
    Views
    365

    Your code in #3 compiles for me with no errors....

    Your code in #3 compiles for me with no errors. But I am using Arduino 1.8.19, not 1.8.16, and Teensyduino 1.56.

    Pete
  35. Replies
    10
    Views
    365

    #define LockB 35 #define LockLed 30 These two...

    #define LockB 35
    #define LockLed 30
    These two pins are on the bottom of the T4.0. Are you actually using them? Looks like you have spare pins on the top which would be a lot easier to use.

    Pete
  36. Artnet.h #includes Ethernet.h which conflicts...

    Artnet.h #includes Ethernet.h which conflicts with NativeEthernet.

    Don't know how to fix this but I would try meddling with Artnet.h and where it references Ethernet, change it to NativeEthernet....
  37. Replies
    5
    Views
    452

    You need to start debugging your code. Pete

    You need to start debugging your code.

    Pete
  38. No it won't. You've fixed the index but you can't...

    No it won't. You've fixed the index but you can't treat queue1.readBuffer() as an array. You have to save the address in a pointer and then use it as I showed in #12.

    Pete
  39. Replies
    14
    Views
    584

    Can you also post photos of the underside of each...

    Can you also post photos of the underside of each Teensy?

    Pete
  40. (float)(queue1.readBuffer()[i]) This won't work....

    (float)(queue1.readBuffer()[i])
    This won't work. readBuffer returns the address of a buffer, if one is available, and returns NULL otherwise.
    Using 'i' as an array index will also fail because it...
  41. You aren't using the most recent version of the...

    You aren't using the most recent version of the Arduino IDE and Teensyduino. The version of Teensyduino you are using does not have the play() function in the Audio library AudioPlayQueue.
    You...
  42. Replies
    14
    Views
    584

    Can you post photos of the two Teensys? Pete

    Can you post photos of the two Teensys?

    Pete
  43. Replies
    14
    Views
    584

    It's not clear to me what the hardware setup is...

    It's not clear to me what the hardware setup is like. Do you have two completely separate installations, one works and the other doesn't. When you exchange the T3.2 between the two setups, the...
  44. Replies
    14
    Views
    584

    What do you mean by "firmware reference"? The...

    What do you mean by "firmware reference"? The firmware is your code.


    Distinguish which one from which other one? If you mean the T3.2, they should be the same.
    If you mean the code in each...
  45. Replies
    24
    Views
    747

    Did you buy them all from PJRC? Pete

    Did you buy them all from PJRC?

    Pete
  46. Replies
    24
    Views
    747

    And the code @defragster used on a T4.1 also...

    And the code @defragster used on a T4.1 also works on a T3.2

    Part of the problem may be that you are running the most recent version of Teensyduino on a rather old version of the Arduino IDE. The...
  47. Can you send MIDI to a PC/MAC and monitor the...

    Can you send MIDI to a PC/MAC and monitor the received MIDI (e.g. with MIDI-OX)? I have used usbhost on a T3.6 to receive MIDI from a M-Audio keyboard and relay it to a PC and I don't have any...
  48. Replies
    2
    Views
    361

    Yes. As long as the SD card doesn't lag between...

    Yes. As long as the SD card doesn't lag between each WAV it'll be fine. If it does lag, you could store the audio files on PSRAM and use AudioPlaySerialflashRaw but, as its name implies, it doesn't...
  49. Do you have any versions in between 1.8.13+TD...

    Do you have any versions in between 1.8.13+TD 1.53 and 1.8.19+TD 1.56?
    Can you try 1.8.15+TD 1.54 and/or 1.8.16+TD 1.55?

    The write_packed function in USBHost_t36/midi.cpp changed after 1.8.13+TD...
  50. Just a (very long) shot from the hip: remove the...

    Just a (very long) shot from the hip: remove the #pragma and recompile on 1.8.19 Teensyduino 1.56 and try it. Then set the IDE to Tools|Optimize|Smallest Code and try again. Is there any difference?...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4