SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By freebird310
#101843
This was really a waste of money and time. I got the tinyusb programmer that was recommended by the sparkfun team.
Now, I think I have a brick. It never gave a proper response and nothing seemed to work right. And nothing works now.

The fact that the board is suddenly out of stock immediately after posting an updated version makes me think that an intrinsic flaw was found.

The comments on the store sight indicate that it was co developed with someone else. I hope they think twice about doing that again.

This has really been a pain in the butt.
User avatar
By leon_heller
#101844
With things like programmers and debuggers it's best to buy the manufacturer's units. They might cost more than cheap knockoffs, but you will have far fewer problems.
By KevWal
#104570
Hi all

Thanks to motosota for the perl codes above. I have edited it a little to work for me and thought I would post here in case it helps others.

The mods are:

Take input from STDIN
Output a header line
Output all 3 values
Changed Scale value.

The scale value was changed to make the resting value of the Z axis read a G of '1', as I believe it should at rest. Interestingly this doesnt quite seem to work for Y & Z - which end up at about 1.2 at rest, something to investigate.



#!/usr/bin/perl
#
# viewtopic.php?f=7&t=20737
#

#$scale = .0156; #g/LSB
$scale = .004525;
$sample = 100;

#open (IN,'ADXL345_000still.csv');

print ("Secs,Right Left,Front Back,Up Down\n");

while ($linein = <STDIN>) {
if ($linein =~ /(\w+),(\w+),(\w+)/) {
$x1 = $1;
$x2 = $2;
$x3 = $3;
$count++;
$secs = $count / $sample;
$y1 = twoscomp($x1) * $scale;
$y2 = twoscomp($x2) * $scale;
$y3 = twoscomp($x3) * $scale;
print ("$secs,$y1,$y2,$y3\n");
}
}

sub twoscomp {
#Take a 16 bit hex value as twos complement - return the decimal value
my ($input) = @_;
$inputdec = hex $input; #Decimal value of the input
$msb = $inputdec & 32768; #Check to see if the MSB of the 16 bit word is 1
if ($msb == 32768) {
$input2 = 'ffff' . $input; #The MSB is 1 so add more 1s to a 32 bit value
$inputdec = hex $input2;
$neginput = ~$inputdec; # Ones complement
$neginput++; #Twos complement
$return = $neginput * -1; #Turn to negative decimal
} else {
$return = $inputdec;
}
return $return;
}
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]