Back to Basics – A ESP32 Radio Player using Piezo Electric Elements

In one of my last year’s posts I was describing how to build an Internet Radio using an ESP32. I was using this together with an external DAC to feed an Amplifier. Lately I got some really cheap Piezo Electric Elements and I was wondering if I could use the solution w/o any additional Audio Electronics Hardware by just using the built in DAC of the ESP32 and connecting the 2 output pins to the Read more…

An Arduino C++ Emulator (for Jupyter)

I really wanted to have an interactive Jupyter environemnt in which I could play around with Arduino commands and when I discovered that Arduino provides a good starting point with their ArduinoCore-API I started to draft this prototype. I am using xeus-cling as a runtime environment to simulate an Arduino Development board and I have added the related implementation using C or the C++ std library. The goal is finally to be able to provide Read more…

Simple HTTP Requests on Arduino Microcontrollers

For one of my current projects I had a closer look into the HTTP Protocol. Usually you might use a separate library for doing http calls from Arduino (e.g. with an ESP32) but if you are low on memory, you might get away without this by just using the WiFiClient: Setting up a WiFi connection On an ESP32 you would e.g. do the following: First you need to connect to WiFI and then you can Read more…

From WordPress to a Static Website

WordPress plugins such as the Simply Static and others have the ability to automatically convert each of the WordPress pages and posts into static HTML files. I tried it in my environment but without any convincing result: When I double checked, the exported pages did still contain URLs which were pointing to the server, so on first sight everything seemed to work, but if you switch off WordPress the exported files stopped to work as Read more…

Ranting against C++

When I was in University 40 years ago, I was a big fan of C++. However I never had the need to do any projects in this language so far. I did plenty of work in ABAP, Java and later on enjoyed the relaxed approach on the usage of semicolons in Javascript and I also did some work in Python. That changed when I discovered the world of Microprocessors and Arduino and I used C++ Read more…

C++ Lambdas in Arduino

I had the need to pass some callback functions to some of my generic C++ Arduino classes. So I was asking myself if we can use Lambdas in Arduino. Here is a small test sketch, to verify this. #include “TestLambda.h” void setup() { auto f1 = [](int number) { Serial.println(number); }; LambdaTest t(f1); t.callLambda(123); } void loop() { } And here is the related TestLambda.h content: #include <functional> class LambdaTest { public: LambdaTest(std::function<void (int n)> Read more…

Accessing Remote Files from an Arduino (with FTP)

I was looking for a Arduino library which would allow me to access remote files on a Linux server. Unfortunately I did not find anything that I liked. So I came up with my own solution which is based on FTP. The FTP protocol is one of oldest communication protocols: It is easy to implement and therefore rather efficient and you can find plenty of free server implementations on all platforms. The library provides a Read more…

Jupyterlab and C++

Today I tried to create a Dockerfile for XEUS-Cling in Jupyterlab. The challenge was, that the installation is done with conda which is a little bit tricky to use together with Docker. After some unsuccessful trials, I finally came up with the following working solution: FROM continuumio/miniconda3:4.8.2-alpine MAINTAINER phil schatzmann USER root RUN apk add –no-cache bash SHELL [“/bin/bash”,”–login”,”-c”] ENV PATH /opt/conda/envs/cling/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN conda create -y -n cling xeus-cling xeus-python jupyterlab -c conda-forge WORKDIR /home/xeus-cling Read more…