0.91″ OLED I2C Display

If You have a small Arduino project, You do not always want to connect the device to the serial monitor.

There are the rather bulky LCD displays, concerning the model 2004 16 x 4 it is rather expensive.

So why not try it with an OLED display? There are two formats of OLED displays and I have tested them both.

The first one has 32 lines, the other twice as much.

I would say, You can have one line with rather big sized characters if You use the 128×32 OLED.

So You are better off with the 128×64 OLED because with smaller characters You can display up to four rows and You do not need the serial monitor.

Lidl Silvercrest WiFi SWV 733 A2 repeater

You want to connect a PC, Laptop, SmartTV whatever to the network. You do not want or You cannot use Ethernet cable connectivity. So You think You can choose this option and use the Lidl Silvercrest repeater.

What is the setup ? You have to configure it in client mode. When asking about an IP adress (LAN interface setup), it does not matter. This is just for to be able to access the repeater. For DHCP, configure it with “Server”.

You have to configure the wireless connectivity with Your credentials for to connect it to the router. of course. The Wireless Info box should show the status “connected”.

Chromebook : Camera not working

You might get crazy when You rush into a videoconference and the inbuilt camera does not seem to work.

You check the camera settings. Everything is fine. No way. Finally found out that there is a plastic ruler, a little plastic part that closes the lens. You have to move this ruler at the top of the laptop monitor.

Plastic ruler on the top of the display

Arduino SD card access

I have an Arduino Ethernet Shield W5500 Development Board which has a slot for a SD card. I insert a Micro SD card into the slot (FAT32 formatted) and try executing a sketch because Arduino should execute the HTML file on the webserver …

