Are the yellow and green wires soldered on to the board at the right? It looks like they are jumper wires whose pins might just be pushed into the holes in the board.
Pete
Type: Posts; User: el_supremo
Are the yellow and green wires soldered on to the board at the right? It looks like they are jumper wires whose pins might just be pushed into the holes in the board.
Pete
Call handle_Messages from the loop() function and try increasing the heartbeatInterval_RX as I mentioned in #2. When the messages are occurring one every 250ms, there's no need for the receive...
I don't think this is correct - i.e. it is not interrupt driven. You have to arrange your code such that it calls handle_Messages more frequently than the heartbeat timeout, which is ten...
I would guess that runningLeds is calculating an invalid value for the index 'cled' into the ledfunctions array. This calculation:
int tled=st-ct;
float pled=tled/float(st);
boils down to...
Are you using the Rev D audio board?
Post a photo which clearly shows the audio board and T4.1 connected together.
The audio library works with T4.1
Pete
FYI: v2.2.3 also works on T4.1
Pete
The default version of irremote (v2.2.3), which is in the Teensy distribution, works on both T2.0 and T3.2 with a TSSP4038 on Pin 2.
I removed the local version (teensy/libraries/irremote) so that...
Your code works on a Teensy 2.0 but not on a Teensy 3.2. It dies when the library's enableIRIn function re-enables interrupts after setting up a timer.
Pete
Pin 13 is the output LED on the T3.2 and doesn't behave quite the same as an ordinary digital input pin. Try using RECV_PIN on pin 14.
BTW. Which IR receiver are you using?
Pete
Hi Kevin,
This is just a wild guess, but try moving one of the ADC to pin 38 (A14). I think it is on the other ADC. Perhaps the library can handle two ADCs on T4.1 if one is on ADC1 and the other on...
The audio design GUI says that AudioInputAnalog for T4.0 and T4.1 is "experimental". Perhaps you are stretching things a bit too far? I'm afraid I haven't used it.
Pete
I knew there was something special about AudioInputAnalogStereo. It is only defined for Teensy 3.2, 3.5 and 3.6.
You'll have to use two separate AudioInputAnalog as input to the mixer.
Pete
I've just compiled and ran the code. The change to the mixer gains doesn't help. I removed the call to system_StartupSequence() - what does it do?
Pete
Normally, the sum of the gains into a mixer should be 1 - unless you have controlled the inputs to the mixer to ensure that its output won't exceed the range [-32768,32767]. Try this:
...
No need for an array. You could have a function to read the pot similar to this:
int last_pot = 0;
void read_pot(void)
{
int i = analogRead(POT);
if(i == last_pot)return;
last_pot = i; ...
Here's some code which follows the wikipedia article on the subject.
int p(int yr)
{
return (yr +yr/4 - yr/100 + yr/400)%7;
}
int weeks(int yr)
{
if(p(yr) == 4)return(53);
I didn't know that there was a way of counting the weeks that can put the first few days of January "in week 52 or 53 of the previous year" (from ISO-8601).
I'll try to mangle the code to sort that...
Try my code. It should work and doesn't require a while loop.
Pete
Is this question any different than the one in your other thread?
I doubt that multiplying a 40kHz audio signal by a 38kHz square wave is going to conveniently shift the audio down to 2kHz. The...
I have a bit of code to calculate the week (and day) number. First calculate the time_t value of the start of the year - only need to do this once:
// Need to adjust for years after 2021
...
The problem is that timelib uses 1970 as the epoch and the year is offset by that amount. To set the year properly you would have to so this:
te.Year = 2021-1970;
and to print the last two...
Have you tried an I2C scanner to see if the device is at least on the bus? If it doesn't find the device, have you got 4.7k pullup resistors on SDA and SCL?
Pete
Perhaps the Bat Detector thread will have something useful for you. It does require the audio board though, but you can then use setI2SFreq to change the default 44.1kHz sampling rate to something...
I tested usb host serial on a T4.1 connected to a T3.6.
First, load this receiving program into the T3.6.
// Works on a T3.6 which receives CR/LF from the
// USB host port on a T4.1
// The LED...
It probably won't make a difference but this
Serial.write(0x0B);
should be
Serial.write(0x0D);
Pete
You will always get that "plop" or "click" when you turn a sound on or off very suddenly. You need to ramp the sound up and then down to avoid this.
Try these settings, as a start:
...
The syntax for the two-dimensional array is wrong. It should be this:
const int CCID[CC_SETS][A_PINS] = {{11,11,11,1,1,11},{11,11,1,11,1,11},{11,1,11,11,1...
You need
sgtl5000_1.unmuteLineout();
Pete
You're absolutely right. I misread it. Sorry.
If you just want to see the spectrum of the guitar sample, There's a variable that is set to 0, 1 or 2 when you push the buttons. It is initially...
You need to install the three buttons to use the complete example code. By default it uses SDTEST1.WAV as the audio input to the FFT. Each of the three buttons selects a different input.
// Left...
Just FYI: When I compile that code with Arduino 1.8.13 and TD 1.54-beta6, it spits out an error message early on in the compilation.
Error while detecting libraries included by...
The adafruit BMP380 board has 10k pullups on the two I2C pins which may not be sufficient. Try adding pullup resistors of about 4k7 ohms to both A4 and A5.
Pete
Oh, I missed something. The bmp.begin() is before the Serial.begin(). It may be failing but unable to print anything.
Try this:
void setup() {
Serial.begin(9600); //Begin serial communication...
Excellent :)
Pete
Try changing bmp.begin(); to this:
if (!bmp.begin()) {
Serial.println("Could not find a valid BMP280 sensor, check wiring!");
while (1);
}
Just to make sure that the Teensy can...
What kind of audio are you using for line input? If you're playing from a phone or a PC, have you turned up the audio enough?
When I play audio from PC to line-in there's rarely any non-zero output...
I don't think the buffer size has anything to do with the 480Mbit/sec transfer rate.
I may be wrong, but I think the larger buffer size just allows you to send larger SYSEX messages in one large...
// TODO: start a timer, rather than sending the buffer
// before it's full, to make best use of bandwidth
This means that, at the moment, it sends a message immediately in which case having a very...
uint16_t can only store numbers in the range 0 to 65535. The compiler is warning you that it can't cram a number like 4406636708352ll into 16 bits. That number requires 43 bits which is why it has...
Just installed TD 1.54_b6 over a fresh Arduino 1.8.13 with no problems. Windows 10 Pro X64
Pete
For cue points, maybe this thread is useful, especially my message #10.
Pete
The attached version compiles. I mangled the code until it looked like the example in Files/Examples/Audio/Synthesis/WaveTable/Simpletable.
23546
Pete
In your Churchorgan_samples.h change this line:
#include <AudioSynthWavetable.h>
to this:
#include <synth_wavetable.h>
It still won't compile but it'll get further along.
I missed another problem
if((L_Queue.available() > 1) && (R_Queue.available() > 1)){
Those should be >= otherwise you won't process anything until there's at least two buffers in each of the...
The ADC values are signed 16-bit. This is why you see the large values such as 65369, it is actually a small negative number.
This piece of your code is wrong:
uint16_t (*buff_pointer_L) =...
TimeLib.h in hardware\teensy\avr\libraries\Time declares them to be int
Pete
Which Teensy are you going to use? How long a recording do you want?
Pete
For example, in the read_all_data example, it uses this to instantiate the device:
Adafruit_BNO055 bno = Adafruit_BNO055(55, 0x28);
You would just change it to
Adafruit_BNO055 bno =...
I believe that all you have to do is change
*theWire = &Wire
to
*theWire = &Wire2
Oh, hang on. You don't have to change the library. All you do is reference &Wire2 when you instantiate the...
It might work if it was counting audio cycles but as far as I know there's no way to do that.
Pete