Everything AI – TOC

This blog has plenty of posts about AI, some are about AI tools, others are about installing AI locally, so this post is where I am putting all the AI stuff I have ever blogged about in one place !

The section Local AI is about creating your own AI server using freely available sources, the API section lists all the services that provide an API that can be used remotely (Most can not be installed locally anyway), and the Online Services is where you can get things done via AI online (That can be used using your browser, whether they provide an API or not, and whether they can be installed locally or not is a different story)

Continue reading “Everything AI – TOC”

Installing root certificate in android and mitmproxy

Well, since you are here, you are probably planning to spy on traffic generated by the apps on your phone, probably looking to find out what apps are leaking your private information !

How this all works: When an application on your phone contacts a website/web-server over a secure connection, your phone checks the certificate, and checks whether or not that certificate was issued by an authority the phone trusts, what we are doing is telling the phone to add YOU to the list of trusted authorities, then, we create a proxy that the phone connects through (mitmproxy). Now, the proxy contacts the website on behalf of the application that sent the request, gets the response / contents of that page, saves a copy of that response, and repackages it using our own security certificate, then sends it to the phone, at this stage, the phone thinks the certificate belongs to the website it was contacting (Because now it trusts you), and everything works as it normally would. This does not work if the app has a pinned certificate, a pinned certificate is when an app does not trust the list of authorities the system maintains and requires a certain certificate, but this too has a workaround !

here is what you need to do.

I am assuming you already have a rooted virtual android device (AVD), if not, here are the instructions, in my case, even though it is mid 2026, i decided to go with a Google Pixel 6 with android 12 (The pixel six has updates up to the most current Android 17, but i decided to go with Android 12)

You need to create a root certificate, and install it in both mitmproxy and android, the mitmproxy gets the pem file with the certificate and private key (So that it can create certificates for websites on the fly), while android gets the one with the certificate (Obviously)

1- Gnerate the private key

openssl genrsa -out android-mitm-ca.key 4096

2 – Create the CA certificate


openssl req -x509 -new -sha256 -key android-mitm-ca.key -out android-mitm-ca.crt -days 3650 -subj "/C=JO/O=Android Traffic Analysis/CN=Android MITM Analysis CA" -addext "basicConstraints=critical,CA:TRUE" -addext "keyUsage=critical,keyCertSign,cRLSign"

3- Installing mitmproxy (On your debian machine)

install Prerequisites:

sudo apt install python3-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg-dev zlib1g-dev

Debian 13 does not have it in repositories (12, and 14 do !), so we need to install from binaries downloaded from the website ! so i put them in /opt/mitmproxy and symlinked the files in /usr/local/bin

4- Concatinate/combine key and cert into 1 file for the mitmproxy

cat android-mitm-ca.key android-mitm-ca.crt > ~/.mitmproxy/mitmproxy-ca-my.pem
chmod 600 ~/.mitmproxy/mitmproxy-ca-my.pem

5- running and check that mitmproxy is using our cert

First, run mitmproxy.

NO-GO: mitmproxy –listen-host 192.168.7.119 –listen-port 8080 –certs “*=$HOME/.mitmproxy/mitmproxy-ca-my.pem” (No go because certs is for individual domains)

NO-GO:

mitmproxy --certs "*=$HOME/.mitmproxy/mitmproxy-ca-my.pem"

Or if needed

mitmproxy --listen-host 192.168.7.119 --listen-port 8080 --set confdir="$HOME/.mitmproxy-my"

Or if you want access from outside your network

mitmproxy --listen-host 192.168.7.129 --listen-port 8080 --set block_global=false --set confdir="$HOME/.mitmproxy-my"

From another terminal, let us try to get the contents of example.com through the proxy:

openssl s_client -proxy 192.168.7.119:8080 -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -issuer -subject

Now, if the proxy works as intended, and is correctly signing our requests with our own certificate, we should see something like isuer: Android MITM Analysis CA (The name we chose)

