Sadly a symbolic name has never been assigned to these internal ADC channels. For T3.5/3.6, use analogRead(71)
hardware/teensy/avr/cores/teensy3/analog.c
The examples for the Audio tutorials should be in the IDE via
File > Examples > Audio > Tutorials > ...
They are installed when Teensyduino is installed
The "Forum Rule" requests you provide complete source code & details to reproduce any issue. You have only provided pieces of your sketch. What Teensy are you using? What IDE version? What OS?
Since file names...
Sketch in post #2 with buf seems to work with optimization Fast up to iteration 175, but hangs immediately for Faster or Fastest
Works with 51844 works up to 175 iterations -- hangs even with Fast
(sprintf() doesn't...
You need a pullup to 3.3v on the 32k pin. I have an old DS3231 laying around (chronodot http://www.adafruit.com/products/255). With scope I verified I was getting 32khz spike on the 32K pin (25% duty), and also ran a...
I was messing with PDB and DAC buffer and revisited this old thread and thought I'd note some corrections to the sketches posted.
To be more flexible, get rid of BUS_CLOCK define and correct the PDB0_MOD...
The default Teensy SPI library will do what you want and is optimized for Teensy 3*
#include <SPI.h>
#define CS 10
void setup() {
pinMode(CS, OUTPUT);
SPI.begin();
}
void loop() {
...
The T3.5/3.6 hardware float requires float's be word-aligned.
see https://forum.pjrc.com/threads/49442-Teensy-3-5-FlightSim-Float-problem
EDIT: well, maybe unaligned is ok. I just ran a test on T3.6 with...
Can you attach a photo of your setup. your narrative says you power nRF from batteries but also says you are using a 3.3V regulator?
when teensy is powered from 5v power supply (no USB cable), what is voltage on...
As KurtE notes, the device ID for teensy in 49-teensy.rules should be 16c0, which matches the ID when you hold the program button. You should not need to edit 49-teensy.rules. If your sketch does not use...
I don't think your arguments about the pin toggle apply in this case. (edit: actually, see below, I understand your argument now) The audio data in the sketch only takes about 30 ms (consists of 11 samples). Then after...
If i trigger scope on digital pin toggle before sound1.play(), I do see a variation/progression in when the audio signal starts from 3.7 to 6.3 ms after the toggle. Variations in delay 4.4, 4.6, 5.1, 5.7 ms. I'm not...
Your example code doesn't compile because of blank in hex constants in AudioSampleMetronome. Perhaps an artifact of your cut and paste? You can use the CODE tags (#) to preserve indentation of your sketch.
Removing...
Is your I2C OLED on a breakout board with pullup resistors for SCL SDA ? if not, for Teensy 3* you need to add external pullup resistors to 3v3 on both SCL and SDA
You'll have to modify the Audio library to use DAC1 for AudioOutputAnalog in place of DAC0 in
hardware/teensy/avr/libraries/Audio/output_dac.cpp
Good Luck
if you need stereo output through DAC0 and DAC1, i don't think you can do analogRead() on A22 or A21. It might work with mono output (DAC0) and using A22 rather than A21 for analogRead(). For mono change...
So we don't have to guess what your sketch is doing, obey the forum rule above:
Forum Rule: Always post complete source code & details to reproduce any issue!
The audio lib is probably configuring both DAC pins for...
This works for me on T3.6
void setup() {
analogReadResolution(12);
analogWriteResolution(12);
}
void loop() {
for (int i = 0; i < 4095; i += 64) {
analogWrite(A22, i);
delayMicroseconds(3); //...
spi4teensy3.h is a user contributed SPI library for Teensy 3. The default SPI.h library when building for a Teensy is a teensy version different from the original Arduino/AVR SPI library. spi4teensy3.h might provide...
I have used the Adafruit WINC1500 breakout board https://www.adafruit.com/product/2999
That link has lots of information on how to wire the breakout board and install the library...
In the terminal window, if you are in the same folder as the teensytransfer executable, you need to type ./teensytransfer -l
otherwise you need to specify the full path to the folder where the teenystransfer...
The sketch is just a proof of concept. The sine_fill is just used to put some "arbitrary data" into the raw_data buffer (more than a few sample-size chunks of data) so that with a scope you can see that signal is...
see https://forum.pjrc.com/threads/45214-Fast-streaming-USB-data-through-Teensy-DAC?p=171533&viewfull=1#post171533
Uses DAC DMA half-done and done interrupts to dynamically update DMA buffers like teensy audio library...
Works for me. I built your sketch on IDE 1.8.4 on Teensy ++ 2 selecting Tools>USB type: keyboard + ....
characters appear in IDE edit window or whatever active terminal window i select (Ubuntu). Also plugged the...
i2c_t3 does have a DMA mode (I2C_OP_MODE_DMA) and non-blocking Wire.sendTransmission(), so you can do other things before checking done() or callback.
Read the documentation at https://github.com/nox771/i2c_t3
The forum rule (at the top) says
Always post complete source code & details to reproduce any issue!
so we can't tell if you did pinMode(26,INPUT);
you have to set pinMode() before reading/writing digital pin...
1. you have set the ADC to 8-bit, but your buffer1 is int16_t -- try setting that to int8_t.
2. your Serial.write() is trying to write uint8_t, so it will write one byte of the 16-bit buffer1 (high order byte will...
FWIW, here is a simple DAC DMA buffer ping-pong example (PDB@44.1khz, no FIFO) based on Teensy audio library (hardware/teensy/avr/libraries/Audio/output_dac.cpp) : ...
I couldn't figure out how you could get a 200khz sine from a 480 sample sinetable in the hackaday sketch ... then I saw the * 20.0 * in the sinetable calculation loop, so a sine period is only made up of 24 samples. ...
I thought i'd use your sketch to revisit DAC settle time on Teensy 3. See earlier thread https://forum.pjrc.com/threads/26036-Fastest-DAC-speed-possible-for-Teensy-3-1-using-Arduino
Changing your sinetable to a...
Use CODE tags (#) to retain indentation when you post your sketch to the forum. Can you attach a photo of your wiring. You need 4.7K pullups to 3v3 on pins 18 and 19 as shown in post #7. The SHT20 should be powered...
a Teensy hearing aid thread: https://forum.pjrc.com/threads/40115-Teensy-Hearing-Aid
and https://forum.pjrc.com/threads/42665-New-Audio-Board!-TI-TLV320AIC3206...
there was discussion here https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format
but I haven't confirmed it works ...
someone tried:...
See forum rule above:
Forum Rule: Always post complete source code & details to reproduce any issue!
Are you using this library ? https://github.com/br3ttb/Arduino-PID-Library
it doesn't look like compute() has...
I did this once and it's not pretty. Given your lib libtst.a
cp libtst.a arduino-1.8.4/hardware/tools/arm/arm-none-eabi/lib/
edit hardware/teensy/avr/boards.txt for each architecture
...
Your sketch works for me on T3.2 with audio shield and using audio-shield microSD.
maybe attach a photo of your setup. bad soldering of headers? are your headphones plugged all the way in?
Only a limited number built, here is PCB and parts list
https://www.oshpark.com/shared_projects/Y2JckjhM
Various beta test results at https://forum.pjrc.com/threads/34808-K66-Beta-Test?p=109161&viewfull=1#post109161
To get an AC signal from your DAC, you'll need a blocking capacitor to get rid of the DC component and you'll get +/- signal.
See https://forum.pjrc.com/threads/28581-Connecting-a-Speaker-to-Teensy-3-1-DAC-A14
if you...
I get no compile errors using tweetncal* from https://github.com/rjw245/crypto-in-a-box
I'm using IDE 1.8.4/1.40
EDIT: you get a compile error if the declaration is in a .ino or .cpp filea (g++). but it's OK in...
yep, the state machine to manage the binary data exchange over the serial port for testing adds complexity, but the nacl stuff is in state_encrypt.cpp and state_decrypt.cpp with the function crypto_secretbox() using the...
fyi, here's a version https://github.com/rjw245/crypto-in-a-box
that worked for me on T3.2 (tested with included python scripts)
tweetnacl.h and .c have pragma's to handle C++
some TLS discussions at https://forum.pjrc.com/threads/29056-TLS-library-(for-secure-https)
T3.5/3.6 has hardware crypto acceleration, but i don't know of anyone that has incorporated it into a library...