If you encounter the above linking error with an ATmega328p and your code uses sprintf, set your LIBRARY_PATH or the linker argument -L to /usr/lib/avr/lib/avr5 instead of /usr/lib/avr/lib.
Author Archives: Eddy Young
.vimrc
rg.exe is part of ripgrep.
Disabling Bluetooth auto-suspend with module options
In my previous post I showed how to restart Bluetooth on Debian Linux. Here I explain how to disable Bluetooth auto-suspend with a kernel module option. The behaviour of kernel modules can be controlled with parameters. The command modinfo shows information about a module and lists its parameters. In the example below, modinfo btusb shows …
Continue reading “Disabling Bluetooth auto-suspend with module options”
Restarting Bluetooth on Debian Linux
On my laptop I use a Bluetooth keyboard and a Bluetooth mouse. Occasionally the Bluetooth adapter in the laptop shuts off completely, meaning that it becomes impossible to restart the Bluetooth service with sudo systemctl restart bluetooth.service. My troubleshooting points to powersaving as the cause of this intermittent failure, but the TLP setting that is …
Centrino Ultimate N-6300 slow to connect to WiFi network
WiFi connections from my laptop became unstable after I upgraded it to Ubuntu 19.04. To get them to work, I had to turn the WiFi adapter on and off several times, which quickly became annoying. The following attempts to fix the problem were unsuccessful: disabling IPv6 disabling power-saving on the WiFi adapter setting bt_coex_active=0 during …
Continue reading “Centrino Ultimate N-6300 slow to connect to WiFi network”
SO #57225262—Inputting list of passwords in a class
Stack Overflow question ‘Inputting list of passwords in a class’ is more interesting as an object-oriented design (OOD) exercise than as a debugging exercise, but it also provides an opportunity to practise some Python programming. The requirements identified in the problem are: represent a set of credentials comprised of a username and a password; represent …
Continue reading “SO #57225262—Inputting list of passwords in a class”
Undefined behaviours in C
Undefined behaviours in the C language confuse many beginners. As an occasional C programmer I am also baffled when I encounter them—as happened with this code that I wrote in an Arduino sketch. static void get_input(String prompt, void* const input, void (*parse_func)(void* const), int (*validate_func)(const void* const)) { while (!validate_func((const void* const)input)) { Serial.println(prompt); while …
Programming Arduino in Atmel Studio
As a fun way to improve my C, I started programming the Arduino using Atmel Studio instead of the friendlier Arduino IDE. Below is my very first program. It blinks a red LED and a white LED according to a preset pattern. #define F_CPU 16000000UL #include <avr/io.h> #include <util/delay.h> struct Led { int pin; int …
Hacking SSL support into smtpop.dll
We use smtpop.dll in one application to retrieve email from a POP3 mailbox. Today we had to connect to a mailbox over SSL, which smtpop.dll does not support. Our code to retrieve email is abstracted behind a façade class, so I expected to simply substitute a new library for smtpop.dll and to call new methods. …
Java Server Faces rage!
From http://thoughtworks.fileburst.com/assets/technology-radar-jan-2014-en.pdf: We continue to see teams run into trouble using JSF– JavaServer Faces — and are recommending you avoid this technology. Teams seem to choose JSF because it is a J2EE standard without really evaluating whether the programming model suits them. We think JSF is flawed because it tries to abstract away HTML, CSS …