Search results

  1. el_supremo

    SdFat lib inhibits LED_BUILTIN in SPI mode? (Micromod)

    I haven't used a micromod but it appears to use the same pinouts as the T4.0 and T4.1. The SD SCK signal is on Teensy pin 13. This is the same pin as that used for the LED. So, if you are using the SD, you can't use pin 13 for the LED output. You'll have to work around it by connecting a LED and...
  2. el_supremo

    problem with 4.0

    Ooooops. I thought it was a typo or something. Pete
  3. el_supremo

    problem with 4.0

    Change AudioPlaySdWavX to AudioPlaySdWav Pete
  4. el_supremo

    DS1820 rod sensor

    I believe you will also need a 4.7k pullup resistor from the signal pin to 3v3. You can test your setup by running the Examples/OneWire/DS18x20_Temperature sketch. The code defaults to pin 10 but it is trivial to change this. Here's output from running this code using a Teensy2.0 which has 6...
  5. el_supremo

    playSdWav1.stop (on btn1) doesn't work - what do I wrong?!

    This is a modified version of the Part_1_05_Do_More_While_Playing audio tutorial example. button0 stops the current file and plays the next one button1 is a toggle which pauses the current file or resumes playing it button2 stops the current file and plays the previous one Pete //...
  6. el_supremo

    Teensy 4.0 Audio Shield Not Enabling

    Before you enable the audio, allocate some memory: AudioMemory(8); The message "Unplug the accessory using too much power" suggests that there's a problem with your soldering somewhere. Can you post a clear photo of your audioboard? Pete
  7. el_supremo

    SD Card generate filename from date

    It will also include the underscore characters. 2024_05_16.csv Pete
  8. el_supremo

    Windows help wanted - trying PJRC's new code signing cert

    hello3 downloaded and executed with no problems, same as previous one.
  9. el_supremo

    Windows help wanted - trying PJRC's new code signing cert

    Windows 10 Pro and Kaspersky Anti-virus. No problem with download and execution in Powershell. Pete
  10. el_supremo

    Teensy 4.1 MIDI circuit Help

    Two things I'd check - does pin 6 of the H11L1 have 3.3V? - the jumper which connects to the Teensy Pin 0 would have to be laying flat under the audio board. Have you bent the jumper pin at a right angle so that it will make proper contact with the breadboard pin? Pete
  11. el_supremo

    What I'm doing wrong (Multiply & AnalyzePeak)

    You've set the dc1 amplitude to zero, so printing the dc1 peak will be zero and multiplying zero by anything will give you zero out from the multiplication too. At least, that's what I get when I run your code. Try setting dc1 amplitude to 0.5 and then it will print: in=0.50 out=0.25 Pete
  12. el_supremo

    Create an image as an array of pixels, and save as BMP file

    This writes a BMP that is read without complaint by Paint Shop Pro. // https://forum.pjrc.com/index.php?threads/create-an-image-as-an-array-of-pixels-and-save-as-bmp-file.74006/post-334757 /* a test script to generate an image, dump it to serial and save / open from SD. script will...
  13. el_supremo

    Create an image as an array of pixels, and save as BMP file

    I think this is part of the problem: dibHeader.width = 128;//width; dibHeader.height = 48;//height; The header you've written says that the image is 128x48 but what you actually write is what is defined here: #define IMAGE_HEIGHT 3 //48 #define IMAGE_WIDTH 5 //128 You need to make sure...
  14. el_supremo

    Create an image as an array of pixels, and save as BMP file

    Got them, thanks. I'll look at them tomorrow. Pete
  15. el_supremo

    Create an image as an array of pixels, and save as BMP file

    Can you post one of the BMP files? You'll probably have to store it in a ZIP archive. I don't think the forum will allow you to upload a BMP. Pete
  16. el_supremo

    Teensy synth project - a few issues

    The Arduino docs for the map function say it is implemented like this: long map(long x, long in_min, long in_max, long out_min, long out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; } You could define your own map_float function by replacing all occurrences...
  17. el_supremo

    Teensy synth project - a few issues

    float lfoAmplitudeMapped = map(lfoAmount, 0, 1023, 0, 1); The map function only uses integers and returns an integer so the only possible values that this can return are zero or one. Similarly, in this one float lfoSpeedMapped = map(lfoSpeed, 0, 1023, .4, 40); the map function will see the...
  18. el_supremo

    Guitar Distortion pedal with Teensy audio

    The Arduino code was written for a 12-bit ADC which provided unsigned numbers in the range from zero to 4095. Subtracting 2048 from these brings the numbers into the range -2048 to +2047. The Teensy audio blocks have signed 16-bit numbers which will be in the range -32768 to +32767. Therefore...
  19. el_supremo

    midi tune select problem

    I'm probably too late, but I've finally been able to have a look at the midi code. As far as I can tell, the code in usb_midi.h explicitly tests for and sends the Tune Select message. However, the code in MIDI.hpp (in directory ...\hardware\teensy\avr\libraries\MIDI\src) which handles serial...
  20. el_supremo

    What means ADC0_RA

    The comment in the code about "f_CPU = 96 MHz" suggests that it was written for the Teensy 3.x series. The T4.1 probably doesn't have a ADC0_RA register. Pete
  21. el_supremo

    midi tune select problem

    Which Teensy are you using? Post your code. Pete
  22. el_supremo

    Reading image from sd card

    I've massaged your code so that it can read a PGM header file. I could only test with an example PGM that was way too big to fit in a teensy, so I can't guarantee that it'll read the image itself correctly. // Read a PBM image from Teensy 4.1 built-in SDcard #include <SD.h> typedef struct...
  23. el_supremo

    Need help saving serial data to SD card

    char file_name[13]; You are printing 15 characters into the filename. The array should be at least 16 chars long to hold the NULL as well. Pete
  24. el_supremo

    Arduino/Teensy IDE Crashes Constantly - Java heap errors

    Many years ago, I had a Java crash whenever I opened a fairly large project and tracked it down to an unterminated comment. Maybe that's now been fixed but keep it in mind if all else fails ;) Pete
  25. el_supremo

    Teensy 4.1: from MIDI to Serial + MIDI

    Hi Kenneth. Yes, it's Hauptwerk V4 (I can't justify upgrading to V7 since I play badly and infrequently). I only use two buttons on the T3.6 and I wrote my own software sequencer since I don't have a pedal board. I haven't tried to get the PC time on a Teensy. If I need an accurate time, I...
  26. el_supremo

    Teensy 4.1: from MIDI to Serial + MIDI

    I use a T3.6 for the MIDI interface between two keyboards and VPO. I added code to print some info periodically to the serial monitor and compiled it with "Serial+MIDI". The output doesn't interfere with the VPO. Pete
  27. el_supremo

    How to implement edge response function without interruption

    This sequence of code will wait for the rising edge on pin 8. // If the pin is already HIGH if(digitalRead(8)) { // wait for it to go lOW while(digitalRead(8) == 1); } // The pin is now LOW, wait for it to go HIGH while(digitalRead(8) == 0); // The pin has just gone HIGH...
  28. el_supremo

    Issues using Micro-ROS's precompiled libraries with Arduino and Teensy

    This suggests that you haven't selected a Teensy 3.2 as the target board. Pete
  29. el_supremo

    Library Problems?

    You meed to instantiate MIDI. Add this line after the includes: MIDI_CREATE_DEFAULT_INSTANCE(); Pete
  30. el_supremo

    NEED HELP!!! wedding audio book

    Exactly which software did you download and where did you put it? Pete
  31. el_supremo

    SRXL2 bi-directional serial loses connection due to long code

    Each time you call the SRXL2 function it only reads one available Serial character. You can improve its response by changing this statement: if (srxl2port.available()) { to this: while (srxl2port.available() > 0) { You would still have to call SRXL2() between each function that takes a long...
  32. el_supremo

    SRXL2 bi-directional serial loses connection due to long code

    You have to arrange your code so that the SRXL2() function is called frequently enough that it doesn't miss characters or timeout. In loop() try: SRXL2(); //Do Something that takes a long time FRONTSERVO.writeMicroseconds(FRONTpwm[Result]); SRXL2()...
  33. el_supremo

    SRXL2 bi-directional serial loses connection due to long code

    How are you compiling that code for a Teensy 4.0? Are you using the Arduino IDE? If so, you must have modified that code to compile for the Teensy, in which case I'd like to see your modified code. Pete
  34. el_supremo

    SRXL2 bi-directional serial loses connection due to long code

    Can you post your Teensy code? It may be your implementation of SRXL2 on the Teensy which is causing the problem. Pete
  35. el_supremo

    Teensy 4.1 with Audio Adaptor only noise when recoding but playback is working

    The 3.5mm jack is a headphone output only. Pete
  36. el_supremo

    Detecting Axles using a Teensy 4.1

    You could try something like the sensor strips that cities put on roads to measure the volume of traffic. I presume what they do is the weight of the wheel momentarily closes a circuit consisting of two wires in what amounts to a rubber hose. If that can be done it's a simple matter of hooking...
  37. el_supremo

    Error compiling for board Teensy 4.0

    Can you try a fresh install of Arduino 1.8.19 and the latest TD? Pete
  38. el_supremo

    Increasing buffer size for Teensy 4.1

    What are Serial6 and Serial7 sending to? Each other (in a loop), another T4.1, a PC, ? Pete
  39. el_supremo

    Error compiling for board Teensy 4.0

    AudioPlaySdWav' playWav1; // Play 44.1kHz 16-bit PCM greeting WAV file There should not be a single quote in that statement. If there are any other errors, post all your code (in code tags please). Pete
  40. el_supremo

    Decrementing minute messes up the hour

    It is expecting you to pass a valid date and time . If you want to do arithmetic on the date, you have to do it yourself and make sure that the result is valid before passing it to settime. The best way to do this is to first convert the (valid) starting date/time to a time_t value using the...
  41. el_supremo

    Decrementing minute messes up the hour

    AHA. settime stores its arguments in a tmElements_t structure and then calls maketime() to convert that structure to a time_t (number of seconds). BUT, all the elements of a tmElements_t structure are declared to be uint8_t which means that the -1 you passed as the minutes is convert to +255...
  42. el_supremo

    Decrementing minute messes up the hour

    The problem is, as you say, caused when the value of minute() is zero and you therefore pass minus one as the value for the minute. I haven't figured out yet why that blows up the time library. Pete
  43. el_supremo

    Using ChatGPT / OpenAI for Arduino help

    The answer to the first question is spot on and the solution to the second one is trivial, given the answer to the first. But then it loses the plot at the third question. It reverts to planar geometry to solve the third and remaining questions. The answer to the last question (true north...
  44. el_supremo

    Using ChatGPT / OpenAI for Arduino help

    Thanks for doing it :) Can you post a text version of the C code? I don't think it is right, but I don't know Python that well. Pete
  45. el_supremo

    Using ChatGPT / OpenAI for Arduino help

    It's actually a multi-part thing that builds up to the big one. I'll have to type it up and I'll PM it. If anything interesting comes of it, you can post the results :) Pete
  46. el_supremo

    Using ChatGPT / OpenAI for Arduino help

    I have a problem I'm trying to solve and thought it would be neat to see if it could even get close to an answer. But I don't need to know that badly. Pete
  47. el_supremo

    Using ChatGPT / OpenAI for Arduino help

    I was going to try it but in order to register they want name, email address (OKish, so far) and phone number (NOPE). They don't need my phone number. Pete
  48. el_supremo

    3.6 ask to report bug

    Your code compiled for me when I set the USB type to "Serial + MIDI + Audio". Sketch uses 116360 bytes (11%) of program storage space. Maximum is 1048576 bytes. Global variables use 175476 bytes (66%) of dynamic memory, leaving 86668 bytes for local variables. Maximum is 262144 bytes. You...
  49. el_supremo

    VL53L4CX time of flight sensor issue

    Have you run an I2C scanner to verify that the device is being detected on address 0x29? Pete
  50. el_supremo

    Won't create 512th file first time

    Hmmm. The only thing I can think of is that it's something to do with the SD file system not liking 512 files in a directory, but AFAIK it can take a lot more than that as long as they aren't in the root directory. Pete
Back
Top