Friday, June 25, 2021

Using a thermal printer on your Raspberry Pi #PiDay #RaspberryPi @Raspberry_Pi

James Gallagher posts about a handy project using a Raspberry Pi and an Adafruit Thermal Printer:

A few days ago, I decided to purchase the Adafruit Thermal Printer, which was compatible with the Raspberry Pi. This thermal printer has been on my mind for a while but this week a reason for buying one came to mind (aside from the fun of experimenting with a thermal printer which was obvious to me). I decided that I wanted to generate a random Aeropress recipe that I could then print.

James branches out on what the printer does in subsequent posts:

I want to create a daily update for myself that is printed out. My goal is for this update to be printed out every day before I wake up, perhaps at 6am. The update will be scheduled using cron, which will run a specific program at 6am or whenever I decide the update should be printed. The code for the printer will be kept on my Raspberry Pi so that I can have my printer running 24/7.

The logic for the new RSS module is as follows:

  1. Print message informing me the next section of the daily update will show my RSS feeds.
  2. Get articles in my main feed from Feedly.
  3. Iterate over each article and check if it was published yesterday.
  4. If an article was published yesterday, the title and URL of the article should be printed to the console.
  5. Otherwise, nothing should happen.

Check out the details in the blog post starting with this one here.

No comments:

Post a Comment