Tuesday, August 31, 2010

Why I like building with modular Linux Gadgets

With all the talk about iPhone vs. Android wars, it's easy to forget that Linux was once discussed as a popular platform for rapid prototyping gadget development. The more projects I do with the BeagleBoard, the more emails I seem to get from fellow engineers and programmers - many who work at embedded systems companies around the Boston, New York, (and California).

Oddly enough, a lot of programmers still favor Linux development over iPhone apps because of how many programming languages you have available, and the fact that you don't have to load up massive amounts of dev API's to start hacking, you can just pick it up with gcc or Perl and run. And Linux gadgets in general are a little different from Android too, because while Android focuses more on the GUI and user interface and experience, Linux is much lower level, and therefore tends to be more useful for industrial design, control, and engineering applications like sensor and motor control and industrial automation.


I suppose you could say Android is "consumer" focused, and Linux is "industrial" focused.


Anyway, I've been programming a number of apps for folks who have asked for help recently, and I've been learning a lot about the design process of building modular gadgets with the BeagleBoard from TI, and the BeagleTouch and BeagleJuice from Liquidware.






The first thing I've realized is that having raw exposed digital IO pins is a life-saver. I use these to hack in switches and LED's without having to completely reverse engineer schematics and pin diagrams. Literally I can just solder into the general purpose IO and I'm off and running. Alternatively, I use the Arduino to wire in a sensor like the Compass Sensor or Temp Sensor or Gyroscopic Sensor, and then plug it into the USB port (I'll blog about this soon).




Practically speaking, being able to disassemble the device and reassemble it on the fly in a modular way, is a pretty useful skill in making gadget or hardware demos. This is because I can change the form factor around on the fly. I was in a meeting earlier today (which inspired me to write this article), when the project manager guy asked how hard it would be to turn the Gadget Pack handheld into a terminal with a keyboard... so I unscrewed the demo and within 60 seconds, had something that looked like this:




Then, one of the engineers said, "yeah, that's cool, but we really ought to have an on-screen keyboard." So I clicked around twice, and using the fact that it's a touchscreen, I loaded up the Linux onscreen keyboard app that Will converted for the Beagle Gadget Pack, and then turned it into this:



That's pretty powerful, because it's *real time prototyping* not just rapid prototyping. As in, it happened instantly, almost as fast as it took for someone to finish the sentence, it was done. I've observed that "business guys" and "customers" that embedded design companies build devices for often like to change their mind in the middle of the project as they learn more about what they're trying to build, or the aesthetics, or design or interface needs. It's quite expensive to a project to have to re-engineer the whole thing from scratch every time the form factor needs to be changed. Making something 100% modular makes changes like this really fast. Plus, I've pretty much found a way to cut out the part of the prototyping process that involves making a "non-functional prototype" and just jumped right into making a functional prototype...




So I've been living with the Open SciCal and the Gadget Pack for 2.5 weeks now, and so far I've showed it to half a dozen folks, and gotten 3 assignments to build custom gadgets using the platform. I'm not going to become a millionaire by any means, but I'm at least getting paid to do what I love doing... which is hacking open source hardware into gadgets, and if you had asked me 3 years ago when I started this blog if that would ever be a possibility, I would have said fat chance...




So anyway, thanks to Will and Chris, Mike and Justin, and Matt, John for all the support and help along the way... and here's to some happy hacking over the next few days and very very late nights as I work on my top secret project...


"Project C".


Dun dun dun....


:-)



Sunday, August 29, 2010

Thanks Hackaday :-)

I must have totally missed this, but I looked back at my RSS reader, and noticed that the Open SciCal project got onto hackaday. Thanks a lot! It's definitely no secret that I have a nerd crush on hackaday, since I've read that blog since middle school, and aspire to recreate everything they mention and talk about.




Here's a link to the post, and thanks again, hackaday...





Top 5 Things Microsoft Should Open Source

I don't typically go on rants, but when I saw this article about Microsoft being Open Source, it got me thinking..

If we take them at face value and assume this is a serious statement of fact, and not a clever PR campaign for OData by Jean Paoli
, then we have to assume that Microsoft is stupid. Microsoft makes money from being proprietary, and capitalizing on two things:


  1. The integral nature with which their products exchange information with each other
  2. The firewalled nature with which their products do not exchange information with other products

