Making a Python Package for PyPI - Easy Steps

This blog will give you step by step instructions on how to setup a python project so that you can upload it to PyPIand make it distributable and installable via pip. First, here are the things you need to know to follow these instructions: You are able to code in python You are familiar with git You know about unit tests It also helps if you have an actual need to share a python solution with others such as a library you wrote, or a CLI tool, or a game etc.

Hello from the new hugo based site

My blog now is running with a completely different technology. Earlier version was running on Ghost v0.92, and it had some limitations that bothered me especially when I wanted to display code. After evaluating the upgrade path for ghost, and asking for recommendations for a self hosted blog site, I decided to give a try to hugo. Hugo is a static site builder. So it has no complicated setup or requirements.

Meta/Mathical Sentences

Recently a question on Project Eulersite made me think about easily verifiable but hard to generate messages. This can have some cryptographic use. The message contains both the content and the verification in one block. Here is an example: In the above sentence the content is “My name is Otuk” and the rest of the message is for easy verification by the recipient. As long as preparing the verification information is computationally intense, the message cannot be quickly modified.

Adventure of the Cardboard boxes problem

I was looking through Prof. Ian Stewart’s book “Professor Stewart’s Casebook of Mathematical Mysteries” with an idea in my mind to solve the problems posed with computational brute force rather than smart thinking. For some reason the idea of brute force calculations for mathematical puzzles attract me. On page 23 of the book he mentions the question of the cardboard boxes and in the answers section he expands more on what can be done with the question.

How to make home IoT easier

On the last post I covered basic Arduino IDE setup/use with electrodragon’s relay board to get started for easy home automation. That was sometime ago, during this time it is true I have been busy with life’s needs but also the fact that to setup a home automation that works end to end needs many steps and variety of technologies made me think about the problem a bit deeper. So before I continue more, let me share the conclusion.

Experimenting with a new gadget: Electrodragon's relay board

My first wifi connected board was the now discontinued Wemos D1. It offered Arduino UNO compatible shape/size and also hosted the mysterious ESP8266 on it. It also made it easy to experiment with the ESP8266 by allowing Arduino IDE to flash programs to it the usual/easy way without any extra hardware/buttons etc being necessary. I used that board to build a simple light on/off control for a hard to reach area at my home.

Hourglass Project - Final Status - Part 6

Read earlier parts The Hourglass Project came to a finalization point. Project goals have been achieved. The LEDs light up and turn off giving the illusion of balls/sand particles falling down with the pull of gravity in all compass directions now. The hourglass also does automatic dimming/power saving if unused and on touch wakes up after power save. The combination of these make it a simple, but fully functional object satisfying the original targets.

MPU6050 on GY-521 - Hourglass Prj Part 5

Read Part 4 After bringing hourglass to a satisfactory working level with the simple ball tilt sensor (see pic below) I wanted to go back to the original idea and make it work not only in the Upright-Upside-down directions, but also have the balls fall and roll in all compass directions as the object’s tilt angle changes. Of course the simple ball in a tube sensor cannot do that. It happens that a GY-521 breakout board with a MPU6050 on it was waiting for this opportunity.

A working prototype - Hourglass Project - Part 4

Read Part 3 first The summary update is that I have a working hourglass prototype that delivers the basic requirements. Since the last update, the code changed considerably. Certain nice object-oriented concepts went away, bit packing and elimination of anything that can be replaced or reused from existing objects resulted in the code footprint to shrink to less than half the original size that was working on the PC. This allowed for a successful compile and upload to Arduino.

in-the-weeds-hourglass-prj-part-3

Read Part 2 First Well, not all updates can show great achievement. Right now I am working to change the same code that ran well on PC simulation to work on Arduino as well. Currently it is a struggle to fit all in the 2K memory footprint basically. So after part 2 and the success on PC simulation, I moved my code to Arduino IDE, linked the LedControl library to drive the display.

Hourglass Project Part-2 (Updates)

Click to Read Part-1 first The cardboard housing for the hourglass is completed and set aside. I have also experimented with a simple tilt sensor, its readings are not very accurate, but very easy to use. No library is needed, you simply do an Analog reading and determine if the thing is standing upright or not. My effort during this time mostly has been on the software side of things. For the modeling of the little balls that will fall thru the hourglass.

Hourglass project - Part 1

Started working on a new mini-project to build an hourglass using cascaded led matrix displays driven by max7219s and an arduino with some kind of a gravity sensor on it. What makes this project interesting is I intend to make it imitate physical falling of sand particles under gravity. Initial challenge is to have a prototype housing. As I intend to imitate a real object I cannot simply place components on a breadboard and lay it flat.

Add Arduino as an Application in Lubuntu

I installed the newest arduino IDE on my lubuntu machine using the arduino site instructions. After that I can run the IDE by typing arduino from command line, which works fine but I also wanted arduino to appear as an application on the startup menu or be able to add arduino to my panel. It is simple: Go to ~/local/share directory. If you do not see an applications directory, create one there.

Past Imperfect - DMD795x2 Library

Before I started writing this blog I published a simple educational library that shows how to use arduino to drive a 8x8 LED matrix display. Library includes fun examples: Invaders Game Scrolling Marquee Alarm Timer Detailed frizzing diagram and more are available at: Simple 8x8 Matrix Display LibraryDownload