Show Posts
Pages: 1 [2] 3 4 ... 434
16  Using Arduino / Programming Questions / Re: Correlation matrix to calculate similarity? on: April 16, 2014, 10:05:24 pm
What is your data?
17  Using Arduino / Programming Questions / Re: Correlation matrix to calculate similarity? on: April 16, 2014, 01:00:08 am
Quote
your teacher is telling you to do something he is unsure about? That sounds very strange
Nah.  That's a good teacher, one who doesn't limit their students' learning to what they already know.  It shouldn't happen if the class actually convers similarity, but it's easy for me to imagine a student project that could use such things, that went beyond the bounds of the class material.

I have fond memories of when I went off an did "file" stuff in my HS basic class, and my teacher essentially said "I've never done what you're doing, but don't let that stop you."
18  Using Arduino / Microcontrollers / Re: adding a new chip to uno board on: April 16, 2014, 12:31:53 am
Quote
Doesn't the OP's comment above mean they didn't do it right ?
Irrelevant, if they're not using the bootloader.

Why do you think it's easier to distribute a boards.txt than an avrdude.conf ?
Using the 1.5 features, you should be able to set up a "board" entry that uses a different avrdude command for upload (referencing a different avrdude.conf, for example), which should then allow user to upload both to 328p and 328-based boards.   I think.
(The problem is that if you modify avrdude.conf for the 328, it no longer recognizes the 328p, right?)
19  Using Arduino / Microcontrollers / Re: adding a new chip to uno board on: April 15, 2014, 08:35:49 pm
Quote
is there a way to edit the configuration and board files to allow the IDE to program both chips seamlessly under the uno board moniker without constantly re editing the configuration file?
In short, no.  328 isn't supported by compiler version shipped with Arduino.
Note that if you did it right, once you have bootloaders programmed, the bootloader will identify the 328 as a 328p, and you shouldn't have trouble with unmodified IDEs after that, unless you need to reprogram the bootloader.  So you can have someone with a patched avrdude config burn bootloaders for everyone (or use a tool like "optiloader" or Nick Gammon's bootloader loader),
and THEN everyone should be OK.
20  Using Arduino / Programming Questions / Re: Correlation matrix to calculate similarity? on: April 15, 2014, 08:32:06 pm
"String metric" perhaps?
http://en.wikipedia.org/wiki/String_metrics
21  Using Arduino / Programming Questions / Re: Upload bigger than 28.800bytes does't complete? on: April 15, 2014, 08:01:23 pm
There was a famous optiboot bug that hit at about that file size (long ago fixed.)
http://code.google.com/p/arduino/issues/detail?id=380&can=1&q=optiboot
I don't remember ever hearing about a similar problem in atmegaboot, and it's logic should be different enough that it doesn't have exactly the same error, but it could be related.
You could load up optiboot instead; it is known to be fixed, and is 1.5k shorter as well...
22  Using Arduino / Programming Questions / Re: Correlation matrix to calculate similarity? on: April 15, 2014, 07:43:23 pm
The problem applied to strings seems quite difficult (and "interesting.")  However, spell checkers do it...
23  Using Arduino / Microcontrollers / Re: FT232 vs 16u2 on: April 14, 2014, 11:04:27 pm
Note that as far as FTDI goes, there are new chips that are significantly cheaper than the ft232rl used on the older arduinos.
The ft230x and 234x are about half the price and come in smaller packages.  There's even a $6 module UMFT234XF (though it looks like a nightmare from a cable-stress-relief PoV.)
24  Using Arduino / Programming Questions / Re: Arduino Uno: Problems with Serial.print() on: April 13, 2014, 09:53:27 pm
I wouldn't be surprised if you've found a problem with the serial monitor, rather than a problem with the arduino.
Can you try a different serial program?  (putty is popular...)
25  Using Arduino / Programming Questions / Re: How to protect my program in ATmega328? on: April 13, 2014, 05:36:41 am
There is no way to simultaneously protect your code AND use the standard arduino bootloader and tools.
26  Using Arduino / Programming Questions / Re: Bjorklund‚Äôs algorithm on: April 12, 2014, 04:55:33 pm
Yeah; right.
If you're dealing with relatively small sequences and don't care about O(n) efficiency, it looks to me like an O(n2) algorithm would be relatively straight-forward.
Code:
while (remainderSeqs > 1)
  while (remainderSeqs > 1) {
    remainderSeqs -= moveRemainderAfterEachMain(mainSeqSize, RemainderSeqSize, RemainderStart)
    mainSeqSize += remainderSeqSize
  }
  recomputer remainderSeqs at new size
}
I'm don't think I understand what it's doing enough to test an implementation, though...
27  Using Arduino / General Electronics / Re: Why won't Eagle route this airwire? on: April 11, 2014, 04:41:33 am
It looks to me as though the groundplane on the bottom of the picture may be completely cut off from the ground plane at the top, in which case this airwire is the only thing connecting some portion of the board to GND.  (Although that doesn't explain why the autorouter didn't just connect them with trace on the TOP layer...)
28  Using Arduino / Microcontrollers / Re: How to choose cheapest AVR for a task on: April 11, 2014, 03:59:40 am
Quote
Are there any good resources out there for choosing the cheapest AVR that fits a set of requirements?
Well, the major distributors have "parametric search" where you can specify things like "6 to 20 IOs, 8k of program memory, DIP14, DIP16, DIP18, DIP20 packages", and then sort  the results by price.
Digikey says the tiny84 is it, as far as AVRs go.  And it's about $1.63 in tens.  Tiny861 is another alternative.