The most important element of their successful software platform is not so much that it is "Open Source" or not, but rather that it only plays well with themselves, and doesn't play well with others! Microsoft software is like a monstrous horrible clique of software programs that hangs out in the corner of the playground by itself, gossiping about everyone else, and thinking they're really awesome when really they're not. Microsoft Office is like Zac Efron's character Troy Bolton: a huge tool.

In the words of Mike Posner, and the lyrics of "Cooler than me", this is what I think of Microsoft:


you got designer shades, (closed ridiculous XML standard files)
just to hide your face and (poorly written code)
you wear them around like (all your apps have the same VB code that isn't open source friendly)
you're cooler than me.
and you never say hey, (how do I get data into an Excel sheet from a Perl script, eh?)
or remember my name. (when's the last time you updated your MySQL import code? HELLO!)
its probably cuz,
you think you're cooler than me. (But you're not.)

Don't get me wrong: I've been a user of Microsoft products for some time, not only because I have to, but because a lot of analytical and information based tasks just happen quicker when tools talk to each other, and you can transparently export and import data from one tool to another. This isn't necessarily an argument for Open Source, but it's close.

I would argue the single most important and "open" commitment Microsoft can make is not about their source code, but about their architecture. "Open architecture" means playing well with others, which Microsoft doesn't do right now.

So without further ado, this is my list of my top 5 things I think Microsoft should "Open Source":

1) Excel functions
I would obviously integrate them into R, make a much more powerful library, which would add and build up functionality into Excel. This would then make Excel even more useful than it already is, and allow people like me to use it for more than just simple stuff. The visual basic engine is horrible, it was never meant to write algorithms in, and so it shouldn't. Other languages do that better.


2) Powerpoint macros
Slides are quickly becoming a new hieroglyphic / pictorial-based written language to business folks, just as "early" languages mostly started from simple graphics. But Powerpoint should have a way to make these graphics "go meta" so that scripting could be done easily and more natively. I have tried doing this with Visual Basic, and it feels a lot like what happens when you fall off a motorcycle while not wearing protective clothing, going 60 miles an hour. Only more bloody.

3) Charts and graphs
If Microsoft doesn't make their engine available to do this, and use and import from other graphing platforms more easily, other people are going to do it for them. And then they'll be sad. There's so much potential here, and they ought to be web-postable in normal formats, not stupid .NET ridiculousness. Earth to Microsoft. Your dream of owning the enterprise business web never happened, and the world got over how insanely difficult your code was to post on the web, and did something about it. It's called Ruby on Rails. Look at how easy this is compared to your .NET obfuscation here. 5 minutes for Rails vs. I don't even know where to begin for .NET.

4) Microsoft Word doc format
I use the outline feature all the time, and the truth is, I'd love to be able to use .doc to txt converters for all my own files without having to venture into some insane XML format parser or pay $60 for some shareware app that doesn't even work on Linux. I just want a straight .doc to text converter. C or Perl script. Simple.

5) Access data files
I'd argue Microsoft already missed the boat on this one. On the one end, you've got FileMaker Pro spinning circles around Access, and on the other database hand you've got MySQL doing a much better job. So what's left? A mediocre combination of the worst of both worlds. If you don't Open a reasonable, Perl-like interface to Access files, you can kiss the entire tool goodbye. I know a lot of coders, and I don't know a single one that uses Access any more. Period.




I've said my piece. Like I said, I don't make a habit out of ranting, especially not about software, but I couldn't contain myself. Now back to hacking open hardware...

Tuesday, August 24, 2010

Carbon Fiber meets the LCDash

I don't know how many of these I'll be able to do, but every time someone install one of the LCDash's into their cars, I get pretty excited. The LCDash was a project a long time ago to control the MegaSquirt. And here's what it looks like in a real dashboard, surrounded by custom made carbon fiber - you can see it in the middle of the central dashboard, with the blue backlight effect:



 There's some more discussion about it over here on the teamsolo.net forum.


This may get the award for the coolest looking LCDash installation I've seen yet (on the web of course).

Saturday, August 21, 2010

