Posts From The Art of Technology
PIC10F322 and XC8 Code – Internal Temperature Sensor – Creative Use Seed Random Number Generator
In the pervious post - we setup the PIC10F322 ADC to read the Internal Temperature Sensor. Mostly the sensor is used to monitor the die to ensure that it is operating within its limits of thermal rating. In enclosed products, the microcontroller’s internal temperature can be monitored for protection of other...
PIC10F322 and XC8 Code – Internal Temperature Module – How To Read
The PIC10F322 is equipped with a temperature indicator module designed to measure the operating temperature of the silicon die. Why is it there - What is the use monitoring the die? It is useful to monitor the temperature of the silicon die of the microcontroller to ensure that it is operating within its...
Image Processing – Python and OpenCV – Capture Image From Webcam
Let's take a quick look on how we can use OpenCV2 to capture a single frame from a webcam. The code below uses a web cam to capture a single frame, that stores the results in the image variable. We are using direct show to communicate with the cam and adjust the captured image size. Once an image is capture it will...
Z80 – Pinouts
Z80 Pinouts CPU View Z80 CPU Pinout Grouped by Function Z80 CPU Pinout Signal Functions {Address Bus} A0-A15 - Address bus output tri-state (active High) 16bit Address Bus, provides address for memory data exchanges (up to 64K) and for IO device data exchanges. For IO devices, only the eight lower addresses for 256...
Z80 – CPU Intro
The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The Zilog Z80 is a software-compatible extension and enhancement of the Intel 8080 and, like it, was...
Image Processing – Python and OpenCV – Convert Image to Gray Scale
In the past posts we looked at doing some image conversions using arrays and manual steps. All that is fun, it lets us see what is going on inside the black box. However, deadlines and everything else - we don't want to have to reinvent the wheel each time. Thankfully there is a powerful image library out there...
Image Processing – Python Generating a Histogram for a Gray Scale Image
What is an image histogram - it is a profile of the occurrences of each gray level present in an image. In the visual example below - we are using a bar graph to visualize it. It starts at 0 and goes to 255, each vertical bar represents the number of times the corresponding gray level occurred in the image. Histogram...
Image Processing – Python Convert Image to Gray Scale – Single Color Channel
In the last post we took a look at averaging the RGB channels to produce a gray scale image. It does require some math division to get the result. If you need a way that is even simpler and faster than averaging - we can extract the values from one of the color channels only. This method requires no calculations. All...
Image Processing – Python Convert Image to Gray Scale – Average
Let's us look at some ways of converting a color image into a black and white or gray scale image. The most straight forward approach is averaging the three color channels, RGB. GrayValue = (Red + Green + Blue) / 3 You do this for every pixel. It is quick and dirty. And produces an ok grayscale image. And for what we...
Image Processing – Python Read Image File and Convert into an Array
There are a tons of image already - instead of going though the pain staking process of creating by hand our own images, I am going to use an image I already captured. And yes, it is of my three cats. I am also adding to the collection of cat images on the internet. Here is the image below - feel free to use it in...
Image Processing – Color Image Arrays
Up to this point we have been dealing with Black and White images or Gray Scale images - that can be represented by a 2d array. Array(height, width) In which each element in the array represents one pixel and the level of gray, with 0 being black and 255 being white. A color image is made up of a combination of three...
Image Processing – Memory Usage
Something to consider is the memory usage for the images that you will be processing. Given a 100x200 image - black and white. That 100x200 array takes up roughly 20K of ram. If it is a color image, it would be 3 times that - because each color channel (RGB) is stored. Again, we are talking about RAW image data -...
Microchip PIC10F322 Resources
Python Code – Convert Text File Into an Image
Here is a little fun. Some Python code that will take a text file and turn it into an image. When I say, turn it into an image - I don't mean it will read the text file and make some image from it that we could look at and say… oh the ocean. What it does it convert the characters into their ASCII number, makes an...
Python Code – Create A Black and White Image using Numpy Array
As you recall - a black and white image can be represented by a 2d array. The below Python code takes a 2 x 5 array (checker board pattern) and using matplot converts it into an image we can see. #%% import matplotlib.pyplot as plt import numpy as np # 2d Image Array with data 2 x 5 - Checker Board imgArray =...
What is A Digital Image?
High level it is a binary representation (numbers) of visual information. And how is it represented? It depends on the format, we will get into that later, but it is nothing more than an array of numbers. For example - lets just take a 256 level black and white image and just look at the pure or raw data that would...
Image Processing in C and Python
Introduction My idea is to put together a collection of image processing code - that didn't heavily use external pre-written libraries as a way to better understand the code and image processing itself. In other words, to peak into the black box and/or make your own. Topics will be written in Python and C - and cover...
Localized IOT – Based on the ESP8266, JSON, and MQTT
My automation project keeps evolving. Here is an image of what one of the sensor/display nodes looks like now. The image is of the IOT Node Base. Contains power regulator. ESP8266 based on the Wemos D1 Mini. A basic sensor node consists of the board above and sensor. An advanced node would consists of the base node...
Replace your Raspberry PI with a Dell Wyse 3040 Thin Client
I had a project come up where I was looking for a Raspberry Pi to host it. However, I don't know if you have checked Raspberry Pi pricing or not lately, it seems the "shortages" are effecting them as well. Thus causing the prices to increase for those who have them. For example, a Raspberry Pi 4 Model B with 2GB ram...
Python Automation – Code Snippet – Return Text File Contents
This Python function will read and text file and return the contents. #usage yourContentHolder = return_text_file_content(path to text file) def return_text_file_content(file): encoding_format = "utf-8" textDataFile = open(file, mode="r",encoding= encoding_format) textContent = textDataFile.read()...
Hydroponics Automation Overview
I have been using hydroponics to grow various herbs, lettuces, and other food plants for some time now. It is a great way to grow fresh veggies. Recently I ventured into designing my own hydroponic systems - as you can see below - this is the test bed I have been using. I also have been working on a few iterations on...