Installing OpenCv on the Pi3 with python3 (and usb webcam)

opencv is one of the most difficult python package to install. it’s not a pip install easy package issue. in this post, we’ll see how to painlessly install it. Target Os we are using noobs see here Target Pi pi3 Existing Instructions there are two posts which i found to be nice : [pyimagesearch] and… Continue Reading Installing OpenCv on the Pi3 with python3 (and usb webcam)

  •  
    1
    Share
  • 1
  •  
  •  
  •  
  •  

Raspberry-Pi setup – part 2 : establishing ssh connection

establishing an ssh connection is incredibly useful to manage your pi from another device/remotely be it your android phone or pc Steps connect the pi to the internet locate pi start ssh connection connect the pi to the internet using a two endpoints network cable, connect the pi to your router, or if you have… Continue Reading Raspberry-Pi setup – part 2 : establishing ssh connection

Fixing an issue of tkinter tags overlapping

If you’ve worked with tkinter’s Text widget, you may notice that when you add many tags to it sometimes things get messed. So let’s dive right into this. We will use syntax highlighting as an example. Explaining our goal Consider we have the following code, from tkinter import * class Files(Frame):     def __init__(self, parent):         Frame.__init__(self,… Continue Reading Fixing an issue of tkinter tags overlapping

Raspberry-Pi setup – part 1 : OS installation

In this post we’ll cover the software setup part. The raspberry pi is an empty computer, empty of peripherals and os. the first step is to install the os. Target Model raspberry pi 3 Needed sd card at least 8gb hdmi cable monitor charger usb mouse usb keyboard only power and hdmi cable + monitor… Continue Reading Raspberry-Pi setup – part 1 : OS installation

translating location to map coordinates

translating location to map coordinates

let us say you have a character moving across the screen, and you want to have it’s location in terms of the map coordinate like (0,0), (3,2) instead of the actual location, like if you want to generate some obstacles in his path, here’s how you do it : demo move the mouse and see… Continue Reading translating location to map coordinates

generating unintelligent random maps on mouse press

this code generates random maps on mouse press. it is really just a simple 2d array value filling. a modification of this article. demo explanations   def random_map():     for r in range(map_length):         for c in range(map_length):             game_map[c][r] = random.randint(0,1)   here we generated a random map by looping and assigning a random value. randint returns a value… Continue Reading generating unintelligent random maps on mouse press

game map rendering

game map rendering

game map rendering or simply map rendering is a nice technique that is used to generate worlds. explanations follow suit : demo explanations   game_map = [         [0,0,0,0,0],         [0,1,0,1,0],         [0,0,1,0,0],         [0,1,0,1,0],         [0,0,1,0,0],         ]   first we initialise our world as a 2d array, we distinguished patterns by using 0 and 1   tile_width = 50   next we initialised… Continue Reading game map rendering

polygon drawer implementation (processing.py)

polygon drawer implementation (processing.py)

if ever you wanted to implement a polygon drawer, here it is : explanations   nodes = [     [50,40],     [40,50]   ]   first we added some coordinates as 2d arrays       for i,node in enumerate(nodes):         try:             line(nodes[i][0], nodes[i][1], nodes[i+1][0], nodes[i+1][1])         except:             pass   then for each coordinate we drew a line from it to the next, the… Continue Reading polygon drawer implementation (processing.py)

Automate The Boring Stuff with Python

it is free to read here it is a renowned book in the python world it teaches some intro before moving on to apps it is not  a complete beginner book the use of 3rd party libs is duly highlighted the approach to program designing is good if you completed all the projects in the… Continue Reading Automate The Boring Stuff with Python