Arduino meets Sniper Training

Maybe I've been watching too many movies featured old guys past their prime shooting at evil faux-communist puppets ruled by evil capitalistic interests. Or maybe I haven't been watching them enough :-)

Anyway, Bjorn sent over a few weeks ago some really cool cases that he built for the Arduino, and one of them was camouflage. The second I saw the case, I had the same idea that anyone would normally have, when they see a smooth, camo Arduino case... time to make a sniper training ballistics tracking app for the Arduino.




So I did some research, and learned that there are actually a number of different, and sometimes conflicting theories about how sniper's should train, and how much thought to put into ballistics tracking. As an aside, I really want to go to the GPS Sniper Training School - I am not in any way endorsed by them, but it looks fun. It didn't take long for me to get in over my head, and then I figured, that probably the most helpful app I could write, would be one that helped me calculate spread, grouping density, and cluster metrics for accuracy training.

I really liked the look of this target, inspired by the Aguilar training system:

So I decided to program it into the TouchShield Slide:


The app is pretty straightforward, it lets me keep track of the shots I take, and then I can do analytics and measurement stats on the Open SciCal calculator. This is a pretty sure-fire guaranteed way to look like the biggest nerd at any firing range across America.


It took me less than 15 minutes to write that code for the Arduino and TouchShield Slide, and I had a lot of help using the function reference over here at the liquidware wiki. The functions are all inspired by the Processing programming language, so it's intuitive to pick up if you've ever written graphics for Processing.

And then I went to the shooting range, and set up at the prone position station, with the Open SciCal, and the Arduino Sniper Bullet Tracker gadget:

Here's the source code for the program (it's available at the Open Source "App Store" too):


int q;
int bulletx[30];
int bullety[30];
POINT npoint;
int debounce;

void draw_sight(void){
background(0,0,0); stroke(128,128,128); fill(0,0,0);

rect(5,5,40,25); text("New",7,12);

rect(5,210,40,25); text("Clear",7,217);

noFill(); ellipse(199,120,120,119);
ellipse(199,120,100,100);
ellipse(199,120,80,80);
ellipse(199,120,60,60);
ellipse(199,120,40,40); fill(0,0,0);
}


void setup()
{
q = 0; draw_sight(); debounce = 1;
}


void loop()
{
if(touch_getCursor(&npoint)) {

if (npoint.x > 5 && npoint.x <> 220 && npoint.y < q="0;"> 5 && npoint.x <> 5 && npoint.y < debounce="1;" q ="="" q =" 0;"> 60) {
draw_sight(); debounce = 0;
}

if(npoint.x > 60) {
bulletx[q] = npoint.x; bullety[q] = npoint.y;
}

fill(200,0,0);
noStroke();
for ( int j = 0; j <= q; j++) { if (bulletx[j]>40) {
ellipse(bulletx[j],bullety[j],5,5);
}
}

}

}


Here are a couple videos:






I uploaded some other pictures onto my Flickr page... in case anyone's interested.

I also put all the parts I used together into a kit, called the Arduino Field Gadget.

Enjoy!

Friday, August 20, 2010

How to make a BeagleBoard Wardriving Gadget



War driving is fun. It is the process of driving around the neighborhood in a car, FBI van, or bicycle, looking for unsecured wifi networks, and then checking out what might be on those networks. There are plenty of legitimate reasons to do this, for instance:
  • Checking a company's various office locations to make sure that the wifi networks are secured
  • Making sure that someone hasn't set up a rogue wifi router where don't expect one to be
  • Demonstrating to friends and family why it is important to secure a wifi router with with passwords

But more often than not, there are slightly less legitimate reasons, including:
  • Finding places to park where you can get free wifi to send emails or visit websites without being tracked
  • Find wifi networks that are fun to hack around, and see what types of services are available
  • Snoop traffic to watch people type in AOL instant messenger conversations to each other when they should definitely be working
Note: On the record, I have nneeeeeever done any of these things. Neeeeeeeever. Not me, nope. Nada.








So without further ado, here's how to make a BeagleBoard-Based Wardriving Gadget... the parts that I used for mine were:
Many of these parts are available in one kit. The BeagleJuice forked splitter basically just took the power cable from the USB hub, and spliced it nicely into the BeagleJuice power cable. This is what it looks like, compared to the basic BeagleJuice power cable:


Beautiful hand writing! Why thank you. No problem! My pleasure! It's way too late... I need sleep...


There really wasn't much to do, but in case it isn't obvious from the pictures, it was mostly just mechanical snap assembly:
  1. I put the BeagleTouch onto the BeagleBoard
  2. I mounted the BeagleJuice onto the back of the BeagleBoard
  3. I wished I had done it in the opposite order, since the standoff screws would have been easier to mount if I had put them on the BeagleBoard-BeagleJuice first
  4. I plugged the BeagleJuice Power Splitter into the BeagleBoard
  5. I plugged the other end of the BeagleJuice Power Splitter into the USB hub
  6. I plugged in the compatible wifi module into the end of the USB hub
  7. Then I used electrical tape to connect everything together
When everything was mechanically connected, and assembled, the software was pretty straightforward... I used Kismet, which need a few extra packages to be installed, but these commands work start to finish:


$ wget http://www.kismetwireless.net/code/kismet-2010-07-R1.tar.gz
$ tar -xvf kismet-2010-07-R1.tar.gz
$ opkg install ncurses-dev libpcre-dev libpcap-dev libnl-dev
$ cd kismet-2010-07-R1
$ ./configure
$ make dep
$ make
$ make install


Then to get kismet up and running, I needed to first get wlan0, the wifi module operating and turned on, and then I just ran kismet:


$ ifup wlan0
$ kismet -c wlan0


The instructions are also on the Antipasto Wiki over here. Here's a video of me showing it off:





And here's a set of videos I took while walking around outside an abandoned office building very late at night (aka 2 hours ago)... you can see a bunch of wifi networks popped up:











I uploaded a few other pictures onto the Flickr page, and of course all the parts and source code is over at the Liquidware shop...

Monday, August 16, 2010

How to program the BeagleBoard

I've gotten a lot of questions over the past couple of weeks of people asking me, "how do I program the BeagleBoard?" It's not that silly of a question, actually, and it reminds me that I once asked this question too, only a couple of months ago.

The answer is: you don't! The BeagleBoard programs you! (just kidding, this isn't Russia)

In all seriousness, the BeagleBoard isn't like the Arduino, in that it doesn't have an IDE program that sits on the desktop and communicates with the board. Instead, all of its files exist on an SD card.

The BeagleBoard SD card is the easiest way to get programs and files on and off of the BeagleBoard. Just popthe SD card out of the BeagleBoard, pop it into a multi-card SD reader, plug the reader into the desktop USB port, and then copy files onto the SD card that you want to make available to the BeagleBoard.

Ok, here's a step-by-step guide:


Step 1: Turn BeagleBoard on it's side

In my case, I always leave the BeagleTouch on the front side of the BeagleBoard, so it can display graphics and the Linux OS on the screen.


Step 2: Locate the SD Card in the BeagleBoard

Every BeagleBoard is operated with software that is loaded on an SD card. This is different than the Arduino, because the Arduino stores all of it's data in a small area of Flash memory on the Atmel chip. The Atmel has something like 128-256K of space. The BeagleBoard SD card that I use (and sell pre-programmed) has 4 gigabytes of space. That's a huge difference...



Step 3: Remove SD Card from the BeagleBoard

This is not a very hard step:


Step 4: Plug SD Card into SD Card Reader

I use a Sony or Ultra one, only because I like the brushed silver / aluminum look.


Step 5: Plug SD Card Reader into PC

Using a USB cable that came with the reader:


Step 6: Copy Files to the SD Card

This is the hardest part of the whole thing, which isn't saying much. Basically it's really easy. You copy the files from your computer onto the SD card.

On Windows, it looks like this:


On Linux (and MacOS X), it looks like this:


Step 7: Install an Ext2 Partition Reader on Windows

Windows users have one extra step. The SD Card that runs the BeagleBoard has two partitions on it. One of those partitions is formatted in "vfat" which is the native format that Windows can read. This is the partition that stores the boot-up data.