Understand that prices are subject to random influences, and subject to significant changes over short periods of time.
I wouldn't use eBay as an indication of chip pricing unless that's really the only place you intend to buy chips (which is a bad idea, too.)  Certain "popular" chips become artificially expensive, and everything is distorted by postage issues (some eBay sellers seem to make their profits by mailing things cheaply, so that you can buy one chip for $3 including postage, whereas a real distributor will frequently have postage fees that start at $7+ (minimum sized UPS package.)  But, like I said, that's "distorted" from real pricing.
29  Using Arduino / Programming Questions / Re: Having Difficulty With Accurate Readings Below 20 Celsius with MS5607 Altimeter on: April 10, 2014, 12:10:11 am
Quote
uint16_t C[1];
   :
  OFF  = ( (int64_t)C[2]*131072 ) + ( (dT * C[4]) / (64)); 
  SENS = ( (int64_t)C[1]*65536  ) + ( (dT * C[3]) / (128));
Well, THAT'S not likely to work very well...

Personally, I don't think "we" recommend subroutines nearly often enough.  Why don't you do it just like in the datasheet:
Code:
void setup() {
  read_calibration();
}

void loop() {
  read_data();
  calculate_temp();
  adjust_lowtemp();  // for especially low temperatures
  calculate_pres();
}
I'm not liking the datasheet very much.  When they say something like "if temp < 20C then do something with (2000-temp)", they're really mixing up their real temperatures vs their scaled temperatures.  And why can't we have a real equation for getting temp/pressure instead of this mishmash of fixed and floating point...
 
30  Using Arduino / Programming Questions / Re: Having Difficulty With Accurate Readings Below 20 Celsius with MS5607 Altimeter on: April 09, 2014, 10:22:34 pm
Code:
      T2=(dT*dT)/(2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2);
Oh, don't do that!
C has this rule about doing math with "int" sized things, unless some element of the expression is larger than that.
Now, "dT" is a 64bit int, so that MIGHT cause the 2^31 (?) to be calculated using 64bit numbers.  But the 2s are also inside of parenthesis, which leaves me "uncertain" as to what the compiler will do.  You should NEVER be uncertain if you can avoid it.
You can fix this by making the constant expression also use 64bit numbers, like:
  (((in64_t)2)*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2)
or perhaps
 (1LL<<31)

avr-gcc is known to be pretty slow at 64bit math; it might be a good idea to restrict the 64bit calculations to exactly those expressions where they are actually needed.
Pages: 1 [2] 3 4 ... 434