So, now our proxy is ready and serving, all that remains is relevant to Android, we have already made the android certificate to add (OUR_HASH.0)

Installing the certificate on the android phone

The only thing that is confusing about this section is that not all android phones work in the same way ! I am deliberately using Android 12 (Will install most software while being somewhat easier to tinker with), you on the other hand may be using android 16 or 17 (The latest at the time of writing).

Also, I am using a virtual android phone (With Android Studio), you may be using an actual rooter physical phone !

So, I will outline when something is going to be different on other android versions, and you will have to figure it out (Use Google, or gemini or something)

6- Certificate File Name for android

figure out the hash for the filename of the Android file (The file name should be “hash.0”, replace hash with the actual hash resulting from the below) this is how android expects the file name to be

HASH=$(openssl x509 -inform PEM -subject_hash_old -in android-mitm-ca.crt | head -1)
echo "$HASH"

Now, copy the file android-mitm-ca.crt and name the copy the same as the resulting hash with an added .0 at the end (THEHASH.0)

7- If android 16+ (I am using 12, but if you have 16+)

If your rootAVD image is Android 16 or above, don’t blindly follow the old /system/etc/security/cacerts/ procedure. Android 16 changed the system certificate location, and current mitmproxy documentation has a separate procedure involving a Magisk certificate-moving module.

check your android version

adb shell getprop ro.build.version.release
adb shell getprop ro.build.version.sdk
adb shell getprop ro.product.cpu.abi
adb shell su -c 'id'
$ adb shell getprop ro.build.version.release
12
$ adb shell getprop ro.build.version.sdk
31
$ adb shell getprop ro.product.cpu.abi
x86_64
$ adb shell su -c ‘id’
uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0

So, in my case, I am running android 12 ! Software development kit 31 (API level), X86 cpu, and (context=u:r:magisk:s0)

8- Explore the filesystem

Let us check and explore the files and folders on filesystem


> adb shell su -c 'ls -ld /system/etc/security/cacerts'
drwxr-xr-x 2 root root 4096 2023-07-26 23:02 /system/etc/security/cacerts

> adb shell su -c 'mount | grep -E " /system | / "'
/dev/block/dm-4 on / type ext4 (ro,seclabel,relatime)

> adb shell su -c 'ls -l /system/etc/security/cacerts | head'
total 952
-rw-r--r-- 1 root root 2871 2023-07-26 23:02 01419da9.0
-rw-r--r-- 1 root root 2914 2023-07-26 23:02 04f60c28.0
-rw-r--r-- 1 root root 2345 2023-07-26 23:02 0d69c7e1.0
-rw-r--r-- 1 root root 4622 2023-07-26 23:02 10531352.0
-rw-r--r-- 1 root root 4724 2023-07-26 23:02 111e6273.0
-rw-r--r-- 1 root root 4308 2023-07-26 23:02 12d55845.0
-rw-r--r-- 1 root root 2599 2023-07-26 23:02 1ae85e5e.0
-rw-r--r-- 1 root root 4931 2023-07-26 23:02 1df5a75f.0
-rw-r--r-- 1 root root 4535 2023-07-26 23:02 1e1eab7c.0

So, we do have the path /system/etc/security/cacerts on the phone, system (See second command above) is mounted read only, there are 952 certificate files in the /system/etc/security/cacerts folder.

Reminder: On Android 12, the traditional system CA location we’re interested in is: /system/etc/security/cacerts/ , The certificates are stored there using the OpenSSL subject-hash filename convention, e.g.: xxxxxxxx.0

The plan at this stage is to use magisk to add our certificate as an overlay, this way, we don’t need to modify the actual system, meaning, we will not be mounting system in read-write mode, read-only is fine by us

9- Explore Magisk

So let us start by checking what version of MAGISK is installed on the phone, and where it lives

