TechnoLabsz: November 2012

TechnoLabsz — Exploring New Technology

Welcome to TechnoLabsz, a blog devoted to discovering emerging technology across OpenCV, robotics, programming, electronics projects, GNU/Linux, Arduino, computer topics, Python, hacking and mobile phones. Follow along and stay curious about what's next.

RSS feed icon for TechnoLabsz
Subscribe via RSS
Twitter icon
Follow on Twitter
Facebook icon
Join on Facebook

Twitter Facebook

Browse by Topic

Popular Posts

Eye blink detection preview
Eye blink detection with OpenCV
Cubieboard board
Cubieboard
Learning Robotics using Python book cover
Learning Robotics using Python
mbed NXP LPC1768 board
mbed ARM board
Social robot project illustration
Social robot project
XAMPP and CMS configuration screenshot
XAMPP and CMS setup
C++ pointer to function example
C++ function pointers

How to open and close a process from a python script

Wednesday, November 21, 2025

Here's a quick idea for launching and stopping a process from within a Python script. This comes in handy whenever you need to start a program that lives outside the script you're currently running. The example uses two scripts: a master script that launches a slave script, and the slave script, which runs continuously for up to five seconds before the master terminates it.

Master script

#!/usr/bin/python
import time
import subprocess
#starting process python while.py
proc = subprocess.Popen(["python","while.py"],shell=False)
#5 sec delay
time.sleep(5)
#killing process
subprocess.call(["kill","-9","%d" % proc.pid])
#waiting for killing
proc.wait()
print 'poll = ',proc.poll()

Slave script

#!/usr/bin/python
while 1:
print "hello"

Output

It will print hello up to 5 seconds, after which it stops and shows this message.

Screenshot of the Python process script output
Script output

Posted by Lentin Joseph — 0 comments

Email This BlogThis! Share to X Share to Facebook

Labels: Python

Controlling Android Phones using Python and Linux

Sunday, November 4, 2025

This is a brief tutorial on controlling an Android phone from a PC over Wi-Fi using Python.

Prerequisites on the Android phone

  • Wifi ADB Application: a tool for doing Android debugging over Wi-Fi. See the previous tutorial about Wifi ADB.
  • SL4A and Python for Android.

Prerequisites on the PC

  • Ubuntu 12.04

Procedure

  • Start Wi-Fi ADB using the tutorial above.
  • Start a private server using SL4A.

Read more »

Posted by Lentin Joseph — 0 comments

Email This BlogThis! Share to X Share to Facebook

New Arduino DUE

Thursday, November 1, 2025

There's a newcomer in the Arduino board series: the Arduino Due. Its standout feature is an ARM-based controller.

Technical Specification

  • Microcontroller: AT91SAM3X8E
  • Operating Voltage: 3.3V
  • Input Voltage (recommended): 7-12V
  • Input Voltage (limits): 6-20V
  • Digital I/O Pins: 54 (of which 12 provide PWM output)
  • Analog Input Pins: 12
  • Analog Outputs Pins: 2 (DAC)
  • Total DC Output Current on all I/O lines: 130 mA
  • DC Current for 3.3V Pin: 800 mA
  • DC Current for 5V Pin: 800 mA
  • Flash Memory: 512 KB
  • SRAM: 96 KB (two banks: 64KB and 32KB)
  • Clock Speed: 84 MHz
Arduino Due board
Arduino Due

Posted by Lentin Joseph — 0 comments

Email This BlogThis! Share to X Share to Facebook

Books by Lentin Joseph

Mastering ROS for Robotics Programming book cover
Mastering ROS for Robotics Programming

Second book in Robotics: Mastering ROS for Robotics Programming. New book: Learning Robotics using Python.

About Me

Profile photo of Lentin Joseph
Lentin Joseph

Lentin Joseph — Kochi, Kerala, India. I am very interested to know about the new technology.

View my complete profile

Labels

Blog Archive

  • 2017 (1) — March (1)
  • 2016 (1) — July (1)
  • 2015 (2) — December (1), May (1)
  • 2013 (9) — September (1), July (2), June (1), May (1), March (3), January (1)
  • 2012 (77) — November (3), September (10), August (21), July (20), June (3), May (3), April (7), March (6), February (4)
  • 2011 (49) — October (8), September (10), August (31)

Stay Connected

Email icon
Email
TechnoLabsz visitors graphic
Visitors

Home Comments Comments Comments

Copyright (c) 2011 TechnoLabsz. Designed by Deuter Store and web hosting, Premium Wordpress Themes, PA Title Insurance.