Friday, September 27, 2013

Arduino PIR Motion Sensor / Detector

Make your own Arduino motion sensor / detector.  Maybe you want something to happen when you walk into a room, like have the lights turn on, or have your theme song play whenever you enter.

This tutorial will show you how to get your to Arduino sense motion around it.

Hardware used in this tutorial:

· Motion Sensor for Arduino, with wire jumpers

· Arduino board (Uno, Mega, Duemilanove, etc.)


If this is your first Arduino project, first go through our “Arduino: Getting Started” tutorial.


Use the supplied male to female jumpers to make these connections:

Motion Detector


Arduino Pin




Arduino Pin 2



Like this:


Here is the front view of the module:



Download the example motion sensor for Arduino software here, and unzip the file

    Motion sensor for Arduino, example code
    Copyright: Mark McComb, hacktronics LLC
    License: (Go crazy)

const byte ledPin =  13;    // LED pin
const byte motionPin = 2;   // motion detector input pin
byte senseMotion = 0;       // variable to hold current state of motion detector

void setup() {
  // set the digital pin directions
  pinMode(ledPin, OUTPUT);     
  pinMode(motionPin, INPUT);

void loop()
    // Now watch for burglers
    senseMotion = digitalRead(motionPin);
    if (senseMotion == HIGH) {    // burgler found!
      digitalWrite(ledPin, HIGH);
    } else {                      // no burgler, yet...
      digitalWrite(ledPin, LOW);

or copy the blue text above to motion_sensor_for_arduino.pde file.

You will now have a folder called “motion_sensor_for_arduino”

Start the Arduino software and load the Arduino Motion Sensor example program by clicking File->Sketchbook->Open

Navigate to the motion_sensor_for_arduino folder and select the “motion_sensor_for_arduino.pde” file.

Transfer the Arduino Motion Sensor program to your Arduino board by clicking the “Upload to I/O board” button. After uploading, you should see the LED on the Arduino board light up whenever there is motion detected.

It is that simple to add motion detection to your Arduino project.

Remember, it takes about 60 seconds after you first power up the motion sensor before it stars to detect motion.

You can adjust the amount of time that the motion detector lights the Arduino LED by adjusting the potentiometer screw on the back of the motion sensor module:


Happy Hacking!

Based On:

Saturday, September 21, 2013

Cisco to Huawei – Essential Command Mapping









show interfaces

display interface

Show ip route

display routing-table

Show ip interface

Display ip interface

Show version

Display version

Show ip bgp

Display bgp routing-table

Show clock

Display clock

Show port

Display port-mapping

Show flash

dir flash: (on user view mode)

Show logging

Display logbuffer

Show snmp

Display snmp-agent statistics

Show frame-relay pvc

Display fr pvc-info

Show users

Display users

Show terminal length

screen-length disable


undo screen-length disable




Super 0 (number is privilege level from 0 to 3, where 3 is default and equivalent to “enable” on Cisco)

Conf t






Show policy-map interface

Display qos policy interface


send (on user view mode)

write terminal (sh run)

display current-configuration

Sh startup

Display saved-configuration

[no equivalent: shows the files  used for startup]

Display startup

Write erase

Reset saved-configuration

Write mem (or wr or copy run  start)


clear counters

reset (on user view mode)


Reset counters interface





Enable secret (conf mode)

Super pass cipher (system mode)

Term mon

term debu





debug / no debug

debugging / undo debugging

copy running-config

Save safely

terminal monitor

terminal monitor

terminal length

screen-length disable


undo screen-length disable

terminal no monitor

undo terminal monitor

clear counters

reset counters interface

clear interface

reset counters interface

clear crypto

ipsec sa


ike sa

clear access-list counters

reset acl counter all






boot bootrom


hwtacacs scheme

terminal no monitor

undo terminal monitor


hwtacacs scheme (in conf  command)


tftp-server (in conf command)

router bgp


Router rip


ip tacacs

hwtacacs nas-ip (this  command doesn’t exist !!!)


Mtu (this command doesn’t exist !!!)

clear ip cef

reset ip fast-forwarding

clear ip route *

reset ip routing-table statistics protocol all

Clear ip bgp

Reset bgp all

Show tech

display diagnostic-information

Sh ip nat translation

Display nat session

Show Controller

display controller (but not relevant for non-modular chassis)

show dsl int atm 0

display dsl status interface Atm 2/0

sho atm pvc

Display atm pvc-info

debug pvc nego

Debug atm all (very dangerous – might crash router)

sho crypto isakmp sa

Display ike sa

sho crypto isakmp key

Display ike peer

sho crypto isakmp police

Display ike proposal

Taken From :

Monday, September 9, 2013

Step 2 - Sony Xperia Arc S - Howto Install Clockworkmod


So you have rooted your Sony Xperia Arc S and now want to flash a custom ROM? It’s definitely possible. But in order to do that, you’re gonna need a custom recovery, preferably ClockworkMod Recovery to allow installation of such ROMs and Mods. While the recovery provides options to flash new ROMs, it also lets you make backups of your current ROM to share with your friends or maybe use it to restore your device to the working condition if you’ve messed up with it. This guide shows how you can install ClockworkMod Recovery on your Xperia Arc S device and enjoy a whole new world of custom ROMs!

I. Before You Begin:

1. You must have rooetd your device before doing this procedure. Check out our procedure on Step 1 - Sony Xperia Arc S - Howto Root to root your device.

2. This works on Windows based PCs only.

II. Downloading Required Files:

1. RecoverX (Download link’s given in the first post)

RecoverX Mirror

III. Installing ClockworkMod Recovery on the Sony Xperia Arc S:

1. Place the RecoverX Tool archive onto your Desktop.

2. Unzip files from the archive over to your Desktop.

3. Enable USB debugging on your device by going to Menu>>Settings>>Developer options>>USB debugging.

4. Connect your device to your PC using the USB cable.

5. Double-click on the RecoverX’s executable file and it’ll launch.

6. Select Sony Ericsson from Brand dropdown menu in the tool.

7. Select Xperia Arc S from the Device dropdown menu.


8. Now hit the Next button and it’ll start flashing the recovery on your device.






9. Follow any prompts you see on your screen.

10. Once it’s done, reboot your device.

11. You’re all set! Excellent! Your Xperia Arc S has been successfully equipped with CWM Recovery and you now have endless possibilities to customize your device!

12. To access the clockworkmod menu, reboot you phone and while it’s booting, press “volume down” many times until you get the clockworkmod menu.


Based On:


Alternative Method (On Your Phone)

  1. 1.Enable “USB Debugging” (Menu>>Settings>>Developer options>>USB debugging)
  2. On you phone go to “Google Play
  3. 2. Search for “X-parts
  4. 3. Install “X-Parts
  5. 4. Run “X-Parts
  6. 5. On “X-Parts” go to tab “Installs”
  7. 6. “X-Parts” will check te internet for a clockworkmod for your, if it finds the option “Install CWM” will appear
  8. 7. Select the option “Install CWM”
  9. 8. Wait, and it should be done
  10. 9. To access the clockworkmod menu, reboot you phone and while it’s booting, press “volume down” many times until you get the clockworkmod menu.


How Root and Install Custom Roms on Xperia Arc S

Step 1 - Sony Xperia Arc S - Howto Root

Root the Sony Ericsson Arc S (LT18i) with Android 4.0.4 ICS (Official Firmware)


This tutorial is intended for Sony Ericsson Arc S smartphones with Locked Bootloader .

Follow the steps that are on this page to check if the Bootloader is locked or not .

First check if you have the the Sony PC Companion (USB Drivers) installed so that you can the smartphone the PC , if they are not download here

Now let´s begin the process :

1 - The USB debugging option must be Enabled ( Settings / Developer Options / USB debugging ).

2 - The smartphone battery should be at least 80 % -85 % .

3 - Backup the data you have on your smartphone, just in case something goes wrong .

4 - Download FlashTool for Xperia Arc S and install on your PC here

5 - Download DooMLoRD_v1_Xperia-2011-ICS-ROOT-emu-busybox-su to your PC and extract with Winrar for example here

6 - Now download the kernel Android 4.0.3 (LT18i_4.0.3_kernel.ftf) here and Android 4.0.4 (Lt18i_4.1.b.0.587_kernel) here

7 - Connect your smartphone to your computer

8 - Drag the Android kernel 4.0.3 into the folder " firmware " which is located inside the Flashtool folder (C :/ Flashtool / firmwares ), open the FlashTool and follow the steps as in the images below:





In the image below is the list of firmwares that are in the Flashtool , select LT18i_4.0.3_kernel what it says and then just push “Flash” and wait for it to be installed on the smartphone .





The smartphone will restarting during this process .

9 - The USB debugging option must be Enabled ( Settings / Developer Options / USB debugging ).

After the smartphone to be powered back on, do the following:

  • Enable the “USB Debugging” (Settings / Developer Options / USB debugging)
  • Enable the "Unknown Sources" (Menu\Settings\Security),
  • Run the file " runme.bat " we extracted in step 5 . The smartphone will restart 2 or 3 times, as part of the process .



Full procedure output:


10 - Now this process is similar to the step 8 , we drag the Android 4.0.4 (Lt18i_4.1.b.0.587_kernel) to C:/Flashtool/firmwares and do the same thing that was done in step 8.




In the image below selects what it says Lt18i_4.1.b.0.587_kernel and then just push “Flash” and expect it to be installed on the smartphone.

The smartphone will restarting during this process .




11 - If all has gone well , you now have your Sony Ericsson Arc S with Root

If PC Companion asks you to update just ignore.

If you update your phone will go back to the original stock rom (no root, no clockwork mod)


Based On:

How Root and Install Custom Roms on Xperia Arc S

Tuesday, September 3, 2013

RAM Disks - Explained

Your computer’s RAM is still faster than even modern solid-state drives. RAM disks take advantage of this, using your computer’s RAM as a lightning-fast virtual drive. But you probably don’t want to use a RAM disk, anyway.

RAM disks are easy to sell — all you have to do is hold up performance benchmarks showing how much faster it is to read data from RAM than it is from even a fast SSD. But this isn’t the full picture.

What’s a RAM Disk?

To create a RAM disk, you would install a third-party program that creates a virtual drive in Windows. This program would reserve a section of your RAM — so if you had 4 GB of files in your RAM disk, the disk would take up 4 GB of RAM. All the files on your disk would be stored in your RAM. When you wrote to the disk, you’d just be writing to a different section of your RAM.

Initially, this seems like it could help optimize performance. If you installed programs in a RAM disk, you’d have near-instant load times because their data would already be stored in the fastest memory possible. When you save a file, it would happen almost instantly as it would just be copied to another portion of RAM. This would mean faster application load times and faster file read/write times for files saved in the RAM disk.


Why You Probably Shouldn’t Use One

However, there’s a big problem here. RAM is volatile memory. When your computer loses power, the contents of your RAM will be erased. This means that you can’t store anything important on a RAM disk — if your computer crashed because of lost power, you’d lose all the data in your RAM disk. So saving files to the RAM disk is pointless unless you don’t care that you’d lose the files — but if you didn’t care about the files, why save them in the first place?

Because RAM isn’t persistent, you’d also have to save the contents of your RAM disk to disk when you shut down your computer and load them when you turn it on. For example, let’s say you installed Photoshop to your RAM disk. You’d have to save an copy of your RAM disk to your computer’s hard drive to ensure you wouldn’t lose your Photoshop installation. You may want to do this automatically every few minutes or just at shut down.

When you turn on your computer, the RAM disk program would have to read the RAM disk image from your hard drive and load it back into RAM. In other words, you’re simply getting faster program-load times at the expense of longer boot-up times. Once your computer loads an application or other files form its hard drive, it caches them in RAM anyway — so it’s a bit silly to install an application or game in a RAM disk rather than on your hard drive. Either way, once you load the application, it will stay present in your memory for quick loading later.


RAM disks also reserve a good chunk of your memory, ensuring you can’t use it for anything else. Windows uses unused memory to cache files anyway, and it does it all automatically and in the background. If you need the memory for something, Windows will instantly discard the cached data. With a RAM disk, you’d have to shut it down manually to free up memory.

How You Would Make a RAM Disk

Making a RAM disk is pretty simple. Install a program like DataRAM’s RAMDisk Personal — the free version allows you to create RAM disks up to 4 GB in size — and use it to create a new RAM disk.

You can then install programs to it or move files to it. You’ll want to save a copy of the RAM disk so you won’t lose the data if your computer ever goes down. Of course you’ll have to save a new image every time you update the files on the RAM disk.


There Must Be Some Uses For a RAM Disk, But…

RAM disks aren’t a complete scam like PC cleaning programs and many other “system-optimization” tools are. It’s definitely faster to read and write from RAM rather than to use even a fast SSD. There are likely some good uses for RAM disks if you really know what you’re doing.

However, both of the following would have to be true:

· You’d have to be using a program doesn’t normally use RAM as a cache and instead insists on reading and writing small files to your hard drive.

· You’d have to not care about any of these files and have no problem if you lose them.

This is a high bar to clear — most programs that have a cache you don’t necessarily care about will use RAM, anyway. For example, there’s no point in placing Photoshop’s scratch file on a RAM disk because Photoshop uses RAM as a cache if it’s available. Your web browser will store its cache files in RAM if there’s space, too.

For programs that do write and read data from the hard drive, this data is likely something you don’t want to lose. Using a RAM disk with an important database would be a mistake because you’d lose the database if a crash or power loss occurred.

RAM-Based Solid-State Drives

If you do want to benefit from the speed of RAM, you may want to try investing in a RAM-based solid-state drive. These are solid-state drives that contain RAM instead of typical Flash memory. They’re much faster to read and write to, but also much more expensive because RAM is more expensive than Flash memory.

Such drives contain a battery, so they can maintain the contents of the RAM if the computer loses power. They  have enough battery power to write the data to offline memory, ensuring you won’t lose whatever you stored in their RAM.

Such drives aren’t for the average user — they’re extremely expensive options intended for data centers and other business uses where you want the speed of RAM with the stability of SSDs. But these drives make much more sense than software RAM disks if you really need RAM-like speeds for mission critical purposes.

In summary, RAM disks do work as advertised. But you probably don’t want to use them, anyway. They’re not ideal for running an important database or speeding up game load times.

If you do have a smart use for a RAM disk, leave a comment — we’d like to know what people are actually using them for.

Taken From: