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

Search:

Type: Posts; User: Benoit92

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    127
    Views
    14,915

    Thanks, I try to have the same hardware for...

    Thanks,
    I try to have the same hardware for different types of engine (Diesel, Steam, Electric).
    Moreover, I need to generate special sounds (horn, bell, coupling, brake, . . . ).

    I tried to use...
  2. Replies
    127
    Views
    14,915

    Hi, I try now to mix in "one" code on Teensy 3.2...

    Hi,
    I try now to mix in "one" code on Teensy 3.2 the following functions :
    1) DCC frame decoding function + engine commands+ Leds commands (works well separatly)
    2) Sound function (works well...
  3. Replies
    127
    Views
    14,915

    Ok, Thanks. I will define 2 functions :...

    Ok, Thanks.
    I will define 2 functions : PlayFile1 and PlayFile2.
    And I will use for instance this type of mechanism :

    Setup

    mixer1 (0, 0.5)
    mixer1 (1, 0.5)
    void PlayFile1()
    void PlayFile2()
  4. Replies
    127
    Views
    14,915

    Hi, my "simply" code goes well. Now, I would...

    Hi, my "simply" code goes well.
    Now, I would like to mix two sounds together.
    Here is my "simply"code but without using "mixer".


    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>...
  5. Replies
    127
    Views
    14,915

    In short : You cancelled the "println" and...

    In short :
    You cancelled the "println" and "Serial.read" in order to avoid percussion between flux coming from Python script and flux coming from serial monitor.

    I tried to load 4,9 Mo, but it...
  6. Replies
    127
    Views
    14,915

    I apologize because : Ko = Kilo octets = Kilo...

    I apologize because :
    Ko = Kilo octets = Kilo bytes
    So, W25Q64 = 64 Kilobits = 8 Kilobytes

    I try :

    ser = serial.Serial(sys.argv[1], 9600, timeout=0, writeTimeout=None)
    But no effect !
    This...
  7. Replies
    127
    Views
    14,915

    I use a windows10 + laptop (ASUS 550). I...

    I use a windows10 + laptop (ASUS 550).
    I followed your procedure and your codes (CopyFromSerialMC and rawfile-uploader-mc.py).
    It works well except for files over 4000 Ko (???) (about 45 seconds...
  8. Replies
    127
    Views
    14,915

    1) I tried to load some soundfiles together :...

    1) I tried to load some soundfiles together : 3758 Ko + 2441 Ko + 248 Ko ---> It works
    But when I want to load just a soundfile over 4000 Ko ---> It doesn't work ?

    2) When I try to load only a...
  9. Replies
    127
    Views
    14,915

    I think that the soundfiles was not correctly...

    I think that the soundfiles was not correctly loaded in Flash memory.
    But now, with your code modification, the sounfile is well loaded and the DAC works correctly?

    I tried to upload to SPI Flash...
  10. Replies
    127
    Views
    14,915

    I tried on with CopyFromSerialMC and...

    I tried on with CopyFromSerialMC and rawfile-uploader-mc.py.
    It works very well with "WHISTM1.TRW".
    Now, I will try to manage and to mix some soundfiles.
    Thank you very much.
    :)
  11. Replies
    127
    Views
    14,915

    Have you a mean to read the data (byte) which...

    Have you a mean to read the data (byte) which are in the SPI Flash ?
    Thanks.
  12. Replies
    127
    Views
    14,915

    In order to know when starting Python script (and...

    In order to know when starting Python script (and when it's too late), I propose to put the LED solid during this time.

    ...............
    digitalWrite(13, HIGH);// Start Python script...
  13. Replies
    127
    Views
    14,915

    This is this version : /* SerialFlash Library -...

    This is this version :
    /* SerialFlash Library - for filesystem-like access to SPI Serial Flash memory
    * https://github.com/PaulStoffregen/SerialFlash
    * Copyright (C) 2015, Paul Stoffregen,...
  14. Replies
    127
    Views
    14,915

    Result on monitor : Playing file: 1 14852...

    Result on monitor :
    Playing file: 1
    14852
    32768
    Playing file: 1
    14852
    32768
    Playing file: 1
    14852
    32768
  15. Replies
    127
    Views
    14,915

    I tried on many soundfiles : yours and mine. I...

    I tried on many soundfiles : yours and mine.
    I loaded them in SPI Flash (check with ReadBenchmark)
    But I get no sound even with your files.
    1) I wonder if there is an error in the code ?
    2) how...
  16. Replies
    127
    Views
    14,915

    I am using your file : "WHISTM1.TRW" This file...

    I am using your file : "WHISTM1.TRW"
    This file is in SPI Flash :
    ReadBenchmark -->

    All Files on SPI Flash chip:
    WHISTM1.TRW = 14852 bytes
    Read in = 7811
    usbegin = 2233148
    usend = 2240959...
  17. Replies
    127
    Views
    14,915

    I checked that my soundfile is in SPI Flash...

    I checked that my soundfile is in SPI Flash (ReadBenchmark).
    But, with my sketch, I get only a very weak signal and it's not my soundfile (it's just a very weak tone).
    It seems that Dac1 is opened...
  18. Replies
    127
    Views
    14,915

    There are two kinds of soundfiles to play: Type...

    There are two kinds of soundfiles to play:
    Type 1)
    Basic soundfiles related to the engine (steam, electric or diesel) which depends on the speed (stop, start -> full speed), but also on the...
  19. Replies
    127
    Views
    14,915

    What is the best soundfile extension (easy to...

    What is the best soundfile extension (easy to manage in sketch, no glitch, no stop when reading soundfiles)
    to deal with Audio.h (for switching, for mixing, . . .) via Audio GUI tools ?

    1)...
  20. Replies
    127
    Views
    14,915

    Have you try on another PC? Because, we call...

    Have you try on another PC?
    Because, we call some Windows ressources and I am not sure of the compatibility with certain Python procedures.
    I thought that the PC USB (seen from Windows) link...
  21. Replies
    127
    Views
    14,915

    Yessssssssss, now, that works (without...

    Yessssssssss, now, that works (without "while(!Serial)").;)

    But why it doesn't work with "while(!Serial)"?:confused:
  22. Replies
    127
    Views
    14,915

    So, I don't understand why my sketch don't work....

    So, I don't understand why my sketch don't work.
    Is there a difference between a Teensy without audioshield and a Teensy with a disable audioshield ?

    I shall try on your solutions from your last...
  23. Replies
    127
    Views
    14,915

    Ok, this process seems to be very touchy. Can...

    Ok, this process seems to be very touchy.

    Can you send the soundfile from the SPI Flash to the DAC - A14 (without audioshield) ?
  24. Replies
    127
    Views
    14,915

    About CopyFromSerial, hereafter the comments : ...

    About CopyFromSerial, hereafter the comments :

    * This is example code to 1) format an SPI Flash chip, and 2) copy raw
    * audio files (mono channel, 16 bit signed, 44100Hz) to it using the
    *...
  25. Replies
    127
    Views
    14,915

    No, I don't get sound playing. It's a mystery ! ...

    No, I don't get sound playing. It's a mystery !

    Have test the dialog between Teensy and SPI Flash with "ReadBenchmark" (after launching "EraseEverything") ?
  26. Replies
    127
    Views
    14,915

    I installed Python2 (2.7), not Python 3. Don't...

    I installed Python2 (2.7), not Python 3.
    Don't forget to just unplug and replug between CopyFromSerial and C:\Python34>python "rawfile-uploader.py" "COM5" "LOCO201.RAW"

    COM1, COM5 ?
    It is the...
  27. Replies
    127
    Views
    14,915

    I installed Python2 (2.7), not Python 3. Don't...

    I installed Python2 (2.7), not Python 3.
    Don't forget to just unplug and replug between CopyFromSerial and C:\Python34>python "rawfile-uploader.py" "COM5" "LOCO201.RAW"

    COM1, COM5 ?
    It is the...
  28. Replies
    127
    Views
    14,915

    I have not use PIP. Manual installation INSTALL...

    I have not use PIP.
    Manual installation
    INSTALL PYSERIAL under WINDOWS
    1) Check that windows knows the path of the executable python /
    Open a command window (in "Accessories") and type "python"....
  29. Replies
    127
    Views
    14,915

    I work with Python 2.7 Have you install Pyserial...

    I work with Python 2.7
    Have you install Pyserial ?
  30. Replies
    127
    Views
    14,915

    About the Python script : 1) Launch...

    About the Python script :

    1) Launch CopyFromSerial (Which also erases SPI Flash)
    2) Wait for fix Led on Teensy 3.2
    3) Unplug USB
    :confused:
    4) Plug USB
    :confused:
    5) Launch Python script...
  31. Replies
    127
    Views
    14,915

    This sketch works : IntervalTimer myTimer; ...

    This sketch works :


    IntervalTimer myTimer;

    const int StandbyLokBR99[] PROGMEM = { // from EncodeAudio
    130, 134, 135, 131, 124, 121, 122, 125, 129, 131, 132, 133, 130, 123, 123, 128, 126,...
  32. Replies
    127
    Views
    14,915

    With "WHISTM1.TRW", the result on the monitor...

    With "WHISTM1.TRW", the result on the monitor terminal is :
    Playing file: 1
    14852
    32768
    Playing file: 1
    14852
    32768
    .......

    I have tried with both configurations
  33. Replies
    127
    Views
    14,915

    I have loaded "WHISTM1.TRW" from PC to SPI Flash...

    I have loaded "WHISTM1.TRW" from PC to SPI Flash with CopyFromSerial and the command : Python "rawfile-uploader.py" "COM4" "WHISTM1.TRW"(I have no SDCard reader)
    --> "WHISTM1.TRW" is in the SPI...
  34. Replies
    127
    Views
    14,915

    "I am a wee bit confused about the header...

    "I am a wee bit confused about the header info....50 4B 03 04 14 00 00 00 08 00....etc"
    You are right :I think I did a mistake because I read the zip file!!!

    I have encoded your file in "trw" but...
  35. Replies
    127
    Views
    14,915

    "The common header for your files seems to be :...

    "The common header for your files seems to be : 50 4B 03 04 14 00 00 00 08 00 ? " don't know what this is , what files is it in ??.
    50 4B 03 04 14 00 00 00 08 00 : This pattern is common at the...
  36. Replies
    127
    Views
    14,915

    The common header for your files seems to be : 50...

    The common header for your files seems to be : 50 4B 03 04 14 00 00 00 08 00 ?
    I don't know the header and end structure for TRW files.
    I thought that the filename was included in the header in...
  37. Replies
    127
    Views
    14,915

    In order to get a 16 bits file.trw, you have to...

    In order to get a 16 bits file.trw, you have to add parameter : wav2trw -16.
    see :https://forum.pjrc.com/threads/27409-Play-RAW-from-Serial-Flash.

    I have a PC Windows 10 and I use the wav2trw.exe...
  38. Replies
    127
    Views
    14,915

    Yes, it's my A2RBR99.TRW file (with a simplified...

    Yes, it's my A2RBR99.TRW file (with a simplified file system: the filename is described in the header?).
    You are right : the signal seems to be a square one. In another hand, it's not a symphony of...
  39. Replies
    127
    Views
    14,915

    Thanks for the example . 1) The raw file has the...

    Thanks for the example .
    1) The raw file has the following form (with a light header):
    "['(~)', 'A', 'R','2', 'B', 'R', '9', '9', '.', 'T', 'R', 'W', '|', '\\x00', '\\\\', '', '\\x04', '|', 125,...
  40. Replies
    127
    Views
    14,915

    Yes, It's a soundfile done with "wav2trw _16" ...

    Yes, It's a soundfile done with "wav2trw _16"

    I have already write a programm based on : analogwrite() + IntervalTimer (sample reading synchronization) + EncodeAudio.
    There is no problem, but the...
  41. Replies
    127
    Views
    14,915

    I have no Audio Adaptator (only a Teensy 3.2) I...

    I have no Audio Adaptator (only a Teensy 3.2)
    I just want to output the soundfile "AR2BR99.TRW" (loaded in SPI Flash which is connected directly on the Teensy)

    From :
    - the SPI Flash (Winbond...
  42. Replies
    127
    Views
    14,915

    I have the impression that it should not be...

    I have the impression that it should not be possible (without audio card) to output the sound from the SPI Flash directly to the Teensy DAC (pin A14) by using "playFlashRaw1.play(filename).

    On the...
  43. Replies
    127
    Views
    14,915

    Hi, My configuration is Teensy 3.2 + SPI Flash...

    Hi,
    My configuration is
    Teensy 3.2 + SPI Flash Winbond 25Q64BVSIG (without audioshield)
    Pins used are 11(DOUT),12(DIN),14(SCK),10(CS).
    AR2BR99.TRW has been loaded in the SPI Flash.
    I would like...
  44. Replies
    127
    Views
    14,915

    Hi, My configuration is Teensy 3.2 + SPI Flash...

    Hi,
    My configuration is
    Teensy 3.2 + SPI Flash Winbond 25Q64BVSIG (without audioshield)
    Pins used are 11(DOUT),12(DIN),14(SCK),10(CS).
    One File.trw has been loaded in the SPI Flash.

    In order...
  45. Replies
    127
    Views
    14,915

    Hi, Do you know if "Raw-uploader.py" goes with...

    Hi,
    Do you know if "Raw-uploader.py" goes with Python 2 ou Python 3?
    Thanks
  46. Replies
    127
    Views
    14,915

    Hi, I am trying to load rawsoundfile (AABR99.trw)...

    Hi, I am trying to load rawsoundfile (AABR99.trw) from PC (ASUS 550C - Windows10) to Spi Flash Memory (25Q64BVSIG) with a teensy 3.2.
    Memory <-> Teensy connection
    WP/IO2......................none...
  47. Replies
    127
    Views
    14,915

    Hello, I try to use only one teensy 3.2 with SPI...

    Hello,
    I try to use only one teensy 3.2 with SPI Flash 64 M to deal with all the functions (motor, lights and sound).
    1) But, I wonder what is the signification of "0xF8A00" in "const unsigned int...
  48. Replies
    127
    Views
    14,915

    Ok, Thanks. Attached, the complete library's...

    Ok, Thanks.
    Attached, the complete library's source NmraDcc from Github :
    https://github.com/mrrwa/NmraDcc
  49. Replies
    127
    Views
    14,915

    In the library NmraDcc on Github, there is the...

    In the library NmraDcc on Github, there is the following function in NmraDcc.cpp :


    NmraDcc::NmraDcc()
    {
    }

    void NmraDcc::pin( uint8_t ExtIntNum, uint8_t ExtIntPinNum, uint8_t EnablePullup)...
  50. Replies
    127
    Views
    14,915

    It's Ok to generate sound. I have now to...

    It's Ok to generate sound.
    I have now to integrate sound generation in the NmraDcc code which was developed for Arduino.
    In this case, Arduino uses Pin 2 (Int0) as external Interruption to receive...
Results 1 to 50 of 57
Page 1 of 2 1 2