There is no problem, I've read your code, and misread it, it is this part in ADC_Module.h
Now I see, that it is about single-ended being uint16_t, okay: I got it wrong! [*hammering on head*]
I'm...
Type: Posts; User: PaulD
There is no problem, I've read your code, and misread it, it is this part in ADC_Module.h
Now I see, that it is about single-ended being uint16_t, okay: I got it wrong! [*hammering on head*]
I'm...
Hello Pedro,
Found a small bug in the adc library, concerning the output result of differential readings.
When using the adc in differential mode, the results are 2's complement according to the...
great info, I'm working on a hex guitar pitch to midi converter with teensy 3.1, I'm interested in this stuff, I might add an onboard wavetablesynth
Small question, Paul: will the M7 feature a FPU?...
usbMIDI.sendControlChange(control, value, channel)
1-ok, you may have wired up your potentiometer wrong. the outer pins should go to +3.3 volt and ground. the inner pin should go to A0, check if you...
I'm now finishing the first stage of the development of my own guitarsynthesizer system. It uses a Teensy3.1, and a simple hexbufferchip to get the string separated audio into the ADC's. It converts...
nantonos is right.. a pure Teensy3.1 will allready sound better than the WaveHC. You only need a storage if you want longer pieces of music to play, so than you might just as well get the audio...
pitchshifting the hifi manner were used to these days, will not work anyway..
but you can use this old trick:
1) fill a circular buffer with speed x
2) play the same buffer with speed y*x
You...
that sounds like "hard" AVR timercode used in the WaveHC library, thats not portable straightaway to an other processor like the one of the teensy3.x
Adafruit has only provided support for 168/328...
You have a Teensy3.0 and the 3.0 doesn't have 2 ADCs, so it doesn't support SynchronizedRead anyway..
Only works on 3.1!
Hallo David
I dont think you can use other than "soft breaks" in Teensy programming, so you generate your own dump.
Connect an interrupt to a pin with a button, in the attached interrupthandler,...
true story, but didnt the confusion start in the frist place with the mulitplexer numbers being different than the pin numbers on avr? I always thought that that was the motivation of the Ax names,...
nothing confusing here, the "Welcome to Teensy 3.1" postcard, that you've surely got along with your board, does list all these numbers
well, just switch the boardtype to "keyboard + mouse + joystick" in menu tools/USB type..
and then you can speak to the different objects, like in the simple examples.
its that simple I guess, Paul...
use separate buffered signal for feeding pin A4 (or use a opamp buffer for it), and the line with relais goes straight to mixer.
The ADC sucks a little current by every measurement (this is normal),...
Hi,
Im starting to work with audio library, and I assumed that it also works without audioshield on a Teensy3.1
But this example program, using only the onboard stuff, doesn't work ...
I've got...
good tip! tnx..
thanks Paul, for correcting us.. and I've read the thread.. you did your best to help Arduino there!
I'm afraid Arduino on itself will get stuck if they cling to hard to old stuff, rejecting your...
It could be anything really..(maybe the implementaion of the digitalWrite function?) but it is good practice to time your program independedly from the cpu performance.
E.g: If you had used pure ...
replace all "index" with "myIndex"
the var index is used by teensyduino
ok, thanks... this will get very popular, I guarantee..
Thanks, pedvide! great job.
Some questions:
-So all of the 6 available pins can be paired with adc->analogSyncRead(pin1, pin2) ?
-And the singereads are fully independed on the two adc's? (so you...
it is too simple Im afraid, but it is easy to fix..
Your fault: where do you define the samplerate? nowhere!.. so the filter wont work..
So, look at my example above,
these lines define the speed:...
HI Deadp1xels, you could share the code if you like..
you'll have to use a higher order filter (I suggest simple butterworth with 2nd order), and I suggest at least testing it with higher samplerate. You're know crossing the border of 1/2 nyquist, my...
They have an extra resistor to get the position, an a small motor, so you can steer the motor precisely by mesauring this extra resistor. can be done!
You wont need fancy motorsteering, if you dont...
if (FreqMeasure.available())
this checks if a period has passed, and a result is known, so it automatically adapts to whatever frequency is involved, thats the way input capture works
You're wrong, if you wait for 1 measurement, it will automatically wait for the period to finish, whatever period that is. The variable "count" counts just your number of measurements.
I've...
Thank you Deadp1xels, because I needed a filter too, and I completely overlooked this mkfilter thing. So I made this example primairily for myself, and shared it with you and other people with the...
Note1: ofcourse you can use other samplerates in this example but they have to be divisions of 1000000, because of the uS timer used.
Note2: this is Teensy3.1 code, you have to use another output on...
you have to substitute "next input value" with the vlaue read from A1,
and your own varname instead of "next output" value.
You can use loop() instead of this function to test it... keep timing!...
Your right! But I just wanted to present a simular "crude" approach as some AVR guitar peddles, I know audiolibrary is better for sound and versatility. The only thing my example does better is...
You wait for 30 measurements with this line:
if (count > 30) {
You can take 3 or 4 measurements, or even 1 measuremente, as the % error is very low with this low freuencies, I dpends on the...
even the slowest micrcontroller can measure that.. just take a shorter time to measure, but since the frequency is so low you can not go under several times 1/100 of a second, but thats allready much...
thanks Frank,
today I will test the simplest bufferamp for it, with the least amount of components, it would be nice if the buffer ran on 3volts, that would automatically protect the input, and no...
true mHo2!
but I've noticed the same, Teensy 3x serial over usb blocks..
ah, thats nice! thanks for the explanation, Paul..
so thats an alternative methode to measure capacitance using 1 pin, switch on the pullup and count cycles till it reads 1.. (I know the touch...
I've checked it again: startContinuous with switching is somewhat faster than startSingleread , and that is the reason I use it. But could not find documentation for it. Just swap the call in loop(),...
DAC output doesn't need to be same bitdepth as adc input. its another device.
yes, I also tested it without continuous, also works. I know that this isnt clean coded, sorry for that.. works anyhow....
so its just the teensy with headers and audio connected to it?
Then maybe check if you weren't too prudent with the solder, my guess is, that both sides need to make contact with the pins,...
mmh.. strange.. My last guess is to check if you're using the proper Arduino version with Teensyduino.
and what error do you get?
There's 3 volt on the board (have you measured that?), so that should work. And the teensy itself runs and puts out serial debugging?
The POT is just a passthrough to...
what sketch did you upload into it to test?
my wild guess: try disabling interrupts within the interrupthandlers, clearly they steal from one another..
void pointer_moved() {
__disable_irq();
mouse_has_data = true;
...
I sure dont mind power consumption, it will be a wallsocket powered applciation in the end.
I've temporarily fixed it with continous and a custom flag in adc_isr, plus mux switching in the adc_isr.....
haha Eggsperde,
I've got the code running, with synchronized background adc function, using Pedvides adc library: https://github.com/pedvide/ADC
You can choose resolution and sampleRate you want,...
I'm looking into the best solution, I'm comparing the startSingleRead() construction vs. startContinuous ()
I've got the startSingleRead() running very smoothly, but ik takes about 2/3uS time, so...
Ah super, Pedvide!
It was just missing in the examples, that is why I couldnt find this function..
really great, Thanks!
Hello Pedvide,
Thanks for your great work!
I have a suggestion for a function I was seeking, and seems very easy to implement in your library imho..
analogRead() now waits for the adc result,...
Eggsperde, don't mix the great Paul Stoffregen up with humble me! I'm PaulD, and I will post a working stompbox code this weekend for Teensy3.1, it is testproject for me, so it is no extra work....
Hi Eggsperde,
Stomppedal code for the arduino wont work straightaway on Teensy3.0/3.1.. it is not the same kind of chip, and many registers are hard coded to get stuff like freerunning adc's and...