Posts tagged ‘linux’


Notes on the Raspberry Pi

OS used: debian6-19-04-2012

I wanted to be able to play with my Pi, but allow others in my household to watch TV, so I picked up a 3.5″ TFT monitor from ebay for under £15, to make use of the RCA video output.

Videos on youtube I have seen with similar monitors all seem to suffer from not being able to read the text very clearly. I was able to adjust the font size on boot by editing /etc/default/console-setup  to the largest I could find: Lat15-Terminus32x16.psf.gz.

I also found that I needed to create a /boot/config.text file containing the line: overscan_left=20, to allow me to see the left edge of the display.

Hello World in C

Create hello.c in the directory of your choice:

#include <stdio.h>
main ()
  printf("Hello world\n");

I used the joe text editor to create the file.

Then run:

make hello

and you should see the output:

cc hello.c -o hello

finally you can run the program:


and get:

Hello world


Now onto using the GPIO… I have been reading up on WiringPi, so hopefully I will be able to extract some ideas from there.

Tags: , ,

Set date and time of a Linux device from a Windows batchfile

I had a client with Linux device that whose clock is not as reliable as it should be, running a time-critical application.

As a workaround fix I wrote a Windows batchfile to update the Linux date and time, and  he has set up a windows scheduled task to run it every morning:

set Day=%date:~0,2%
set Month=%date:~3,2%
set Year=%date:~6,4%

set Hour=%time:~0,2%
set Minute=%time:~3,2%
set Second=%time:~6,2%

@C:\path_to_plink\plink.exe -ssh -pw linux_password linux_user@ date %Month%%Day%%Hour%%Minute%%Year%.%Second%

Once again I have utilised one of the free PuTTY tools (plink.exe):