The second partition is in a format called "ext2". That partition is where you want to copy the files on to the BeagleBoard. I'm not going to try to recount an explanation of ext2 here, but instead, there's a really good, easy read about it on wikipedia here. Here's the catch: Windows 7 can't read "ext2" out of the box, so you need a program to access the partition.

So to access ext2 on Windows 7, in theory, you have 3 options: Install Explore2fs (open source, free) from here, Install Diskinternals (freeware) from here, Install "Installable Ext2 File System for Windows" (freeware) from here.

I've only ever gotten it to work by following these instructions for the "Installable Ext2 File System for Windows". Here's a tutorial on how to get that working.

After you've installed one of those programs, you can now access the ext2 partition, and copy data to and from it.

Monday, August 9, 2010

How to make a BeagleBoard MP3 Player

I was looking around at some comments and articles about the BeagleTouch-based Linux Tablet, and I noticed that there were a few people that mentioned that a Linux-based Open Source hardware tablet is the antithesis, arch-nemesis, ying vs. Apple's yang. While Apple is super secret, closed source, proprietary, and hidden, a Linux OSHW tablet is transparent, hackable, open source, and visible.


PS... I don't think this title is long enough, I think it should be, "How to make a DIY Open Source Hardware Beagle Board and Open Source Angstrom Linux Software MP3 Media Player in 10 Minutes Or Less with 5 Easy Steps and 6 Easy Payments of $9.99" Ha.


Sooo....


I figured I'd take that metaphor to the extreme, and make a quick tutorial about making a super-overkill, overqualified Open Source Hardware MP3 player, called the "Anti-iPod". Naturally, the best part about this MP3 player, is that it actually plays MP3's, not weirdly-encoded, proprietarily-coded music format with DRM protection. The second best thing about this MP3 player is that no one will ever try to make it a criminal offense to hack into it...

Closed:


Open:



Step 1: Assemble a Beagle-board based Gadget


Probably using something like this or like this, I just snapped a BeagleTouch onto the Beagleboard, plugged in power, and connected a USB cable from the BeagleTouch to my computer. This is what I call a Beagle Gadget Sandwich (BGS):



Step 2: Connect it to the Internet

Either with a wifi module (as I wrote up in these instructions or over here), or an ethernet module like this one.


Step 3: Download and run the install script



$ wget http://www.liquidware.com/appfiles/83/original/linux-ts-mediaplayer-1.0.sh 
$ chmod 777 ./linux-ts-mediaplayer-1.0.sh
$ ./linux-ts-mediaplayer-1.0.sh



Step 4: Pirate music

From your own collection, OBVIOUSLY.


Then save it to the home directory, in the /home/root/Music folder. You may need to "mkdir Music" from the home directory just to make sure the directory is there.

Step 5: Launch the MP3 Player

Then, start up the MP3 player application, with skins, and exported to the display, with these commands:



$ export DISPLAY=:0.0
$ vlc -I skins2 --skins2-last /home/root/Night.vlt ./Music


It should look like this:




Done!

Turning the Open SciCal into a handheld hedge fund tool

Shortly after the handheld Open SciCal got picked up, I got an order for a few Open SciCal's, hand-made, with the wifi-attachment, and to be delivered to an address in downtown Manhattan. I did a little more research, and it turns out that they're going to be used by an actual trading firm on Wallstreet. I don't know how to verify this, but it may be one of the first documented cases of a super-secret Wallstreet firm actually using Open Source Hardware.


I also got a handful of emails from people asking what on earth stock auto-correlation is, and why it's interesting. Although I'm not a professional trader, I emailed a couple of old friends of mine who are programmers at quantitative finance trading firms, and this is probably the simplest explanation I got back:


"Correlation is a popular tool for hedge funds, because it tells you whether the returns from one stock are closely linked to the returns of an industry or another stock. Auto-correlation is when you compare the returns of one stock on a given day, with it's historical returns 1, 2, 3, ... n seconds, minutes, days. weeks into the future. It helps you determine whether the stock's performance at one time can predict it's performance at some time in the future, or vice versa."


