USB motion sensor (PIR) to activate monitor

I have an always on net-book for weather forecast (yeah, when paragliding, you need it)
It basically displays a full screen custom web-page with time and date.

Its always on, not really good for the back-light and energy consumption.

So I got the idea of plugging a PIR sensor to wake up the screen when someone approach it.

Take an Arduino Micro Pro (8€ for the Chinese version), a PIR sensor from eBay (2€), a Hammond case (1€) and an USB A male from scrap (0€).

Let’s give a try, with a basic wiring, and this sketch to emulate keyboard thanks to it’s USB HID, the Arduino Micro Pro is a must.

Updated 05-01-2017:

  • code with USB wakeuphost and capslock instead of ctrl
  • green TX led always on
  • orange RX led only on motion
#include <Keyboard.h>

int sensorPin = 10;
int RXLED = 17;  // The RX LED has a defined Arduino pin
static bool sensor_previous_state = false;

void setup()
  pinMode(sensorPin, INPUT);  // PIR sensor pin as input
  pinMode(RXLED, OUTPUT);     //  RX LED as an output
  digitalWrite(RXLED, HIGH);  //  RX LED off
  TXLED0;                     // switch on TX green to show init/powered up (only available by macro)
  sensor_previous_state = digitalRead(sensorPin); // get sensor initial state (can be already true)

void loop()
  bool sensor_current_state = digitalRead(sensorPin);
  if ( sensor_previous_state == false   // looping until we detect a rising edge
       && sensor_current_state == true) {// when sensor state is trigged, it takes about 20 sec to recover
    digitalWrite(RXLED, LOW);   // set the LED on
    USBDevice.wakeupHost(); KEY_CAPS_LOCK );
    Keyboard.release( KEY_CAPS_LOCK );
    TXLED0;                     // great hackery in this: we have to force down the TXLED
    delay(1000);                  // wait a bit for the led
  } else {
    digitalWrite(RXLED, HIGH);    // set the LED off
  sensor_previous_state = sensor_current_state;
2017 update: lightguide for green and orange LEDs:
Update with LED (lightguide from scrap)
And voila!
Quite nice, discrete and works very well, for about 10€/$.

Ubuntu 9.04 on eeePC 901

Just a outlook on the new Jaunty

Pretty sleek and flawless for an eeePC 901, everything work:




-hotkey (but the wireless/bt)


Hot stuf:

26 second with 2Gb ram on a Atom 1.6, wifi connected.

Not bad, closer and closer to the Xandros (16s) and WinXP(24s)
First OpenOffice 3

Janitor: to clean and remove old and non-used packages


Very important: my claimed bug: selectable network’s information


But huge disappointment: cannot resize nor rotate pics in nautilus:


Anyway, this new version, once again sounds promising. Stay tuned for tip and tricks.

Wireless (Vlan or Wifi) problem solved on Eee PC 701 running Ubuntu 8.10

From now ( 1/11/2008) wireless doesnt work out of the box.

To solve this issue:

First, disable closed source drivers:

System > Administration > Hardware Drivers: Desactivate Support for Atheros 802.11 wireless Lan cards

Then in terminal

sudo apt-get install linux-backports-modules-2.6.27-7-generic
(complete with tab with smth ending with generic to select the good kernel if the package doesnt exist)

Reboot, and voilà!

You can also get a better experience with Hotkey, webcam and sound working by installing the custom kernel, especially deseigned for Epc:

Encrypted ReiserFS filesystem check How-To

I’ve a notebook with an encrypted flash memory (SD card) used as my home folder.

I use lucks crypto with dm-crypt under Ubuntu.

This works quite nicely, I mean just click on the card reader and a window ask you for your password.

But as I never unmout it, even if reiserfs is meant to be uncorructible, I got a wird error on my  Pigdim folder.

error reiserfs

This redfile comes from either the flash corruption or the reiserfs file system.

So to correct this problem i did:

Check in gparted ( System, Admini, Partition editor)


Note the name of the partition and the mountpoint.

sudo umout /media/Sdcrypt

sudo reiserfsck –check /dev/mapper/luks_crypto_cc8b0c71-6096-4f5e-a4e5-4d18dcc27132

sudo reiserfsck –check –rebuild-tree /dev/mapper/luks_crypto_cc8b0c71-6096-4f5e-a4e5-4d18dcc27132

sudo reiserfsck –check /dev/mapper/luks_crypto_cc8b0c71-6096-4f5e-a4e5-4d18dcc27132

Then my trouble was gone. It rebuilt the file tree and remove the corrupted file. Dont forget to save all your file first.

Wifi/VPN accès internet à l’université (Nomadisme) et Ubuntu/Xandros

Avoir internet partout, c’est bien, mais le wifi nécessite quelques rajouts de sécurité.

C’est donc ainsi qu’a l’UJF (Université Joseph Fourier, Grenoble), l’internet est dispo sur tout le campus, au prix de l’installation et l’utilisation d’un client vpn cisco.

Ce topic traitera donc de l’utilisation du client VPN sous Ubuntu/Kubuntu/Xandros.

En tant qu’étudiant, vous avez du recevoir une feuille explicative du comment utiliser cette connexion, et linux est meme proposé sur la page :

Seulement, ca me dérange de promouvoir linux et de continuer à demander aux genrs de compiler…..

Surtout qu’un client est dispo en package .deb

  • Pour Ubuntu/Gnome et Kubuntu/Kde: (voir ici pourquoi)

sudo apt-get install network-manager-vpnc

  • Pour EEE PC/Xandros:

suivre le guide présent ici pour les dépot Xandros

et taper :

sudo apt-get install vpnc

  • Pour Ubuntu/Gnome et Kubuntu/Kde: dans le network manager, vous pouver rajouter une connexion VPN de type Cisco.

Ensuite il vous demandera votre login et le passgroup, qui peut etre extrait du fichier .pcf fourni par l’université avec :

cisco vpnclient password decoder dans le lien fourni, vous avez le bon passgroup pour l’UJF.

Pour le lancer il ne reste plus qu’a cliquer sur network manager, connexion vpn et votre nouvelle connexion fraichement crée.

  • Pour EEE PC/Xandros:

Suivre le topic que j’ai crée ici:

Il n’y a plus qu’a rajouter un racourci sur le bureau et c’est tout bon. (de cette commande: kdesu /etc/vpnc/vpn

A derniere chose, ne pas oublier non plus de changer de proxy, pourquoi ne pas installer SwitchProxy dans firefox pour faciliter la tache?

Have fun.