Code Monkey home page Code Monkey logo

Comments (4)

sensorium avatar sensorium commented on July 4, 2024

Hi,
thanks, you are the first to report a test on Teensy 2.

I've tried pasting the code below into the utils.h file in the Mozzi folder, and now it compiles. But I don't have a Teensy 2 to test it properly.

If you have time to try it, I would be very interested to know how it goes, so it can be fixed or included in the next update of the library.

Probably the most sensible place to paste it is just before the analogRead stuff in utils.h.

// hack for Teensy 2 (32u4), pasted from hardware/arduino/variants/leonardo/pins_arduino.h
// AVR_ATmega32U4 has an unusual mapping of pins to channels
#if defined(AVR_ATmega32U4)
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
#endif

thanks,
tim

from mozzi.

Nanoblender avatar Nanoblender commented on July 4, 2024

Hi,
I pasted your code before "void setupFastAnalogRead();" and it compiles.
The teensy2 run the code and produce sounds. The library seems to works with Teensy2 : D
Thanks.

EDIT: I got another problem. I tested all the examples and the nĀ° 12_Samples doesn't compile,
_12_Samples.ino: In function 'void updateControl()':
_12_Samples:38: error: 'byteMod' was not declared in this scope

from mozzi.

Nanoblender avatar Nanoblender commented on July 4, 2024

Hi,
With the last update all work šŸ‘

from mozzi.

loopmasta avatar loopmasta commented on July 4, 2024

I am having the same problem but the fix above does not solve the problem.

Mozzi/mozzi_analog.cpp.o: In function adcStartConversion(unsigned char)': /Users/xxx/Documents/Arduino/libraries/Mozzi/mozzi_analog.cpp:115: undefined reference toanalog_pin_to_channel_PGM'

Where do i have to add the above fix to make it work?

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.