In this tutorial I will explain some of the basics of python socket programing. Let’s run the server program on beaglebone black and client program on local machine. First connect the beaglebone black to the local machine using the USB
Detect a Green Color Object with OpenCV
OK, Let’s step a little further. Let’s programme your computer to detect colors. Now you know what are the prerequisites for this purpose. Open a new file in IDLE. Import OpenCV and numpy libraries. import cv2 import numpy as
Record a video with OpenCV and python
First of all you need to install python and OpenCV on your computer. As editor I will use IDLE. (of cause you no that, do you?) Now let’s start programming. Open IDLE and take a new file. Import opencv library
Different LED lightings – Knight rider LEDs
We need installed Adafruit_BBIO.GPIO library and Python. We will use 05 LEDs for this purpose. Also, we use following general purpose pins of Beaglebone Black for this purpose. First we import Adafruit_BBIO.GPIO library and python time library. import Adafruit_BBIO.GPIO
Manipulation of Arrays in Python
In this post I will explain you how to manipulate a numpy array with python. First import numpy and pyplot libraries. import numpy as np import matplotlib.pyplot as plt Then let’s make an arbitrary numpy array. For example, let’s make
Connecting 16X2 Character LCD to Beaglebone Black
Connecting Diagram Click to enlarge. This is a summery of pin connection Beaglebone Black Pin LCD Pin P9_7 (+5V Output) One outer lead of the potentiometer, LCD pin 2 (VDD) and LCD pin 15 (LED+) P8_2 (Ground) Other outer lead
Open an URL from a python program
Open a new file in IDLE. Then type the following program. import webbrowser newTab = 2 # open in a new tab, if your browser is already opened # open a URL in your default browser url = “http://www.linoroid.com”
Work with CSV files
In this post I will explain you how to read CSV files with python. To store tabular data we use this simple type of file format. The data can be imported from and exported to CSV files using programs. The
Play a Video with Opencv
Open a new file in IDLE. Type following. The program is self explanatory. import cv2 # importing necessary libraries import numpy as np cv2.startWindowThread() # we use this thread to create a new window for our video cv2.namedWindow(“Video Player”,
Splitting a Sentence to a List
In this post I will show you how to use the split function in python. Open a python editor – as usual I will use IDLE – and type following. The program is self-explanatory. import sys MySent =