Topic of the day: 

FontAwesome icons and printing them on an OLED screen ran by Kali Linux (p4wnpi)

Today my goal was to add icons to the OLED script which correspond to the KEYx buttons.  For example, I want a keyboard icon next to the KEY1 button so the user knows to use that button.

 

Also see my OLED P4wnpi page.

I went to install fontawesome on P4wnPi, but the Pi had lost the ability to switch Network profiles (due to something I installed previously which took over the WiFi and bungled it up).

 

So I re-flashed the image of p4wnpi that I have which I know works.  Now I set off to install fontawesome and add some icons!

 

Install FontAwesome on Raspberry Pi (Kali Linux)

pip install pypandoc

pip3 install fontawesome

 

Note 1 - Important:  "pip install fontawesome" didn't work for me.  So I tried pip3 and it worked (after installing "pip install pypandoc")

Note 2:  I had to install pypandoc before fontawesome, actually (since I got an error saying it's missing):

 

Use FontAwesome

To use fontawesome in a python3 script after it's installed:

import fontawesome as fa

print(fa.icons['thumbs-up'])

 

 

Re-flashed my healthy p4wnpi image

To do after re-flashing:

Installing the SH1106 library gets rid of the "Module not found: SH1106" error message.

 

To install SH1106 OLED driver library, follow the steps at the bottom of this link:

https://github.com/pimoroni/sh1106-python

 

At the end of the day, I got sidetracked and ended up organizing and backing up all my scripts and files.

I did manage to get fontawesome installed, but only when I was knee-deep in re-building the p4wnp1 image (since something I did messed up the WiFi control before).

 

So basically I had to revert to the "menuwithip.img" Kali image, re-install the things listed above, make sure WiFi still works, and then install fontawesome.

Now the oledp4wnp1 script is ready to try printing fontawesome icons.