Rui Santos has written a great guide shows us what’s Deep Sleep and how to use it with the ESP8266 in the Arduino IDE.
With most of the ESP8266 modules, you can’t change the hardware to save power, but you can write software to do it. If you use the sleep functions with the ESP8266, it will draw less power and your batteries will last longer. In this guide, we’re going to talk about Deep Sleep with the ESP8266.
This display, available also as a standalone module on several websites (for example on Banggood), has the following features:
size: 0.96 inches
resolution: 128×64 pixels
controller: SSD1306 with I2C interface
power supply: 3.3V – 6V
It’s very easy to interface it with the esp32 chip thanks to the work of olikraus and Neil Kolban. The first wrote the u8g2 library, while the second implemented the specific functions of the u8g2’s hardware abstraction layer (HAL) for the esp32.
u8g2 is a fantastic library for monochrome displays: it supports several types of displays and controllers, it’s easy to port to new platforms and offers many methods to draw geometric figures, display images and write strings using different fonts.
Let’s learn how to use it in your project. First download the archive with the content of the library’s Github repository:
If it doesn’t exist, create the components folder in the main folder of your project. Unzip the archive into that folder and rename the subfolder u8g2-master in u8g2:
In the u8g2 folder create a file named component.mk with the following content:
full framebuffer means that all the data to send to the display are stored in the RAM memory of the microcontroller. This makes easier and faster to work with the display but consumes more RAM. The u8g2 library also supports a page buffer mode to save some memory. A comparison between the different modes, with pros and cons, is available on the library’s wiki.
Finally – if you’re using an I2C display – you have to specify its address (here 0x78):
After the setup, initialize the display with:
The display is now in power save mode, to “turn it on” you have to disable this mode with:
Now you can call the different methods available to display text, images, shapes. If you’re using the full framebuffer mode, first prepare the buffer in memory and then send it to the display.
Prepare an empty buffer with ClearBuffer():
Now for example use the SetFont() and DrawStr() methods to write a string into the buffer with a specific font:
and finally display the buffer’s content on the display with:
In the following video I quickly explain how to install the library, how to prepare an image to be displayed and in the end you can see the execution, on my D-duino-32, of the example program available on Github.
A short app note from Silicon Labs on burying pads to prevent snopping on keypads. Link here (PDF)
An individual’s financial matters are increasingly electronic in nature and decreasingly interpersonal. As financial institutions replace human interaction with electronic interfaces such as ATMs, the need to make electronic circuits tamper-proof becomes critical. A typical numeric keypad for financial transactions may contain up to hundred or more tamper prevention and detection features. Tamper detection circuits raise alarms and disable functionality, while tamper prevention features are designed to prevent intrusions and breaches. This application note addresses the elimination of copper pads on the accessible top surface of printed circuit boards (PCBs). Burying traces to internal layers of a PCB prohibits electrical contacts from snooping on copper elements within the PC board.
Application note on driving E Ink displays from Renesas. Link here (PDF)
E Ink segmented displays are direct drive displays consisting of E Ink Vizplex Imaging Film sandwiched between two electrode layers, the top plane and the backplane, and then encased in an environmental barrier solution to protect the film and the segment electrodes. To get the most from E Ink segmented Displays, you need to be aware of proper design and implementation. Your reward will be sharp, precise images, a pleasant transition from one image to the next, and a long battery life.
Using e-paper for a weather station is an ideal solution, as the data does not need to be updated often. By default, the station reaches out every 20 minutes for new data over WiFi and then updates the display. Daniel Eichhorn already has published kits for OLED (see “WiFi OLED Mini Weather Station with ESP8266“) and touch display (see “WiFi TFT Touch LCD Weather Station with ESP8266“). I like them both, but especially the TFT one is very power-hungry and not really designed to work from batteries. What I would like is a station which can run for weeks.
Seems there’s a new Information Technology video out! Wonder if it’ll be funny? Speaking of Information Technology, Weekly Roundup #46 is here with a couple of new SBCs, interesting gossip and a bit of clowning around. Kickstarter xaVNA First up on KickStarter is the xaVNA. This is a Vector Network Continue reading Weekly Roundup #46 – New Maker Products→
Halloween was right around the corner and I needed a timer with a bunch of relays to trigger some store-bought props and a fog machine periodically. (Mental note: read fog machine specs carefully—not all come with timer remotes.) My first thought was an Arduino and cheap relay board. Second thought was to build something with a micro and some relays. Third thought was that if I’m going to build something, might as well add DMX and package it up into a neat enclosure. Hence, the four channel DMX-controlled relay project was born.
The security of several protocols is implemented using SSL certificates. Usually, those certificates are created by public certificate authorities. If we’re connecting to a website (HTTPS protocol), the browser we’re using must recognize the identity of the CA that signed the server certificate, otherwise an error message is shown:
A CA “creates” a new certificate signing it with its own certificate… you can find more than one level, for example the Google certificate (in blu) has been signed by an intermediate CA (green), whose certificate is signed by a root CA (red):
To consider the certificate valid, the browser or the operating system must have the certificates of the CAs that signed it in their trusted repository:
Today I’ll explain you how to create a CA using an opensource tool, OpenSSL. This CA will be very useful everytime you’ll need an SSL certificate for internal use.
After having installed the OpenSSL tool, create a new folder dedicated to the CA (in my example, MyCA).
Within the new folder, create some empty folders and files:
Open the “serial” file and type the value 1000 (this will be the serial number of our first certificate).
Now download from my Github repository the openssl.cnf file and copy it in the MyCA folder. This file contains the whole configuration of the Certificate Authority.
Open the file and change the dir parameter with the path of your CA’s main folder:
Now generate the private key of your CA. All the following commands must be issued in the MyCA folder:
OpenSSL will ask some information; the most important of which is the Common Name, that is the name which identifies your CA:
Let’s now generate client or server certificates using your new CA.
Generating a new certificate starts from a private key, that will be safely stored on the system which will use the certificate (for example on the webserver that will publish the site in HTTPS). Then you have to generate a CSR (certificate signing request) from the key. The CSR is the file that will be signed by the CA to produce the final certificate.
As CA administrator, you can receive the CSR file from the end user; alternatively you can generate it using OpenSSL:
1. generate the private key (RSA algorithm) for your new certificate:
I picked up a Roland SC-55 to use with my retrocomputer setup recently, and I figured it would be cool to turn the thing into a standalone midi jukebox, so that no “computer” is required. I also figured this would be relatively easy, using a raspberry pi as the controller to drive the SC-55. My first step was to figure out how to get MIDI out from a raspberry pi. One option would have been to purchase a USB-MIDI adapter. This would have worked, but I really wanted to develop a native raspberry pi MIDI interface rather than using USB. MIDI is a fairly simple interface, and the raspberry pi has built in serial capability, so this ought not to be too difficult.
Project details can be found on Dr. Scott M. Baker’s blog.
Check out the video after the break.
This website stores some user agent data. These data are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to opt-out of any future tracking, a cookie will be set up in your browser to remember this choice for one year. I Agree, Deny