Shooting a bird flying high in the blue sky.

Do you believe in destiny? Do you subscribe to the belief that what happens, happens for good, that what bad happens, happens to avert worse from happening? Do you believe that from the point you settle on a decision till the point where you materialise upon it you are in total control of everything that is happening to you and in your life?

When life inflicts pain, yet leaves behind little hints of hope that there’s a reward waiting at the end of the painful ride, do you stop there and get off? Do you wish for a shortcut? Or do you openly ask life to bring on as much pain as it possibly can?

What do you do when you feel weak? What is your source of strength when your faith starts running low? In what do you look for when you get hopeless?

In being pessimistic, in being optimistic, in being practical, where do you draw the line?

What do you do when you have questions but no-one to ask? Where do you look for as a source of contentment when all you want to do is grab life and beat it with a club despite knowing it won’t make you any content?

Do you beg for help, support, yet quickly shun it away when you sense it coming, only because you want to suffer every bit of the pain alone?

At what point do you snap? At which point do you cease believing? At what point do you stop looking for answers?

What do you do when you don’t know what to do?

Someone I know very well once said, and painfully and rightly so, “Waiting is painful. Forgetting is painful. But not knowing which to do is the worst suffering of all.

Advertisements

Serial Port Communication on Slackware using PySerial

PySerial makes it awfully easy to interact with the serial port using Python. I am going to quickly demonstrate how to use PySerial on Slackware.

Before doing anything, ensure that serial port interrupt is enabled in BIOS. In other words, ensure serial port in not disabled. Source /etc/rc.d/rc.serial to initialise serial port(s) on Slackware after booting in like this:


   # chmod +x /etc/rc.d/rc.serial
   # /etc/rc.d/rc.serial

Install PySerial. A simple


   # python setup.py install

from within the source directory of PySerial would do. Fire up Python interactive shell (I use iPython), and use PySerial like this:


   # python
   >> import serial
   >> s = serial.Serial(
     port=0,
     parity=serial.PARITY_NONE,
     bytesize=serial.EIGHTBITS,
     stopbits=serial.STOPBITS_ONE,
     timeout=3,
     xonxoff=0,
     rtscts=0,
     baudrate=2400
   )
   >> s.write('ayaz')
   >> s.readline()

I would recommend you check out the documentation on PySerial’s homepage.