Skip to main content

Posts

Adafruit GFX - How to change line spacing in text?

  You may want to update the line spacing to be a little lower than default due to small screen size on IoT devices. I faced this challenge while working on a Watchy hobby project. You may have used a font generator or just using the default fonts and got a *.h file that has the details of the font. In that case just change the last integer value in the PROGMEM variable.
Recent posts

Notes on Installing certificate in linux java cacert from a remote host (WIP)

Check the certificates installed or not Find the actual java location using readlink -f `which java` Go to jdk/jre/lib/security Run the command : ../../bin/keytool -list -keystore cacerts Get the Certificate (This is WIP, was not getting the correct certificates) Use either of these commands to get the certificates ( need to modify) openssl s_client -showcerts -connect 10.101.12.89:8087 /dev/null|openssl x509 -outform PEM >emailuat.pem echo -n | openssl s_client -connect 10.186.18.23:8084 \     | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > emailuat.cert Install the certificate Find the actual java location using readlink -f `which java` Go to jdk/jre/lib/security Run the command ../../bin/keytool -import -trustcacerts -alias emailuat -file /home/akhil/emailuat.cert -keystore cacerts

Configuring Git Aliases and Workflow

Let's agree, no matter what language you code in, developers life is incomplete without using git.  These are some notes from recent video I watched about git-workflow from Gary  Bernhart's . He shows some cool demonstration of git aliases and workflow he follows. The git config can be directly used by replacing the .gitconfig and adding the .githelpers at [2]. Prerequisite : You must install diff-so-fancy from [1] and add it's lib folder to the system PATH I guess I can now live without GitKraken at some point..  Usage (alias): [alias]     st = status     ci = commit --verbose     co = checkout     di = diff --find-copies-harder     dc = diff --find-copies-harder --cached     amend = commit --amend     aa = add --all     ff = merge --ff-only     noff = merge --no-ff     fa = fetch --all     pom = push origin master     ds = diff --stat=160,120     dh1 = diff HEAD~1     # Divergence (commits we added and commits remote added)     div = divergence     # Goodness (summary of

Installing Flutter In macOS

The google documentation was a bit confusing. So here are the notes to install flutter in mac: Download flutter sdk :  https://flutter.dev/docs/get-started/install/macos#update-your-path Unzip the flutter sdk in the username folder of your mac. From your username folder type vi .zshrc Paste the line : e xport PATH="$PATH:/Users/akhilkarun/flutter/flutter/bin" Restart terminal Type flutter --version Done. macOS version: 10.15.4 flutter sdk version: 1.17.0

Learning Logs

Uncle Bob Video Series SOLID Principles Ep-13: Dependency Inversion  Gist: Role reversed with example son taking care of mom.High level policy should be ignorant of the low level details. For example every IO driver in unix should confirm to the IO Driver Interface and implement the standard Open, Close, Read, Write , Seek functions. Ep-14: SOLID Case Study Gist: DB should be a plugin, Delivery mechanism (UI) should be a plugin Components Ep-15: Solid Components Gist:  What is a component? Component is an independently deployable software. How to start a design? Identify the actors. Then, start with the 'S' in SOLID. How to implement? High level policy should be ignorant of the low level details. Ep-15: Solid Components Gist:  When component changes, only 1 component per layer should change. Release Reuse Equivalent Principle: You cannot reuse a component unless the author is willing to manage it thru a release cycle (19:44?) Responsibility (in

Book Review: One Straw Revolution by Masanobu Fukuoka

These are really quick notes made while reading the book 'One Straw Revolution'. This book was written by a Japanese farmer and highly recommend read.  It not only talks about natural farming, but also leading a simple way of life. Modern life and science has only found solution to the problem they have created. A person living in nature doesn't need schooling, he needs it only when he has moved far from nature. Similarly, modern farming has only found solution to the problem they have created. It is like this. A scientist read over thousands of journals and theory papers in his quest for inventions. And when he pause to find what is his quest it is 'inventing eyeglasses'. Every farm balances itself out. Insects and plants are automatically balanced.  Later in the book he also points out that crude oil is produced by plants being under high pressure of earth for millions of years and they turn into crude oil which are extracted, transported and processed. Eve

Building Autonomous Drone with Raspberry Pi and APM 2.8

I am a total newbie to hardware and was pushing my limits to see how far I can reach on with hardware projects (which sparked my interest lately). I have set out on a very ambitions mission  to control a drone from raspberry pi .I began the research for this around 2 months ago and had brought a raspberry pi, drone body kit and apm flight controller. The key difference of this project from common drone projects is that I'm trying to avoid the use of and RC and instead use the raspberry pi to control it.  Hardware Ins tallation Setup: I am using APM 2.8 and Mission Planner. I am using RPi 3 to control the APM 2.8 via Telem port of APM I am planning to power the apm via the battery to ESC (Electronic Speed Controllers) Now, documenting my steps below: Day 1 Watch Tutorial To get started with APM flight controller, I watched this video tutorial [1] which gives a gentle introduction about APM board.  Setup APM board and Calibrate Sensors I downloaded the APM Missi