Comments (14)
Should be fixed now in version 1.8.2 of the library. Found some unrelated problems in the playTone() function while I was in there, this should take care of that as well.
from adafruit_circuitplayground.
hmm can you try the Talkie library direct? you'll need to install it and run the demos but it ought to work?
https://github.com/adafruit/Talkie
from adafruit_circuitplayground.
On playground classic (AVR mega32u4), circuit playground speech examples are just noise with Arduino 1.8.4 and 1.8.5, with the latest github version 1.8. I reverted to Arduino 1.8.1 and examples worked.
from adafruit_circuitplayground.
Thank you, guys! with the Arduino version 1.8.0 all working fine. Talkie too.
from adafruit_circuitplayground.
I thought the problem was with the compilers for Arduino IDE 1.8.4 and 1.8.5, but further testing shows that Arduino 1.8.4 speech examples work if I use version 1.6.4 of CircuitPlayground library. The speech is noise with library version 1.6.8 and 1.8.0. Arduino 1.8.4 ships with lib 1.6.8. Arduino 1.8.1 ships with lib 1.6.4
from adafruit_circuitplayground.
strange, I got Arduino 1.8.1 and CircuitPlayground library 1.8.0 and that seems to work OK. Development platform is OSX.
from adafruit_circuitplayground.
Nope, not for me with Ubuntu. I had to remove the arduino 1.8.1 version of circuitplayground library for sketch to use my sketchbook/llibrary version (1.8.0). speech examples are noise with arduino 1.8.1 and lib 1.8.0. (are you sure IDE is using lib 1.8.0 and not builtin 1.6.4?)
from adafruit_circuitplayground.
no, not sure. But 1.8.0 is what I see in the Library Manager as being installed. How else can one check?
from adafruit_circuitplayground.
you'll need to remove/mv the IDE version of the CircuitPlayground library (and restart IDE). you might look around to see if other copies are lurking.
from adafruit_circuitplayground.
ok, I think I will leave it the way it is. Don't touch the running system :-) thanks for tips and solving this.
from adafruit_circuitplayground.
ladyada, I think the problem with broken speech examples in 1.8.0 lib is in utility/Adafruit_CPlay_Speaker.cpp in the begin() method. lib 1.6.4
has
void Adafruit_CPlay_Speaker::begin(void) {
// Set up Timer4 for fast PWM on !OC4A
PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
TCCR4B = _BV(PWM4X) |_BV(CS40); // PWM invert, 1:1 prescale
TCCR4D = 0; // Fast PWM mode
TCCR4E = 0; // Not enhanced mode
TC4H = 0; // Not 10-bit mode
DT4 = 0; // No dead time
OCR4C = 255; // TOP
OCR4A = 127; // 50% duty (idle position) to start
started = true;
pinMode(5, OUTPUT); // Enable output
}
but lib 1.8.0 only has pinMode(). Adding the additional code to 1.8.0 begin allowed speech examples to work.
from adafruit_circuitplayground.
could be!! @PaintYourDragon wanna take a look?
from adafruit_circuitplayground.
It may take a little more work and regression testing, because i noticed that the beep/tones of demo example no longer work with Speaker::begin() mods above. All work with lib 1.6.4
Actually, the snippet of code above does appear in lib 1.8.0 in playSound() in Adafruit_CPlay_Speaker.cpp, conditional on started ....
from adafruit_circuitplayground.
Latest attempt at patching lib 1.8.0. Rather than pasting PLLFRQ stuff in CPlay_Speaker::begin(), I added it into say() in talkie.cpp as below
if(!started) {
begin();
#ifdef __AVR__
// Set up Timer4 for fast PWM on !OC4A
PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
TCCR4B = _BV(PWM4X) |_BV(CS40); // PWM invert, 1:1 prescale
TCCR4D = 0; // Fast PWM mode
TCCR4E = 0; // Not enhanced mode
TC4H = 0; // Not 10-bit mode
DT4 = 0; // No dead time
OCR4C = 255; // TOP
OCR4A = 127; // 50% duty (idle position) to start
started = true;
#endif
}
speech examples play and tone/beep still works in demo
from adafruit_circuitplayground.
Related Issues (20)
- C:\Users\Dr.Zahid\Documents\Arduino\libraries\Adafruit_Circuit_Playground\utility\Adafruit_CPlay_Mic.cpp: In member function 'void Adafruit_CPlay_Mic::capture(int16_t*, uint16_t)': C:\Users\Dr.Zahid\Documents\Arduino\libraries\Adafruit_Circuit_Playground\utility\Adafruit_CPlay_Mic.cpp:68:37: error: 'analogPinToChannel' was not declared in this scope channel = analogPinToChannel(4); // Pin A4 to ADC channel ^ exit status 1 Error compiling for board Arduino Nano. HOT 2
- bug in Adafruit_CPlay_Speaker::set() HOT 5
- Memory allocation error on CPX HOT 2
- Adafruit_SleepyDog.h not found when compiling megademo example. HOT 5
- External neo pixel using pin A1 doesn’t work
- CircuitPlayground.readCap() breaks Adafruit_NeoPixel_ZeroDMA on CPX HOT 7
- redLed() no longer working for CPC HOT 6
- Speaker on/off broken on CPX HOT 4
- Preprocessor mismatch for CPX HOT 2
- Arduino Updater is always showing 1.86 New Version available HOT 11
- Capacitive touch not working on Bluefruit Playground HOT 2
- Add example for using external NeoPixels HOT 2
- CircuitPlayground.readCap() breaks analogRead HOT 2
- Package discription is no longer accurate. HOT 3
- No implementation for sendRAW HOT 1
- Cap Touch samples not being used with FreeTouch HOT 1
- Bluefruit CP - cap touch sound demo does not seem to work when pushing the sensors, though it will play the series of tones.
- How to write CP_Boards.h for Raspberry Pi Pico?
- The readings for the motionX and motionY variables are flipped in direction.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_circuitplayground.