Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts

Sunday, October 12, 2008

1275: Arduino IDE on amd64

The compiled packages available at arduino.cc works out of the box only for 32-bit architecture. For 64 bit you have two options

1. Download the normal package and do a small tweaking
       Instructions for the same are available here. The explanation is for Gutsy, Hardy etc. (So they obviously work for the true-blooded Debian systems) Effectively just a simple modification to use system library version of librxtx rather than the packaged one. I am not repeating the steps in the hope that the site would be up for a long time to come (technology has a short shelf life anyway)

2. Check out the trunk from svn and build
      I prefer this solution, not only due to my great love for svn trunks, but also due to the fact that you are more upto date in terms of developments, and it somehow feels like a purer way of doing things. The building instructions are here.

sudo aptitude install sun-java5-jre sun-java5-jdk sun-java5-bin unzip zip gcc-avr avr-libc (install the necessary packages)
svn co svn://svn.berlios.de/arduino/trunk (check out the trunk.. not a small download ..really)

and then simply build.

Once you have the ide up and running things are relatively simple.  Read about the already intuitive ide elements if you want,  Blink a few times ( Arduino Hello World) and go on to further adventures (ok. guided tours).

Monday, September 08, 2008

1279 : EDA & Molecular Visualization

Electronic Desgin Automation is indeed a vast and very fruitful field to say the least. Schematic diagram generation and PCB artwork forms a very small part of it. I was particularly impressed by the ease of use of kicad. Though I am practically more inclined towards Floorplanning ( considering my architectural backgrounds , interest in constraints, 2 gsocs in similar fields etc.) most aspects of EDA are quite inviting. Though i toyed with gEDA sometime back it never really went anywhere. Hopefully with the "more intuitive" kicad, maybe random walks would end somewhere. ( Don't laugh at the screenshot .. probably the most terrible rs232 :) and an example of a particularly large hole in the PCB :D )



Who doesn't like visualizing molecules ? If the representation looks artistically intricate like that of proteins, it hardly takes a push to try things out. I have always been impressed by the amount of open information availability in the field of genetic and protein related studies. So a book like Branden & Tooze + www = roaming around in the molecular world ( well an artistic representation of it .. blah) I have almost always used only rasmol. But I recently shifted pymol and it has been quite a wonderful experience. It is somehow much more intutive. In the picture above, the molecule on the left is Haemoglobin A ( with its characteristic Iron complexes) and the one on right is Seal Myoglobin.I have only reached Chapter 3 (alpha-domain protein structures) of B&T, but it seems like it is going to be on the top of my reading list. On a connected note , The crystal structure (3.2 A) of mammalian Fatty Acid Synthase is on Septemeber's Science cover.


--
On a followup note seems like Techsouls is not working. So waiting to order arduino via sparkfun
as soon as gsoc money comes to the ge corporate card which i finally got unlocked today.

Saturday, August 30, 2008

1277: Tinkering with Plotrave

Maybe many of you already know about it , but arduino NG based Flexi is availabe in India from techsouls. I have given an order. Hopefully it comes in the next few days.

I have never really been a web guy and have never found web development interesting, never ventured into web-based programming? err.. whatever it is called..
Completely useless statistics though has always interested me. And when you do think about it, when is statistics really useful?
The above image was generated using google charts api, using data extracted from workrave statistics files using a perl script. As you can clearly see, I don't even know the equivalent in Perl of backslash in C. The scipt is a modification of this one, which just extracts data from the file into columns. 3 types of data are plotted and a line is drawn to denote the average computer usage. In particular, most things are hardcoded, like the date and scale . Maybe sometime later I can write a more parametric extractor.
#!/usr/bin/perl -w

use strict;
use integer;
use POSIX qw(strftime);
use Time::Local;

$ENV{'PATH'} = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin";

my $timestring = "";
my $keystring = "";
my $averagestring ="";
my $average=0;
my $count=0;

sub dumpactivetime($)
{
my ($misc) = @_;

die "No misc at line $.\n" if !defined($misc);

no integer;
my $t = "@$misc{activetime}";
$count = $count + 1;
$average = $average + ($t-$average)/$count;
$timestring = $timestring.sprintf("%.2f",$t/540.0).",";
$averagestring = $averagestring.sprintf("%.2f",$average/540.0).",";
}

sub dumpkeystrokes($)
{
my ($misc) = @_;

die "No misc at line $.\n" if !defined($misc);

#my $miscstr = join(" ", @$misc{@$miscstats});
no integer;
my $t = sprintf("%.2f",@$misc{keystrokes}/1000.0);
$keystring = $keystring.$t.","
}

#
# Initialize RRD
#

my @miscstats = qw(activetime keystrokes); #mousemovement clickmovement movementtime clicks
#keystrokes);

my $step = 24 * 3600; # 24-hr steps
my $heartbeat = 4 * $step;

my (@DS);
foreach my $miscstat (@miscstats) {
push @DS, "DS:$miscstat:GAUGE:$heartbeat:0:U";
}
umask(022);

#
# Populate data
#
my $source = "$ENV{HOME}/.workrave/historystats";
my $first = 1;
my ($tmdate, $break, $misc) = (undef, undef, undef);
open(SOURCE, $source) or die "open $source: $!\n";
print "http://chart.apis.google.com/chart?cht=lc&chg=7,33.33,2,4";
print "&chxt=x,y,r,x,y,r&chxr=0,8772,8877|1,0,15|2,0,100000";
print "&chxl=3:|Day|4:|Hours|5:|Number&chxp=3,50|4,50|5,50";
print "&chco=4d89f9,008000,fd0f0f";
print "&chtt=Computer+Usage+Statistics";
print "&chts=ff9900,15";
while () {
chomp;
if (/^WorkRaveStats 4$/) {
# Ignore header
next;
} elsif (m/^D\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)
\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s*$/x) {
if ($first) {
$first = 0;
} else {
dumpactivetime($misc);
dumpkeystrokes($misc);
}
$break = $misc = undef;
} elsif (m/^B\s+([012])\s+7
\s+(\d+)\s+(\d+)\s+(\d+)
\s+(\d+)\s+(\d+)\s+(\d+)
\s+(\d+)\s*$/x) {
next;
} elsif (m/^m\s+6\s+(\d+)\s+(\d+)\s+(\d+)
\s+([-0-9]+)\s+(\d+)\s+(\d+)\s*$/x) {
$misc = {
activetime => $1,
# mousemovement => $2,
# clickmovement => $3,
# movementtime => $4,
# clicks => $5,
keystrokes => $6,
};
} else {
die "Unrecognized line (line $.): [$_]\n";
}
}
close(SOURCE) or die "close $source: $!\n";
dumpactivetime($misc);
dumpkeystrokes($misc);
print "&chd=t:$timestring\b|$keystring\b|$averagestring\b";
no integer;
printf("&chm=r,f00000,0,%.3f,%.3f",$average/54000,$average/54000-0.002);
print "&chs=800x375&chdl=Activity|Keystrokes|Average Usage&chdlp=t\n";

--
Epilogue:

The subject (moi) is mostly a web-technology illiterate guy.

Let us substantiate the same.

Things the subject DOESN'T know : Javascript, VBScript, Java, CSS, CGI, Ruby, PHP, MySQL, AJAX etc . Beyond this, the subject is even unaware of the topic names , pointing to his complete ignorance.

The ONLY web services/technologies I use:
Mail : The subject was/is a great fan of gmx. But he mostly uses gmail via imap now. The author checks the mail approximately once a day.
IM: Jabber via talk.google.com using freetalk/gajim.
Social Networking-esque sites : Ohloh, LinkedIn
Blogging: blogger and wordpress
Games: chess.com, though active use is mostly a seasonal phenomenon.
Demonoid.com & textbooktorrents.com: The subject honestly hopes *they* don't send him to jail for this.

The subject also Passively uses
last.fm
sourceforge.net[1]


Valete
--
1. Due to the subject's involvement with open source he uses Subversion as per requirements.