In this article we define and publish the exact pre-flop probabilities for each possible combination of two hands in Textas Hold’em poker. An online tool at tools.timodenk.com/poker-odds-pre-flop makes the data visually accessible. Continue reading Poker Heads-Up Pre-Flop Odds
In late 2017, small groups of our class were given the task to delve into the assembly language and write a program for the 8051 microcontroller, as part of the Low-Level Programming lecture. This post documents the project MOV is Turing-Complete: 4-bit Adder Implementation — an assembly program that adds two 4-bit numbers relying solely on
mov instructions. The appendix lists the minified version of the code. Continue reading MOV is Turing-Complete: 4-bit Adder Implementation
The ShiftRegister PWM Library enables usage of shift register pins as pulse-width modulated (PWM) pins. Instead of setting them to either high or low, the library lets the user set them to up to 256 PWM-levels. This post serves as a documentation page for the library and is to be extended over time. Continue reading ShiftRegister PWM Library
The digit span test is a way of measuring the storage capacity of a person’s working memory: A testperson is visually or auditorily exposed to a sequence of digits one after the other. Right afterwards, the test subject has to recall the correct digits in the same order. Most people manage to recap around seven digits. I have written an online tool that lets the user determine their digit span test score. It is available at the website tools.timodenk.com/digit-span-test. Continue reading Digit Span Test (Online Tool)
Cubic spline interpolation is a mathematical method commonly used to construct new points within the boundaries of a set of known points. These new points are function values of an interpolation function (referred to as spline), which itself consists of multiple cubic piecewise polynomials. This article explains how the computation works mathematically.
After an introduction, it defines the properties of a cubic spline, then it lists different boundary conditions (including visualizations), and provides a sample calculation. Furthermore, it acts as a reference for the mathematical background of the cubic spline interpolation tool on tools.timodenk.com which is introduced at the end of the article. Continue reading Cubic Spline Interpolation
According to the U.S. Census Bureau the average commute time for U.S. citizens who are neither working at home, nor walking or biking to work, is 25.9 minutes. My commute time from Karlsruhe to SAP is usually about 38 minutes one-way; often protracted by traffic jams. However, these can be avoided by departing at times where rush-hour traffic has not fully built up yet. But which departure time works best? Is it 07:00 or rather 09:00? When departing at 07:40 how much time could one save by departing just ten minutes earlier? In addition to the traffic conditions on the outbound trip, the delay on the way back has to be taken into account likewise. With about 9 hours and 20 minutes spent at work, the traffic at 16:20 matters for a departure at 07:00. For a 09:00 departure it would be 18:20. Continue reading Commute Time Tracking
The International Space Station is orbiting our planet since 1998. One orbit takes only approximately 92 minutes and the ISS is sometimes visible at the night-sky. To the naked eye it looks like a bright star crossing the night sky in just a few minutes.
In April 2017 I was visiting my uncle in Almeria, Spain. He has a nice telescope and we were wondering, whether it would be possible to recognize the International Space Station’s shape through the telescope. As it turned out it is possible but not easy: The primary difficulty was to keep the rapidly moving ISS within the telescope’s field of view. Additionally, the video output was very shaky, which made comprehensive post-processing necessary. Continue reading Observing the ISS from Earth
The widely used Arduino IDE offers many easy-to-use functions, one of them is
void digitalWrite(uint8_t pin, uint8_t val) . It sets one of the microcontroller’s pins to either high or low and serves well in many cases. However, it has a really poor performance, i.e. execution time. This post analyses both, speed and interior of the digitalWrite function, and proposes alternative, high performance solutions for setting output pins.
Continue reading Port Manipulation and Arduino’s digitalWrite Performance
This post is a tutorial on how to get started on programming your Arduino in Assembly or C/C++. In order to follow you need a Windows machine and a microcontroller programmer like the Atmel-ICE.
Continue reading Program Arduino in Assembly or C/C++