Posts from the ‘misc’ Category
HTC Desire HD stand and battery charger
Just a quick post to mention how much I am enjoying using a dock for my phone. It only cost ~$19 avaliable on dealextreme, it comes with a EU plug (US version avaliable too) but I’m just using it via usb.
What’s that awesome live wallpaper? It’s the latest beta of nexus revamped! This dock has been really useful for development of this livewallpaper, so handy/convenient.
Fun with LED’s and liquid nitrogen
Working in a physics department has it’s perks. Below shows an orange LED changing colour as it is submerged into liquid nitrogen.
Many thanks to my house-mate for letting me play with liquid nitrogen and try this out.
I have been quite pleased with my previous microscope but I decided to buy a slightly better one from dealextreme as double the magnification was available for only a slightly higher cost.
product link) It only cost $48.20 USD (about £31.27 GBP) only $8 than my previous microscope that could only achieve 200x!
Quick Review
Advantages
- Large dynamic zoom range (labelled 20x – 400x)
- Easy to setup (plug and play)
- Can take some awesome photos, see below
- Variable illumination settings (using a wheel at top)
- Rubberised casing gives better grip and good overall feel
- Much improved build quality over the digimicro
- Stand is sturdy and can hold camera still in place
Comparison to the digimicro
Magnification measurement
The images are taken with the edge of the camera case pressed right up against the ruler. You could probably remove casing to increase zoom slightly, or create a slot to slide a microscope slide into it. The camera has two focuses the first:
And the second (maximum zoom):
6mm displayed over 170mm: zoom ~ 30x
0.5mm displayed over 180mm: zoom ~ 360x
This isn’t far off the specified 20x – 400x so I am happy! (Note: Measuring magnification level is rubbish as it depends on screen the image is viewed on, so viewing it on a projector would make the statistics seem more impressive.)
The minimum zoom is less than this as we can move the camera further from the object
Setup in Linux
The beauty of this webcam is that it requires no installation with ubuntu 10.04 you simply need to run the software and the camera works! woo! The output of `lsusb` shows the device as:
Bus 001 Device 004: ID 0ac8:3610 Z-Star Microelectronics Corp.
Software
Most video programs will pick up the device, I am opting to use a program called cheese which is awesome not only because of the name but also because of its simplicity.
sudo apt-get install cheese
Bonus Picture
This is a photo of the pixels on a nexus one phone to show the pentile pixel layout
As before any requests for microscope images (within reason) will be considered
Best spam comment ever
Just noticed this little beauty sitting in my comment spam, found it hilerious so I thought I’d share it:
HELP! I’m currently being held prisoner by the Russian mafia xyzrxyz penis enlargement xyzrxyz and being forced to post spam comments on blogs! If you don’t approve this they will kill me. xyzrxyz penis enlargement xyzrxyz They’re coming back now. Please send help!
Needless to say I’ve purchased several penis enlargement kits to ensure this persons safety.
Information
Author : penis enlargement (IP: 213.5.67.159 , hosted-by.altushost.com)
E-mail : mattcut90@gmail.com
URL : http://www…….. Censored………..com
Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=213.5.67.159
IP address lookup
Borderlands hidden QR codes
I found an easter egg in borderlands:
So I used a barcode reader on my Nexus One
Plaintext:
NICK WILSON
HO OH
However I am not the only person to have spotted this, unsurprisingly really as I’m almost half a year late on starting the game. There are several QR codes hidden as shown in this wiki page and someone else went to the pain-staking task of copying out this QR code pixel-by-pixel rather than using a QR scanner or image software, crazy!
Whilst working on this post I managed to get some sexy shots of pixels in focus from my TFT screen under the microscope.
Microscope images of my eye (by request)
More microscope image of eyes were requested (by Benjie), trying to focus more on the detail of the eye by using external illumination. Unfortunately the camera has some colour problems when not using the built in LEDs, possibly because it attempts compensates for the lack of illumination. Hopefully I am not in danger of someone cloning my retinal scan to gain access to my confidential files.
I’ve heard a lot about CUDA, such as how it is 10,000% faster at cracking wireless passwords over a conventional program/hardware, but never really got around to testing it out before now. This post details the steps required to compile and setup CUDA 2.3 SDK and toolkit on ubuntu 9.10.
Downloads
You are required to have an Nvidia graphics driver (relatively new version) already installed. First download the CUDA toolkit and CUDA sdk from the Nvidia CUDA 2.3 download page.
Install the toolkit
# Make file executable chmod +x cudatoolkit_2.3_linux_64_ubuntu9.04.run # Run it as superuser sudo ./cudatoolkit_2.3_linux_64_ubuntu9.04.run
You now need to edit your .bashrc file in your home directory to include the paths (so your CUDA binaries can be found by the system)
export PATH=${PATH}:/usr/local/cuda/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
Note if you are using 32bit then “lib64″ should be replaced with just “lib”
Install the SDK
# Make file executable chmod +x cudasdk_2.3_linux.run # Run it as normal user ./cudasdk_2.3_linux.run
You should now have a NVIDIA_GPU_Computing_SDK folder in your home directory. Change directory into the C folder inside this one.
cd NVIDIA_GPU_Computing_SDK/C
In this folder is a make file which will compile all the Nvidia SDK and all the demos, in order for this to work in ubuntu 9.10 (x64) you will need to install several dependencies. By installing these before attempting to make will save you a lot of time, if you are getting errors please scroll down to the problems section to see if they are already covered.
# Install the necessary libraries sudo apt-get install freeglut3 freeglut3-dev libx11-dev mesa-common-dev libxmu6
Making and running demos
You can then run the make command, once this is ran all of the executables will be placed in NVIDIA_GPU_Computing_SDK/C/bin/linux/released . We can check that our computer has an useable CUDA device install by running the deviceQuery program:
cd ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/released ./deviceQuery
This should output something similar to the following:
# ./deviceQuery CUDA Device Query (Runtime API) version (CUDART static linking) There is 1 device supporting CUDA Device 0: "GeForce GTX 260" CUDA Driver Version: 2.30 CUDA Runtime Version: 2.30 CUDA Capability Major revision number: 1 CUDA Capability Minor revision number: 3 Total amount of global memory: 938803200 bytes Number of multiprocessors: 27 Number of cores: 216 Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 16384 bytes Total number of registers available per block: 16384 Warp size: 32 Maximum number of threads per block: 512 Maximum sizes of each dimension of a block: 512 x 512 x 64 Maximum sizes of each dimension of a grid: 65535 x 65535 x 1 Maximum memory pitch: 262144 bytes Texture alignment: 256 bytes Clock rate: 1.47 GHz Concurrent copy and execution: Yes Run time limit on kernels: Yes Integrated: No Support host page-locked memory mapping: Yes Compute mode: Default (multiple host threads can use this device simultaneously) Test PASSED
Now that we can see CUDA is successfully installed and a suitable device is found we can run some of nvidia’s more ascetically pleasing demos:
./fluidsGL
./smokeParticles
./particles
./postProcessGL
Problems
libxi (Nvidia forum link) make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common' make[1]: Entering directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common' In file included from ./../common/inc/paramgl.h:24, from src/paramgl.cpp:19: ./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory make[1]: *** [obj/release/paramgl.cpp.o] Error 1 make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common' make: *** [lib/libparamgl.so] Error 2
sudo apt-get install freeglut3 freeglut3-dev libx11-dev mesa-common-dev
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitf(float)’ cannot be declared weak /usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitl(long double)’ cannot be declared weak /usr/include/bits/mathinline.h:36: error: inline function ‘int __signbitf(float)’ cannot be declared weak /usr/include/bits/mathinline.h:42: error: inline function ‘int __signbit(double)’ cannot be declared weak /usr/include/bits/mathinline.h:48: error: inline function ‘int __signbitl(long double)’ cannot be declared weak /usr/local/cuda/bin/../include/math_functions.h:442: error: inline function ‘int __signbitl(long double)’ cannot be declared weak make[1]: *** [obj/release/particleSystem.cu.o] Error 255 make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/src/particles' make: *** [src/particles/Makefile.ph_build] Error 2
The problem is due to having gcc 4.4 installed rather than 4.3, it is possible to install the older version of this compiler but it is simpler to modify common/common.mk and add the following extra flag (Nvidia forum link):
# Change: NVCCFLAGS += --compiler-options -fno-strict-aliasing # To: NVCCFLAGS += --compiler-options -fno-strict-aliasing --compiler-options -fno-inline
and change the -O2
# Change: COMMONFLAGS += -O2 # To: COMMONFLAGS += -O0
The two remaining errors you may encounter are very similar and arrise from missing libraries:
libxi (Nvidia forum link)
/usr/bin/ld: cannot find -lXi collect2: ld returned 1 exit status make[1]: *** [../../bin/linux/release/particles] Error 1
sudo apt-get install libxi-dev
libxmu (Nvidia forum link)
/usr/bin/ld: cannot find -lXmu collect2: ld returned 1 exit status make[1]: *** [../../bin/linux/release/particles] Error 1
sudo apt-get install libxmu-dev libxmu6

























