Code Monkey home page Code Monkey logo

Comments (10)

sensorium avatar sensorium commented on July 23, 2024

from mozzi.

bptremblay avatar bptremblay commented on July 23, 2024

I would like to use Mozzi with the LC but the include for teensy does not seem to be aware of LC, which is the only M0 teensy. Compilation errors suggest that it thinks it's a Teensy 2 family board:

In file included from /Users/btremblay/Documents/Arduino/libraries/Mozzi/MozziGuts.h:193:0,
from /Users/btremblay/Sinewave/Sinewave.ino:19:
/Users/btremblay/Documents/Arduino/libraries/Mozzi/AudioConfigTeensy3_12bit.h:4:2: warning: #warning If you get a compilation error you should probably update Teensyduino to its latest version [-Wcpp]
#warning If you get a compilation error you should probably update Teensyduino to its latest version
^
In file included from /Users/btremblay/Documents/Arduino/libraries/Mozzi/MozziGuts.h:193:0,
from /Users/btremblay/Documents/Arduino/libraries/Mozzi/MozziGuts.cpp:15:
/Users/btremblay/Documents/Arduino/libraries/Mozzi/AudioConfigTeensy3_12bit.h:4:2: warning: #warning If you get a compilation error you should probably update Teensyduino to its latest version [-Wcpp]
#warning If you get a compilation error you should probably update Teensyduino to its latest version
^
/Users/btremblay/Documents/Arduino/libraries/Mozzi/mozzi_rand.cpp:148:2: warning: #warning Automatic random seeding not implemented on this platform [-Wcpp]
#warning Automatic random seeding not implemented on this platform
^
/Users/btremblay/Library/Arduino15/packages/teensy/hardware/avr/1.57.1/libraries/ADC/AnalogBufferDMA.cpp: In member function 'void AnalogBufferDMA::init(ADC*, int8_t)':
/Users/btremblay/Library/Arduino15/packages/teensy/hardware/avr/1.57.1/libraries/ADC/AnalogBufferDMA.cpp:175:26: error: call to 'ADC::enableDMA' declared with attribute error: Use adc->adcX->enableDMA instead
adc->enableDMA(adc_num);
^

exit status 1

Compilation error: exit status 1

from mozzi.

tomcombriat avatar tomcombriat commented on July 23, 2024

Hi,
Normally the LC does work straight with Mozzi (see #138), tested by me and working at least if you do not use I2C.

In your error message:

warning If you get a compilation error you should probably update Teensyduino to its latest version

Are both Arduino and Teensyduino are up-to-date? I had error similar when making the port with the old version of Teensyduino.

from mozzi.

bptremblay avatar bptremblay commented on July 23, 2024

I can compile if I set my board to Teensy 3.x or Teensy 4.x, but not LC.
I'm using the latest Mozzi and the latest Teensyduino. I have removed all my exotic board libraries like stm32.
I think the hardware_defines.h is making Teensy LC as AVR.

from mozzi.

tomcombriat avatar tomcombriat commented on July 23, 2024

This is weird, I'll test on my setup this evening. Thanks for the feedback!

from mozzi.

tomcombriat avatar tomcombriat commented on July 23, 2024

Just tested. I worked with the previous version of Teensyduino, but, after updating, I get the same error.
Actually, the error is in the ADC library of Teensyduino (or more precisely, the ADC library embedded in Teensyduino), because the following sketch:

#include <ADC.h> void setup() {} void loop() {}

Does not compile…

There is actually an (old!) PR pending on this issue: pedvide/ADC#81
A quick fix, for you, would be to apply the patch proposed in the PR to your library. I put a comment there, hopefully this will be fixed in the teensyduino library.

Will close this old issue soon as the source of the error is not Mozzi…

Hope it helps,

from mozzi.

bptremblay avatar bptremblay commented on July 23, 2024

@tomcombriat Thanks for taking time for this!
Do I need to ping pjrc to get the adc library working?

from mozzi.

bptremblay avatar bptremblay commented on July 23, 2024

(meanwhile I will use some other boards)

from mozzi.

tomcombriat avatar tomcombriat commented on July 23, 2024

@bptremblay If you have the time I would be grateful. I commented on the ADC library but I am not sure a lot happens there. Probably pjrc has their own fork anyway.

Closing this as the issue is not related to Mozzi.

from mozzi.

tomcombriat avatar tomcombriat commented on July 23, 2024

Note:
The ADC lib has been updated. Hopefully, this will get through pjrc next version. pedvide/ADC#81

from mozzi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.