Tactile pressure sensor with Teensy 3.5 code help
i have made own tactile pressure sensor , and have got work using code , arduino uno. data sent processing have nice visualization.
i trying use teensy 3.5 instead of arduino uno. have got simpler code work prints data serial monitor. trying use code above can visualization teensy. teensy visualization of data in processing isn't correct. hoping me understand why code work arduino uno not teensy. additionally had comment out following lines work teensy.
#ifndef cbi
#define cbi(sfr, bit) (_sfr_byte(sfr) &= ~_bv(bit))
#endif
#ifndef sbi #define sbi(sfr, bit) (_sfr_byte(sfr) |= _bv(bit))
#endif
. . . . .
sbi(adcsra,adps2); //set adc prescaler clk/16
cbi(adcsra,adps1);
cbi(adcsra,adps0);
i trying use teensy 3.5 instead of arduino uno. have got simpler code work prints data serial monitor. trying use code above can visualization teensy. teensy visualization of data in processing isn't correct. hoping me understand why code work arduino uno not teensy. additionally had comment out following lines work teensy.
#ifndef cbi
#define cbi(sfr, bit) (_sfr_byte(sfr) &= ~_bv(bit))
#endif
#ifndef sbi #define sbi(sfr, bit) (_sfr_byte(sfr) |= _bv(bit))
#endif
. . . . .
sbi(adcsra,adps2); //set adc prescaler clk/16
cbi(adcsra,adps1);
cbi(adcsra,adps0);
you can read post understand commented out code doing (adc clock of 1 mhz , sample rate of ~77khz on uno)
in teensy 3.5 have 32 bit 120 mhz arm cortex-m4, not same way deal analog digital converter. if remember correctly maximum adc clock speed teensy 3.5 24mhz way faster arduino uno. have @ adc_module.h , check reference voltage used
in teensy 3.5 have 32 bit 120 mhz arm cortex-m4, not same way deal analog digital converter. if remember correctly maximum adc clock speed teensy 3.5 24mhz way faster arduino uno. have @ adc_module.h , check reference voltage used
Arduino Forum > Using Arduino > Programming Questions > Tactile pressure sensor with Teensy 3.5 code help
arduino
Comments
Post a Comment