> adb shell su -c 'magisk -v'
26.4:MAGISK:R
> adb shell su -c 'magisk --path'
/debug_ramdisk
> adb shell su -c 'ls -la /data/adb/modules'
total 24
drwxr-xr-x 3 root root 4096 2026-08-26 12:05 .
drwx------ 6 root root 4096 2026-08-26 12:11 ..
drwxr-xr-x 3 root root 4096 2026-08-26 12:07 hosts

Since this is rootAVD/Magisk, the clean approach is to use a Magisk overlay so we don’t modify the underlying system image.

10- Create the Magisk module with the certificate in it !

we can create our own small Magisk module specifically for the CA without touching the original system image. (the only existing module is hosts)

To create a magisk module we need to do the following

10.1- Create an identical folder structure on my debian machine *(Yours can be windows)

mkdir -p ~/.mitmproxy/module/system/etc/security/cacerts

Move your certificate (xxxxx.0) to the cacerts folder we created above

Now create the module file (Module dfinition file), obviously you can create it with a text editor as well if you wish.

cat > ~/.mitmproxy/module/module.prop <<'EOF'
id=android-mitm-ca
name=Android MITM Analysis CA
version=1.0
versionCode=1
author=Voodoo
description=Custom CA certificate for controlled Android traffic analysis
EOF

Now, put the contents of the module directory (Without the module directory itself) in a zip file

cd ~/.mitmproxy/module
zip -r ../android-mitm-ca.zip .

Now, open the zip file in fileroller (or 7-zip or winrar, whatever suits you) and make sure we have

module.prop
system/
system/etc/
system/etc/security/
system/etc/security/cacerts/
system/etc/security/cacerts/XXXXXXXX.0

If all looks good, super, we have the zip file for android…. go ahead and push it to the android virtual machine

> adb push ~/.mitmproxy/android-mitm-ca.zip /data/local/tmp/

Now, when the above works, install the zip file with magisk

> adb shell su -c 'magisk --install-module /data/local/tmp/android-mitm-ca.zip'
- Device is system-as-root
**************************
Android MITM Analysis CA
by Voodoo
**************************
*******************
Powered by Magisk
*******************
- Extracting module files
- Done

If you get an error above DO NOT REBOOT, only reboot if you get a message like the one i got. if not, Sorry man, you need to reverse the steps above ! something with the rootAVD restore command should do

Now, after rebooting (adb shell reboot), run this to see if our certificate appears !

adb shell su -c 'ls -l /system/etc/security/cacerts/'

Looks fine to me, but let us double check (replace the xxx with your actual file name)

adb shell su -c “ls -l /system/etc/security/cacerts/xxxxxx.0”
-rw-r–r– 1 root root 2000 2026-08-27 20:28 /system/etc/security/cacerts/xxxx.0

And if everything was done correctly, “adb shell su -c ‘mount | grep ” / “‘” should still show read-only

Now, let us play, I am very skeptical that this would work (Unless your android has openssl), but it can’t hurt to try… anyway, failiure here means nothing is the error is that “openssl: inaccessible or not found”, it is expected, and means nothing

adb shell su -c "openssl x509 -in /system/etc/security/cacerts/fea8a918.0 -noout -subject -issuer"

Pinned certificates

there are ways to get around this, ways from things as simple as using apk-mitm to remove the pinning, all the way to more serious stuff such as using jadx to modify the software before playing this game.