I asked for an example in source code, and here it is - very simplified, and coded up for Yahoo finance, and posted on the "Open Source App Store". This is what it does:


  • Uses the Wifi Module to connect to the internet
  • Take a stock ticker, send it to Yahoo Finance's CSV downloader
  • Download it to R, save it to an array
  • Calculate percent change in price figures (returns) for each pair of consecutive days
  • Run 1-10 day auto-correlations of the stock against itself
  • Kick out a simple little line chart showing the auto-correlation profile
To use it, I just opened R on the Open SciCal, and typed:

source("http://www.liquidware.com/appfiles/85/original/handheldhedgefund.txt");
stockacf("YHOO");

Now the obvious disclaimer: if you use this Open Source program, using free data from Yahoo Finance, on the Open Source Hardware calculator, and find that you lose a lot of money... you can't complain that anyone hid any part of this, since literally everything was open or free along the way. At least this way, you can see the entire inner workings of how you're gambling, as opposed to what might happen at a casino or in Las Vegas, where they do everything possible to hide the fact.

Here's a picture of Apple's stock price, on the Open SciCal:



It looks a lot like the actual Apple stock price from Yahoo, except revered in time series order:




And then here's the result of the auto-correlation algorithm with a couple different stocks (I have it repeating with Apple AAPL, Texas Instruments TXN, Yahoo YHOO, and Google GOOG):






And this would technically let someone just walk around a building, running stock return auto-correlations in their hands, presumably downloading data from a more reliable and faster updating source than just Yahoo finance, and actually making big trades as a result.


Here's a full video:



And another, longer one:





Alright, now that that's out of my system, time to get back to hacking with a few of the new sensors Justin and Mike have been working on...


 



Friday, August 6, 2010

Thanks!

I just finished writing emails back to everyone who emailed in ideas and suggestions for how I could improve the Open SciCal, and questions about the hardware. Over the next couple days, I have a LOT of projects to work on, and a lot of examples... I don't know how I'm going to sleep, there's so much to do... and it's already 4:40 am as I write this, and I haven't slept a bit.

But first, before I start those projects, I really wanted to thank the folks at Wired, Gizmodo, and Make for giving the Open SciCal so many hits and so much attention... it was so much, in fact, that the poor little server that hosts Liquidware slowed down to a halt with all the pagehits, and had to be rebooted.

I certainly learned a decent amount about server uptime and cache overflow errors.

Most importantly, though, I have a notebook now, filled with requests, ideas, programs people would like to see running on it, hacks for the hardware, etc. That's the fun part of Open Source - I probably wouldn't have come up with a fraction of that on my own, and now Will, Chris, Justin, Mike, John, and I are going to have a blast writing all these features into the app software and giving them back as improvements to the Open SciCal.

Thanks again...




Now I feel I need to comment on that last one... Nerd Excalibur. Ok, that's pretty funny... so I typed "nerd excalibur" into Google images to see what I'd find, and this was the first picture:

"Aye, program in TI-BASIC and you my die before your app finishes. Use R and you'll live... to see another function. And dying in your beds, many years from now, would you be willing to trade ALL the transcendental functions, from Sine to ArcTangent, for one chance, just one chance, to come back here and tell other calculators that they may take our math functions, but they'll never take... OUR SOURCE CODE!"

Insert rowdy adrenaline cheers from face painted hardware hackers and electrical engineers...

I could live with that I guess :-)

Tuesday, August 3, 2010

Using the Open Source Graphing Calculator to predict sunspots

With all this talk about solar plasma aurora storms, sunspots, I thought this would be an excellent opportunity to show off the Open Source Graphing Calculator's capabilities. Believe me, this is just scratching the surface...

First, I googled around, and read this article at theregister and this one at the examiner. Naturally, there was a big, ominous sun picture :-)

Scary! Here's a video of the class C3 solar flare happening in real time:



Naturally, after reading that article, I thought to myself, "I wonder what the statistical significance of this event is, and what the probability and co-occurrence bi-frequency distribution and temporal periodicity squared coefficient might be?"

I opened up my trusty iPhone... and... NO APP FOR THAT!!! What now, Steve Jobs, what now?!?! Oh no...! a mathematical question that deserves an answer, but didn't raise enough VC funding to make a bloated iPhone app that answers a simple question, but with slide-show effects, really pretty jelly buttons, and 3D shadows underneath it!


