The other day I was looking for a free tool to make .gif animations. I haven't found anything free worthy of using, so I figured I might as well write my own with the features _I_ would like to see in a simple gif animator.
Friday, December 11, 2009
Monday, November 30, 2009
ADXL345 accelerometer breakout board + Arduino and Processing
Some time ago I've purchased an ADXL345 accelerometer breakout board from SparkFun.com. After some searching and datasheeting (that's an awful term, I know :D), I've finally came up with code, which will allow me to talk to the accelerometer using my Arduino and even pass the data on, to Processing (it's a fun language, covered in my previous post)
In this post I will cover the setup for the communication procedure between the ADXL345 and the Arduino and then, between the Arduino and Processing (ie your PC). All the sources are at the bottom of the post, as usual. (Code is now updated for Arduino 1.0.4)
In this post I will cover the setup for the communication procedure between the ADXL345 and the Arduino and then, between the Arduino and Processing (ie your PC). All the sources are at the bottom of the post, as usual. (Code is now updated for Arduino 1.0.4)
Labels:
accelerometer,
adxl345,
arduino,
code,
example,
gy-291,
i2c,
processing,
tutorial,
Акселерометр
Tuesday, November 24, 2009
Programmer and Artist? (Processing and pixlr.com discovery)
Very long time passed since my last post. Since then I have discovered more than a few interesting things but some of them will have to wait as I'm not yet proficient enough to elaborate on those. I'm going to devote this post to something that is close to my heart as an ex-animator and as a programmer - computer generated art (and relevant tools)!
Thursday, July 23, 2009
Simple PHP socket-based terminal chat
Some time ago I decided it would be interesting to write an extremely simple PHP terminal chat to try out PHP's sockets and the socket_select() function usage. If you're not in to reading, feel free to skip to the samples and/or the sources ;)
What is a socket_select() (or *_select() for that matter) you ask?
What is a socket_select() (or *_select() for that matter) you ask?
Labels:
chat,
cli,
client,
command line,
php,
select(),
server,
socket,
socket_select(),
stream_select(),
terminal
Friday, May 15, 2009
Copying programming homework
Before I start telling you the story which led me to write on this topic, I feel I'm obligated to reveal the main idea of this post:
In order to copy programming homework, you mustn't be a dumb fuck. (And a few ways to avoid being one)
And now the story. I have a colleague (let's call him John) at work who also checks programming courses homework at my college. Our college is really harsh about students copying programming homework (you can xerox algorithms homework, but programming is a big no-no).
In order to copy programming homework, you mustn't be a dumb fuck. (And a few ways to avoid being one)
And now the story. I have a colleague (let's call him John) at work who also checks programming courses homework at my college. Our college is really harsh about students copying programming homework (you can xerox algorithms homework, but programming is a big no-no).
Labels:
copying,
cs homework,
homework,
ide,
programming,
regex
Tuesday, April 28, 2009
Opening a PHP to Java socket
In a project I've been working on recently we needed to integrate a functionality we have in a few Java classes we developed in to a PHP script. If those specific classes could be wrapped in a simple command-line app, it would not have been a problem, as you can execute command-line apps from PHP easily. But! These specific Java classes took very long time to load (around two seconds!) before they could be used.
Saturday, February 7, 2009
Accessing command line from PHP code
It is sometimes necessary (or easier) to execute command line commands from within PHP code, in this post I will show an example of such usage. If you only need an über-basic example, here it is:
This little piece of code will copy the running script to newfile.php. If you're not satisfied yet, keep reading.
<?php
$thisf = $_SERVER['SCRIPT_NAME'];
`cp $thisf newname.php`;
?>
This little piece of code will copy the running script to newfile.php. If you're not satisfied yet, keep reading.
Tuesday, January 13, 2009
Setting up the terminal (Ubuntu)
My first encounter with Ubuntu happened when I started my current job. In contrast to Fedora (the Linux distribution installed in school) it was easy and stable, and for the first time I really started to appreciate Linux. When I had to pick a distro to install on my laptop for Communication Applications course the choice was pretty obvious.
Subscribe to:
Posts (Atom)