Here are some tools that can come in handy for this

  • FRIDA: Lets you inject snippets of JavaScript or your own library into native apps + simple tools built on top of the Frida API.
  • APK-MITM: (https://github.com/shroudedcode/apk-mitm): Remove certificate pinning from APK files
  • objection is a runtime mobile exploration toolkit powered by Frida, which supports certificate pinning bypasses on iOS and Android.
  • ssl-kill-switch2 blackbox tool to disable certificate pinning within iOS and macOS applications.
  • android-unpinner : From the same people who make the MITMPROXY, it modifies Android APKs to inject Frida and HTTP Toolkit’s unpinning scripts.

apk-mitm

node --version
npm --version
sudo apt install zip unzip
npm install -g apk-mitm

Now, to remove the pinning in your app

apk-mitm <path-to-apk>

Installing and rooting an AVD

Here, I would like to install an AVD with Android Studio, then root it

Where to install

First of all, I would like to have my virtual machines installed on a different SSD (Or Hard drive), in my case, this is because my main disk is always busy, and i want the Android Virtual Device to be snappy, others may have storage space concerns, others may want to skip this step, depends…

To do this on my Debian machine, i need to add the following line to ~/.bashrc

export ANDROID_AVD_HOME="/hds/ssngoem/avd"

On windows, i would have to Edit the system environment variables.

If you just want to move a machine, move it from ~/.android/avd/, don’t move the ini file, instead edit the ini file and fix the location of the virtual machine to wherever you put it

Make it

Now, all we need to do is create a machine in Android Studio!

Root it

To root the phone we need rootAVD

Start by checking whether the AVD is connected to the PC with adb devices

adb devices
List of devices attached
emulator-5554 device

So it seems that it is !

Now, we need rootAVD from newbit (https://gitlab.com/newbit/rootAVD)

git clone https://gitlab.com/newbit/rootAVD.git
cd rootAVD
./rootAVD.sh listAllAvds (On windows, use rootAVD.bat instead of sh)

The above command will give you a list of commands for each and every one of your Android Virtual Devices ! I will copy the first one, but the end of every line there is the last word that explains what it is

Once you run the command to root the phone, the phone will reboot (Or shutdown), you need to start the phone again (Make sure you chose cold boot from the … menu), and you will find a tool called magisk on the phone emulator, you need to run it, when you run it for the first time, it will tell you there is additional setup that needs to be done, which will reboot the device again

Your phone should now be rooted, to be sure, you can

adb shell
whoami
su (The phone screen will ask for permission)
whoami

HID Proxy Voodoo

A small device to help people build the things that don’t exist yet

There is a frustrating category of inventions that nobody builds.

Not because they are bad ideas.

Not because they are impossible.

Simply because the number of people who need them is too small.

If you are making a product for millions of people, development costs can be spread across a large market.

But what if the thing you want to build is for a few hundred people?

Or ten?

Or one?

This is especially true in accessibility.

A person may need a very specific input device because of a particular disability, a particular activity, or simply because the commercially available options do not fit their needs.

The problem is not always engineering.

Sometimes the problem is that every single one of these devices starts from zero.

Someone has to solve USB.

Someone has to write firmware.

Someone has to design electronics.

Someone has to build prototypes.

And all of that happens before anyone even knows whether the idea works.

I think this is backwards.


What if experimenting was cheap?

Imagine you have an idea for a completely new controller.

Not a normal keyboard.

Not a normal mouse.

Something that does not exist.

Maybe it is a wooden mechanism with a few switches.

Maybe it uses a potentiometer.

Maybe it is built from parts found in a workshop.

Maybe it looks ridiculous.

That is exactly how many good ideas start.

A piece of wood.

A few screws.

A sensor.

A crazy thought.

The problem is that turning that crazy thought into something a computer understands usually requires a lot of knowledge that has nothing to do with the actual invention.

You shouldn’t need to become a USB expert just to answer a simple question:

“Does this idea work?”


The idea behind the HID Proxy

The concept is simple:

Create a hardware platform that sits between the physical world and the computer.

A device that understands human input devices.

A device that can combine, translate, and create new inputs.

Instead of building a new USB device from scratch every time, use a flexible platform that already handles the difficult parts.

The first version is based around ESP32-S3 and STM32 microcontrollers and is designed around three main ideas:

1. Accept existing HID devices

Connect things like:

  • keyboards
  • mice
  • game controllers
  • joysticks
  • steering wheels
  • pedals
  • switches

and use them as building blocks.

2. Create new HID devices

Take simple electronics:

  • buttons
  • potentiometers
  • sensors
  • custom mechanisms

and turn them into devices the computer already understands.

A homemade controller should not require a homemade USB stack.

3. Manipulate and combine inputs

Sometimes the interesting device is not a single input.

Maybe a joystick and some buttons need to become a completely different controller.

Maybe two devices need to work together.

Maybe a non-standard interface needs to control a standard computer.

The hardware should be the easy part.


Why accessibility?

This project started as a general-purpose idea, but accessibility is where I think it has the strongest purpose.

The smaller the target group, the harder it becomes to justify development costs.

A company can spend thousands designing a product for millions of users.

But who funds a device needed by twenty people?

Or a device needed by a small group with a rare condition?

Those ideas often disappear, not because they are bad, but because the economics make them impossible.

If the cost of experimentation becomes low enough, more of those ideas can exist.

That is the goal.

Not to replace professional medical equipment.

Not to pretend one board can solve every accessibility challenge.

Simply to make it easier for people with good ideas to test them.


But isn’t this just a maker board?

Yes.

And no.

An engineer or hobbyist should absolutely be able to keep one of these in their toolbox.

The same way someone keeps an Arduino, a multimeter, or a breadboard nearby.

Not every experiment becomes a product.

Most don’t.

That is fine.

The purpose of experimentation is not that every idea succeeds.

The purpose is making failure cheap enough that people are willing to try.


The software side

There are many possible ways to use the platform.

A beginner might connect a few components and use a simple scripting language such as Lua.

Copy a small example.

Change a few numbers.

Test an idea.

A more experienced developer might replace parts of the firmware completely.

Someone else might only use the hardware design as a foundation for their own project.

I don’t think there should be one “correct” way.

The platform should disappear into the background and let people focus on the thing they are actually trying to build.


Why am I building this?

This is the part where I am supposed to write something inspirational.

I could say that I have always dreamed of changing lives.

That would not be completely false.

I do want this project to have a positive impact.

But the real answer is more complicated.

I like making things.

I like the moment when an idea stops being an idea and starts moving.

A machine doing something because I imagined it and built it is still one of the most satisfying feelings I know.

Somewhere along the way, that feeling became weaker.

While thinking about why, I came across research around the overjustification effect—the idea that external rewards can sometimes replace the internal motivation that made you enjoy something in the first place.

I do not think that explains everything.

But I think it explains part of it.

This project started because I was working on something else, only to discover that the thing I was building already existed.

Normally that means the project goes into a drawer.

Instead, I looked at all the work already done:

The research.

The designs.

The ideas.

The piles of pseudocode.

And I asked:

“What if this effort becomes a tool that helps other people build things?”

Maybe that is a better destination.


Quality matters

One thing I want to make very clear:

This is not meant to be a “quick hack that works sometimes.”

For accessibility especially, reliability matters.

A clever prototype is interesting.

A device someone depends on is something else entirely.

I do not want to cut corners simply because something works in a demonstration.

The objective is not just flexibility.

It is flexibility built on a reliable foundation.


Where does this go?

Honestly?

I don’t know yet.

Some parts will likely become open source.

Some parts may take more time, especially anything involving networking and security.

A device that controls a wheelchair, communication system, or another important tool deserves careful consideration.

“Open” and “secure” are both important goals, and sometimes they require difficult decisions.

The hardware will evolve.

The software will evolve.

The community around it—if one forms—will probably influence it in ways I cannot predict.


How can you help?

At this stage, the biggest challenge is simple:

Building hardware costs money.

Prototype boards.

Components.

Manufacturing.

Testing.

The boring things that are absolutely necessary before the interesting things can happen.

If you believe this idea is worth exploring, support can take many forms:

  • Sponsorship.
  • Technical feedback.
  • Testing.
  • Sharing the project with someone who may benefit.

The goal is not to build one product.

The goal is to make it easier for people to build the products that do not exist yet.


Final thoughts

I don’t know if this will become a commercial product.

I don’t know if it will become a widely used platform.

But I do know this:

There are people with ideas that never become reality because the first step is too expensive.

If this project can remove some of that first barrier, then it will have been worth building.

And honestly…

“If this platform saves someone from spending three weeks writing USB firmware just to test an idea, then it has already justified its existence.”

TTGO T9 Audio – Everything

I have had those boards (V1.6) for over a decade, had fun plans for them, but never got around to doing anything with them !

This document will always be a work in progress, even after i finish whatever project I will be making, anything new that I find about this board or similar boards will end up here

The TTGO T9 Audio RGB_LED WM8978 is an

  • ESP32 : ESP32-WROVER 802.11 b/g/n + Bluetooth 4.1 LE module with 4MB Flash, 4MB PSRAM
  • audio chip (WM8978 stereo CODEC)
  • SD card slot and 18 RGB LEDs.
  • Gyroscope++: InvenSense MPU-9250 : 9-axis motion-tracking sensor IMU 9-DOF MPU-9250 9-Axis Attitude + Gyroscope + Accelerator + Magnetometer Sensor Module
  • Battery: The circuitry to charge and use a battery in UPS mode !
  • built-in microphone
  • 3.5mm audio jack

Now that I might have some free time soon, I decided to compile the resources here for my reference, and to see what fun project they might be good for !

1- Links

Unorganized links

new boards, AI Thinker … ESP32-A1S

New boards, LyraT

RAM disk on boot

I will come back and provide some context about why i need this later, for now, if you want your PC to take away some ram and make a RAM disk, you have two ways, I would go with the first

The easy way (tmpfs)

Start by creating a directory to mount the ram disk onto

sudo mkdir -p /hds/ram

Then just add a line like the following to the /etc/fstab file

tmpfs /hds/ram tmpfs defaults,size=80G 0 0
Or, the more elaborate
tmpfs /hds/ram tmpfs rw,noatime,nosuid,nodev,noexec,size=80G,mode=0755 0 0

Now mount it
sudo mount -a (To avoid having to restart)

If you have a dual CPU setup, I recommend you check out NUMA tuning before playing with this

The other way (ramfs)

You will not see real world gains in speed, they are super marginal, and you lose a lot of features like swapping ! Also, it eats up all the ram in advance, ram that could have been used for caching
If you must, it is the same as above, but the line in fstab is the following instead

ramfs /hds/ram ramfs rw,noatime,nodev,nosuid,noexec 0 0

Notes:

1- “df -h” will report an 80 GB disk, even though they are not missing from ram, it is an upper limit, not a pre-alocated space

2- noatime doesn’t matter much, on a ram disk, it is a neglegible load, I add it anyways because none of my applications can make use of ti

3- noswap : swapping a ram disk is probably the worst idea ever ! so you may want to consider

tmpfs /hds/ram tmpfs rw,noatime,nosuid,nodev,noexec,noswap,size=80G,mode=0755 0 0

4- NUMA tuning

Now, to keep all the ram on one CPU, while still allowing it to spill over to the ram from th other CPU when needed, you can pin the process to a CPU and make the ram of that CPU preferred !

Here is an example, if you intend to use the disk with MySQL, you would do as follows

1- Make sure the daemon is called mysql

systemctl status mysqld

2- Create an override file
sudo systemctl edit mysql

3- Add NUMA binding (Empt line means “Clear the existing startup command first”)
[Service]
ExecStart=
ExecStart=/usr/bin/numactl –cpunodebind=1 –preferred=1 /usr/sbin/mysqld

sudo systemctl daemon-reload

sudo systemctl restart mysql

ps aux | grep mysqld

An alternative to all the above would be to pin it to CPUs !

[Service]
CPUAffinity=16-31

The rest is just like the other method

Detecting Light and movement with Arduino

When it comes to detecting light and movement with microcontrollers, one has quite a bit of options, after explaining each one, I will compare them for you at the bottom of this pots

LDR Light Dependent Resistor

This is the simplest one, and it only costs a few cents

Phototransistor

A photo transistor is in my oppinion a great tool to use with microcontrollers, very fast response time (Slightly slower than a photodiode), and can be used with the digital pins, the reason is that it works exactly like a transistor, but instead of enabling the current by providing voltage to the base, the current is provided from light !

So, if you were to connect the Emitter to ground, and the Collector to the digital pin, they would get connected when light is detected, that is it

Photo interrupter

A photo interrupter detects the presence, absence, or movement of an object by sensing when a light beam between an emitter and a receiver is blocked.

This is basically something you would find in your inkjet printer ! or in a factory (Conveyor belt), or most commonly, on en elevator (Door opens when an object is in the way)

The transmitter and receiver work together either side by side or opposing each other, when they are side to side, a mirror reflects the light onto the receiver

If you are trying to detect a red light or a light of the wavelength close to that of the interrupter, odds are that you can use the receiver on its own without the LED (Transmitter), simply do not power it up !

photodiode

PIR (Movement) sensors

PIR Sensors such as the HC-SR501 can detect movement, but they requier more than 1 component, the sensor itself, the plastic cover for the sensor (Pir Lens Cover creates a FRESNEL LENS), and an IC that amplifies the signal and analyzes it !

Project cloud electric meter

The cloud electric meter is a project consisting of a 3 parts

1- A microcontroller and a current transformer (As of now, I am using the SCT-013)
2- A server to collect the data from the microcontrollers
3- A mobile phone app to display the data

The second and third (Server and application) are beyond the scope of what we are doing here, here, I will be examining all the options for a microcontroller and current transformer, With and without the cloud part.

1- The no cloud setup

The first example we will be using is the current transformer (SCT-013) with a nodeMCU ESP8266 that shows data about the current on a screen, this is the simplest setup, and is for people who are here to figure out how to connect their transformer, To do this, you will need a 16 x 2 screen, and an LCD I2C Interface Adapter.

1- Connecting the LCD to an ESP8266 (Tutorials for arduino and ESP32 are all over the internet)
2- Connecting the Current Transformer
3- The software

Connecting the LCD through I2C board

Similar tutorials are all over the internet, this one is here so that I can have a compatible setup between all the devices in the IoT project, the way those 2 boards (The LCD and I2C board) are very popular, and are connected in more or less the same way in all tutorials, but since you are here, might as well make it as simple and complete as possible.

LCD displays require a lot of connected digital pins to work, but this is easily solved with a very cheap LCD-I2C board that connects to my 1602 (16×2) LCD display (Or 2004 20 x 4 LCD modules) with its 16 pins on one end, and connects to your microcontroller (ESP8266, ESP32, Or Arduino, etc…) via 2 I2C pins (SDA/SCL)

The LCD I2C Interface Adapter board is based of a popular 8-bit, remote I/O expander for the I2C bus namely the pcf8574T / ABX919… A remote expander can function as an LCD driver, but it also works for many other purposes, but that is beyond the scope of the simple instructions presented here, here we are interested in driving an LCD screen

The I2C address of can be set by setting the available solder points for addresses in the range of 0x20 – 0x27.

One thing you may want to know is that the jumper at one side of the nameless I2C board is for the LED backlight ! it can be fed through a separate power supply (Remember to combine the ground pins).

In this example, I am using an ESP8266 on a NodeMCU board.

Power

The ESP8266 and the ESP32 are 5V tolerant on the data pins (Proof here), So, because the linear voltage regulator on the ESP8266 NodeMCU board does not have a heatsink, we will be connecting the screen directly to the 5V power source, why burdain the small regulator with the screen !

So, on my I2C board, I connect the GND and VCC to the external power supply (Don’t power the board via USB and connect to the VIN, this is not how it works, VIN is for voltage input, not for output)

So, on my board, the geekcreit doit esp12f devkit v3 (In arduino studio, it is compatible with NodeMCU 1.0 – ESP-12E Module)

The data pins are connected as follows
SDA – D2 – GPIO-04
SCL – D1 – SPIO-05

You are done with this, now, how to print to the screen !

the first step is to find the I2C address, my board provides addresses in the range of 0x20 – 0x27. without soldering anything, the address is probably 0x20, but if not, we can figure it out.

To figure out the address of your LCD display, use the following code

#include <Wire.h>
void setup() {
Wire.begin(4, 5); // SDA, SCL
Serial.begin(115200);
Serial.println("\nI2C Scanner");
}
void loop() {
byte error, address;
int nDevices = 0;
Serial.println("Scanning...");
for(address = 1; address < 127; address++ ) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.print("I2C device found at address 0x");
if (address<16) Serial.print("0");
Serial.print(address,HEX);
Serial.println(" !");
nDevices++;
}
}
if (nDevices == 0) Serial.println("No I2C devices found\n");
else Serial.println("done\n");
delay(5000);
}