Luckily, as any good astro-physicist or geoscientist would tell you, one of the most famous data sets in the world is the Wolfer Sunspot Series, which is practically a rite of passage for starving astro-physics PhD students worldwide, and a great way to get published.

Thanks to Gareth Janacek, and his collection of data series, I was able to find the Wolfer data quickly, and used wget to pull it down to my calculator.

wget http://www.uea.ac.uk/~gj/book/data/wolfer.dat


Quite simple. Then I booted up R using a little script that I have automatically load when my calculator boots It basically runs this command:

export DISPLAY=:0.0
xterm -bg black -fg green -bw 0 -e 'R'


When R was running with the Matrix color theme, I then imported the data into a matrix (which is somehow nicely recursive):


Then I ran a command that launched up a little graphic:

dev.new(width=5,height=2.5);
par(mar=c(0,0,0,0),oma=c(2,2,2,2),bg="black);
plot(c(1:length(x)),x,type="l",col="white");
box("plot",col="white")


Literally this can be copied and pasted right into the Open Source Graphing Calculator's R command line:

And voila!


My iPhone is speechless. It can only sit there, black screened, wishing there was an app for that. I mean, technically, there is a $36 app call "Helios" that has funky graphics, but it doesn't answer my question: is this a regular thing, or really statistically random?

The answer: it happens all the time, and flares tend to be cyclical on a fairly predictable manner.

Open Source Graphing Calculator: 1
iPhone / Android / Ti-82 / HP-50g: 0

:-)

Sunday, August 1, 2010

Introducing the 100% Open Source HW/SW R-Based Graphing Calculator

The childhood geek inside me is running, screaming, jumping around with joy, and hacking it's way into servers it shouldn't even know about. I'm definitely totally nerding out over here, I can type this up, my fingers are jittering around so much.

I can die in peace, for the day hath cometh, wherein...


With Koen, Thom, Chris, Mark, and Will's help, I built this 100% Open Source Hardware-based, Open Source Software-based KICK ASS REPLACEMENT for my two most trusted allies in life: my TI-89 and my HP-50g scientific graphing calculators.

Don't get me wrong, the TI-89 and HP-50g are awesome. Some might argue, they're too awesome, since neither TI nor HP have been able to make a better calculator that I'd buy. And I know my calculators, so if a better one came along, I'd definitely buy it. (Just ask anyone who's ever been to the Liquidware Lab to see my calculator collection). And I'm not talking about the TI-200 "Voyage" (choke, gag), which came out around the same time the dot-coms were around, and IMHO is everything that was wrong about the dot-com era (plus the keyboard made it illegal on the SAT).

Also, there's two big problems with the TI-89 and HP-50g in my book:

1) I didn't make it myself
2) They're not open source and hackable



But this... calculator has 1,000,000 times the coolness factor of those two calculators above:

  • It runs Linux (HP: no, TI: no)
  • It runs R (HP: no, TI: no)
  • You program it in C or Perl (HP: no, TI: no)
  • It has a Wifi connection (HP: no, TI: no)
  • It runs a web browser (HP: no, TI: no)

The only sad part is that my scientific graphing calculator doesn't run HP's cool reverse polish programming stack which is not so much intuitive, but actually quite fun to program... especially with its list manipulations, inspired from the Forth programming language.

Oh wait. Just kidding, my calculator can run a full Forth stack using gforth, or a Fortran stack (using gfortran)!

Here it is with a full keyboard and mouse, just for kicks... although obviously it doesn't need those because I can use the on-screen keypad because it's got a touchscreen OLED using the BeagleTouch module.


The colors got a little white-washed on this one, but it gives you an idea for the size:




The screen is plenty bright:


And here's a video showing my doing R matrix manipulations:





In my opinion, there is nothing nerdier or cooler than a pocket sized graphing and programmable scientific calculator that runs R. Nothing. Hands down. Like this is the kinda stuff that makes NSA Trekkies jealous... bring it on! :-)

I've uploaded the Open Source R-Based Calculator it as a kit onto the Liquidware shop, as an option to the Tablet Pack, to make it come with R pre-loaded and pre-installed from Koen (I'm assuming people have their own keyboards and USB ports, otherwise I'd include those too).