I have a new post on Hackaday: The Spade Hardware Description Language.
Category Archives: Programming
ATtiny85 in HW-260 board
I have my ATtiny85 microcontroller installed in a HW-260 development board (purchased from AliExpress). I program the ATtiny85 with the SparkFun Tiny AVR Programmer, the setup guide is here: Tiny AVR Programmer Hookup Guide.
On the SparkFun programmer the onboard LED is PB0. On the HW-260 the onboard LED is PB1. This is the code I used to flash the HW-260 LED:
#define LED_BUILTIN PB1
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
You can see the programmer settings I used in Arduino IDE in this screenshot:

New Zealand’s $16 Billion Public Health System Runs on a Single Excel Sheet
This is a note for Future John: New Zealand’s $16 Billion Public Health System Runs on a Single Excel Sheet.
From the report:
Notably, one major issue was through a significant reliance on the use of an Excel file to manage the consolidated financials of the organisation. This spreadsheet was the primary data file used by HNZ to manage its financial performance. It consolidated files from each district into a single spreadsheet, and key reports, such as the monthly finance report, were produced from it. The use of an Excel spreadsheet file to track and report financial performance for a $28bn expenditure organisation raises significant concerns, particularly when other more appropriate systems are present on the IT landscape.
This Excel file is flawed in that:
- Financial information was often ‘hard-coded,’ making it difficult to trace to the source or have updated data flow through.
- Errors such as incorrectly releasing accruals or double-up releases were not picked up until following periods.
- Changes to prior periods and FTE errors in district financial reporting Excel submissions, would not flow through to consolidated file.
- The spreadsheet can be easy to manipulate information as there is limited tracking to source information where information is not flowing directly from accounting systems.
- It is highly prone to human error, such as accidental typing of a number or omission of a zero.
…
The cumbersome process of collecting data also meant monthly financial reporting usually took 12-15 days to consolidate and 5 days to analyse. Adding to that the time associated with the creation of the monthly finance reports and circulation of these to the Board, there was an inevitable challenge of obtaining real-time financial information from one source of truth.
Church Of Turing
In my feed today: Church Of Turing. It’s about four Lisps: Scheme, Common Lisp, Clojure, and Racket.
Modern C Features
I’m expecting a fair bit of C programming (or C++) in my future because of Arduino and other microcontrollers. Today I came across modern-c-features which enumerates the new features in C.
How Clay’s UI Layout Algorithm Works
This in my feed today: How Clay’s UI Layout Algorithm Works:
Clay is a UI layout library written in C, and this video gives a high level explanation of how the flexbox-like layout algorithm in Clay works.
The Pentium contains a complicated circuit to multiply by three
This in my feed today: The Pentium contains a complicated circuit to multiply by three.
What kind of shell is this?
This post from Julia Evans explains about different types of shells. There’s rather a lot to know!
Voyager bug fix
This is too cool. A core dump then binary patch to work around memory hardware failure 15 BILLION MILES AWAY: How NASA Fixed a Software Bug 15 BILLION MILES AWAY | Voyager 1
Microcontroller display
Here’s an interesting video about integrating a display with your microcontroller: The BASICS of Adding a Display to Your Arduino, ESP32, STM32, or other MCU Project. The graphics library he recommends is LVGL.