Roof screed job

The following all applies to a flat root cement slab that has slight ponding

You will need to apply the cement in 2 phases, 1- the slurry 2- the concrete mix

When i say by volume, what is meant is that 1 cup of cement gets x cups of aggregate, no weight involved

1- The bonding slurry

  • As thin as you can provided it is “Continuous” and “Worked into the surface”
  • thicker is bad not good
  • The concrete layer needs to be added IMMEDIATELY after applying the slurry, within lets say 10 minutes in warm weather
  • consistency should be thicker than emulsion paint

2- The concrete mix

The bare minimum height, for something that is not a foot path, and is not expected to hold any weight is 2.5CM ! cement cant be less than that, it will break and create problems later on !

Consistency = Thick enough to hold its shape

3- The proportions

1- Cement + SBR slurry

Equal amounts of all 3 by volume

1 SBR
1 Watter
1 Cement

The cement mix by volume…

1 cement
3 sand
1 stone dust
2–3 teaspoons per cup of cement, (5–8% of cement volume)

Things to watch out for

Substrate condition

  • Slab is sound (no loose flakes)
  • No dust when rubbed by hand
  • No oil, paint, curing compound, or algae
  • Cracks addressed (at least cleaned / chased)

Moisture state (SSD)

  • Surface is damp but not shiny
  • No standing water in depressions
  • Water does not bead up