// initialize SD card
Serial.println("Initializing SD card...");
if (!SD.begin(4)) {
    Serial.println("ERROR - SD card initialization failed!");
    return;    // init failed
}
Serial.println("SUCCESS - SD card initialized.");
// check for index.htm file
if (!SD.exists("index.htm")) {
    Serial.println("ERROR - Can't find index.htm file!");
    return;  // can't find index file

The “index.htm” file is there. So I am quite astonished that the serial monitor complains about a missing file.

I have a SD card module at hand and execute a sketch writing some lines in a testfile …

Serial.print("Writing to test.txt…");
myFile.println("This is a test file :)");
myFile.println("testing 1, 2, 3.");
for (int i = 0; i < 20; i++) {
myFile.println(i);
}
// close the file:
myFile.close();
Serial.println("done.");

Now I can see in the serial monitor that there is NO error message that the “index.htm” file is not there. And I am quite surprised that the C++ sketch has written the text into the “index.htm” file and saved it as “INDEX.HTM”.

Seems to be a matter of fact that Arduino, when accessing a Micro SD card (FAT32) , expects the filename in upper cases and ignores filenames with lower case letters.

Python : DHT11 : Raspberry ZeroW : No module named ‘board’

I have two Raspberry ZeroW , and I try to use both for to get temperature data. I am recording this data in order to find out when the temperature changes. Both devices should be able to execute the same script. Both have the same hardware setup and they record data on a USB stick.
Kind of weary that on the second device executing the python script fails : I get the error :
No module named ‘board’
That s odd because I am sure the board has been installed.
This is a known issue :
I tried to follow the widely published troubleshooting (reinstalling Blank etc) with no success.
For instance :
pip3 install adafruit-circuitpython-dht
does not work !

The error message ( error: externally-managed-environment ) is followed by a hint which indeed leads me to the solution :
“This environment is externally managed ╰─> To install Python packages system-wide, try apt install … “
The only way to get this issue fixed is installing a virtual environment :

That means :

python3 -m venv ./ws-env
source ws-env/bin/activate
(ws-env) user@raspberrypi:/home/pluto# pip3 install board
(ws-env) user@raspberrypi:/home/pluto# pip3 install adafruit-circuitpython-dht

It works like a charm !

Thunderbird : Saving message in HTML format

How to accomplish saving a message in HTML format ? This is depending on the version installed.

Quite easy though not easy to find on a Raspberry :

Raspberry installed Thunderbird Email Client

You have to select and right click on the message. Then You can choose between many formats.

Thunderbird 115.6.0 (64-bit) installed with Ubuntu 22.04 does not offer so much options. The access to this functionnality is similar :

Likewise You have to select and right click on the message.

You will get a list with options … save as is at the end …

When You have selected “Save As …” You will get further 4 options. The second option is for to save as an HTML file.

Raspian : Shell script does not get executed

Thought havin done everything which has to be done. The file made executable with + x …

-rwxrwxrwx 1 user group 72 jul 9 2023 mouse.sh

The shell script does not executed because I am used to the Ubuntu shell, You execute with

./mouse.sh

wheras when using the Raspberry (Raspian) this is a little bit different :

. mouse.sh

DHT11 / Raspberry Pi Zero W : RuntimeError: Timed out waiting for PulseIn message. Make sure libgpiod is installed…

Took me quite some time to figure out how to get rid of this error, because the Python script for the DHT11 temperature sensor does not get executed. The error message seems to be quite strange because libgpiod is found when executing "pip3 freeze".

The reason for this failure is that libgpiod Python 3 does not work without the installation of libgpiod-dev.

It has to be installed with :

> apt install libgpiod2 libgpiod-dev


Arduino Nano : Cannot upload code

Quite common that could not upload code to my Arduino Nano. Uno, Mega no problem. So could not be an issue with the USB ports. Tried out different Arduino IDE versions. Different operating systems/versions. Still not possible to upload code. Finally found out that the reason was that upload requires the old bootloader. Most of the Arduino Nano s (at least the ones that I own) do not use the standard bootloader. I saw old bootloaders are required for …

WCHCH340G AMS1117 5.0 H947MK
Diymore/WCH
CH3400 AMS1117 ATMEL M328 P

Anzeige von Datenbankabfragen

Eine solche Darstellung ist sehr ärgerlich

Ich habe eine Datenbank mit ca 200 Abkürzungen (Schwerpunkt Wirtschaft und Gesellschaft Lateinamerikas). Bei einer Abfrage, ich verwende dabei PHP, bekomme ich allerdings keine spanischen Buchstaben angezeigt, deutlich zu sehen beim ñ. Stattdessen kommt das Unicode Ersatzzeichen (U+FFFD) Ein Blick in die Datenbank : Hier ist alles in Ordnung..

Diese Datenbank war zuvor in XOOPS (ein Webportal, etwa mit WordPress vergleichbar) integriert. Hier sind die spanischen Zeichen immer richtig angezeigt worden. Von daher wusste ich dass das Problem nicht etwa an den Einstellungen des MySQL servers liegen konnten (LAMP Installation, MySql Ver Distrib 5.7.41 Ubuntu0.18.04.1). In meine Suche nach einer Lösung probierte ich aus ob ich eine richtige Formatierung nicht etwas über HTML zustande bekommen könnte ... vergebens. Es war nicht das erste Mal dass dieses Problem erschien ... Folgende Möglichkeiten gab es zur Behebung : header('Content-Type: text/html; charset=utf-8'); header('Content-Type: text/html; charset=UTF-8'); header('Content-Type: text/html; charset=iso-8859-1'); Es schien nicht an der Schreibweise des Charsets zu liegen (Gross/Kleinschreibung). Ich bin nicht mehr völlig sicher ob ich die Lösung hier gefunden habe, jedenfalls wird sie hier erwähnt : ... $title = mb_convert_encoding($article['title'], "UTF-8", "iso-8859-1"); Sie führte mich zur Lösung (3. Option!): header('Content-Type: text/html; charset=iso-8859-1');

Korrekte Anzeige nach Hinzufügen von charset=iso-8859-1