Search results

  1. 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
  2. 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
  3. 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...
  4. 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...
  5. 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
  6. 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
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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
  12. el_supremo

    midi tune select problem

    Which Teensy are you using? Post your code. Pete
  13. 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...
  14. 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
  15. 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
  16. 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...
  17. 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
  18. 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...
  19. 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
  20. el_supremo

    Library Problems?

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

    NEED HELP!!! wedding audio book

    Exactly which software did you download and where did you put it? Pete
  22. 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...
  23. 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()...
  24. 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
  25. 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
  26. 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
  27. 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...
  28. 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
  29. 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
  30. 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
  31. 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...
  32. 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...
  33. 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
  34. 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...
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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...
  40. 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
  41. 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
  42. el_supremo

    Won't create 512th file first time

    String fname = "Pch" + String(k) + ".dat"; fname.toCharArray(filename, 13 + 4 + strlen(listOfSynthTypes[0])); snprintf(fullPathName, 23, "%s/%.2d/%s", listOfSynthTypes[0], bankNum, filename); // the .2 makes banks have leading zero and always use two characters 01 to 10...
  43. el_supremo

    Won't create 512th file first time

    patchFile.close(); patchFile.flush(); flush() should go before close() [edit] But I don't think it'll make any difference. I'm pretty sure that close() implicitly does a flush() anyway. Pete
  44. el_supremo

    Teensy 4.1 audio - short filename play reboots, only if played as the first file.

    I downloaded and converted that file to 44.1k. The WavFilePlayer example plays it without any problems when it is the first thing being played. My guess is that there's a bug in your code. Can you post it? Pete
  45. el_supremo

    Teensy LC IR Receive and Transmit

    I've just used the example in IRremote/ReceiveDemo with Teensyduino 1.57_b4 on a Teensy-LC. It works with a Sony remote. I'm using a Vishay TSOP variant of some sort - I forgot the exact part number but looks like this one. That example uses "IrReceiver.decode()" etc. Pete
  46. el_supremo

    FFT of Mic input results in all 0's

    I'm not familiar (nor competent) to advise about hooking up condenser mic to the audio board but the board was designed for connection of an electret mic. See MarkT's comment here. Pete
  47. el_supremo

    FFT of Mic input results in all 0's

    Sending the sine output to the fft would help debug things. Get that to produce good output from the FFT first. But your code in #5 should work with the mic. What kind of microphone are you using and post a photo of your audio board showing how the mic is connected. Pete
  48. el_supremo

    FFT of Mic input results in all 0's

    AudioConnection patchCord1(fft, adc1); This isn't right. You are trying to send the FFT to the ADC. You should be sending the audio to the FFT. Change patchcord2 to send the sine to the fft: AudioConnection patchCord2(sine1, 0, fft, 0); [EDIT] and remove patchCord1 Pete
  49. el_supremo

    FFT of Mic input results in all 0's

    You have to wait for there to be a result from the fft before reading it. The delay is probably going to cause trouble too. Put these two in setup() sine1.frequency(500); sine1.amplitude(0.95); and change the loop function to this: void loop(void) { if(fft.available() > 0) { for(int...
  50. el_supremo

    Missing the kinetics.h from Teensy 4.0/4.1

    I compiled that code for a T4.1 using Arduino 1.8.19 and Teensyduino 1.57_b4. There's an error because DataT is not declared. When I declare it as int, the code compiles - no complaint about missing kinetics.h Pete
Back
Top