Bonding slurry

  • Freshly mixed
  • Thin, paint-like
  • Fully covers area
  • Worked into pores
  • No puddles or ridges

Slurry Finger test

  • Sticky
  • Leaves residue on finger
  • Still dark

Screed mix consistency

  • Semi-dry
  • Holds shape when squeezed
  • No water sheen
  • Does not crumble

M271 thermostat

The lowdown: Before you go and get a thermostat, there is a part that is very often broken along with your broken thermostat, it is the casing (the plastic thing that holds the thermostat in place).

Again, this is my W211, and the process itself is very simple as you will see below, loosen the cold air duct in front of the engine to make room for the screws to be removed, remove a couple of screws, install, then put them back, that is all there is to it.

When i came to change my thermostat, i unscrewed the 2 screws that hold the plastic casing in place at the front of the engine, and before you know it, it dropped, i thought there would be pulling, but no, the spacer that holds the thermostat in place, and is part of the casing/pipe was broken from the word go

Before you try to pull the spacer (Plastic cylinder) from inside, you need to remove the o ring which is likely trapped between the spacer and the engine (Near the surface), once the o ring is out, the plastic cylinder will come right out.

Once you do, your thermostat might be busted, but in my case, the rubber seal was not sitting right, probably due to the broken spacer, and created a space between the thermostat and the spacer, hence the problem