TeCoEd (Teaching Computing Education)
  • Home
    • Freelance
    • Book
    • Downloading
  • Python
    • Learn Python >
      • Python Modules
    • PyGame Zero
    • Python Programs >
      • Higher or Lower
      • Magic Calculator
      • Password Checker
      • Python Pit
    • What's News App
    • Pixels to Cells
    • Python Mosaics
    • Python OCR
    • L-1-AM
    • Web Scraping >
      • Scraping Trains
    • Weather App
    • Snakes and Windows
    • Python Web Server >
      • Flask
    • Python Picks
  • Raspberry Pi
    • All About the Pi
    • Getting Started
    • Remote Desktop and VNC
    • Static IP Address
    • Sonic Pi >
      • 3.14
    • Twitter Feed >
      • Tweepy
    • Android & Pi >
      • Advanced Apps
      • Odds
    • A.I on the the Pi
    • CRON
    • Pick Your Own
  • Pi Hardware
    • Pi HATS >
      • Sense Hat Hacks
      • AstroPi HAT
      • Unicorn-HAT >
        • Unicorn Alphabet Disco
        • Uni Codes / Programs
      • Skywriter
      • Piano HAT
    • STS Pi
    • Pi Camera >
      • Pi-Cam, Python & Email >
        • Time Lapse
      • Pi Noir
    • Pipsta >
      • Flask, Input & Printers
    • Raspberry Pi Power >
      • Energenie IR power
    • Pibrella
    • Distance Sensor
    • LCD Screen
    • Pi-Tooth
    • Robot Arm
    • PiGlow
    • PiFM
    • Accelerometer
    • PiFace >
      • Installing PiFace >
        • Python Commands
  • Pi-Hacks
    • Drone Hacks
    • Pi Glue Gun Hack
    • Blinkt!
    • Sonic Pixels
    • R2D2
    • Get to the chopper
    • Astro Bird
    • Twitter Translator
    • Hacking a Robot
    • Nature_Box >
      • Best Nature Photos
    • Wearable Tech >
      • Project New York
      • P.N.Y Part 2 Health
      • P.N.Y Part 3 Games
      • P.N.Y Part 4 Translation
    • Dino-Tweet
    • Other Links
  • Pi-Hacks 2
    • The Joker
    • Hologram Machine
    • Google Vision: Camera Tell
    • Yoda Tweets
    • Pi Phone
    • Darth Beats
    • Twitter Keyword Finder
    • Crimbo Lights Hack
    • Xmas Elf
    • Halloween 2016
    • Halloween Hack 2015
    • Socrative Zombie
    • Voice Translation
    • The Blue-Who Finder
    • GPIO, Twitter
    • Pi Chat Bot >
      • Dictionary Definitions
    • PiGlow & Email
    • Pibrella Alarm System
    • SMS with Python >
      • Spooking a Mobile
  • Pi-Hacks 3
    • David Bowie
    • Lamp Prank >
      • TEST
    • Yoda FM
    • Retro Player
    • LED Pixel Art
    • TARDIS
    • Battleships
    • LED Board
    • Night Vision
    • Enviro+ Weather
  • Minecraft
    • Minecraft API
    • Minecraft Sweeper
    • PiGlove: Minecraft Power Up
    • Minecraft Photo-booth
    • Rendering Pixels
    • Speed Cube
    • Lucky Dip
  • Computing
    • Why Computing?
    • Can You Compute
    • micro:bit
    • Coding Resources
    • Learn to Code >
      • Coding with iPads
      • Apps Creation Tools
      • sKratchInn
      • Sound Editing
    • Cheat Sheets
    • Theory
    • HOUR OF CODING
    • BEBRAS Computing Challange
    • Computer Facts
    • Free Software and Links
  • Contact Me

The Pipsta Printer


Pipsta is a smart little printer that’s full of big ideas. You can link your Pipsta to your Raspberry Pi and do all sorts of things – from printing labels to tickets.  It is easy to set up and comes with a great set of instructions with diagrams and simple steps.  The Pipsta printer can be purchased from the ModMyPi website.     

Use the Pipsta and its NFC capabilities to tap into the Internet of Things, Internet of People and beyond!  It comes supplied with all the parts that you require.  The Pipsta USB interface enables a fast, convenient set up and fast transmission.  Using thermal printing technology the Pipsta prints quickly, quietly and clearly.
Picture

There is a detailed set of instruction and setup guide which will walk you through the physical putting together of the Pipsta printer.  Allow yourself about 40 minutes.  The only tricky part is ensuring you use the correct holes for the USB and Power cables.  When clipping together the frame ensure the cables are tidy and fed through the around the Raspberry Pi.  
Instructions
File Size: 1385 kb
File Type: pdf
Download File


1. Install the Software


Before you use your Pipsta Printer there are a number of software modules that need to be installed, firstly ensure that your Raspberry Pi is up to date and then install all the software listed below:

In the LX Terminal type:
  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install python-pip
  4. sudo apt-get install python-dev
  5. sudo pip install bitarray pyusb
  6. sudo pip install pillow
  7. sudo pip install qrcode

2. Download the Programs


Next step is to download the programs to enable the Pipsta to communicate with the Raspberry Pi and Python.  The download is available at the following site. Select the file at the top called "download" as shown in the picture below and download it!  Check for updates and a newer version on the site
Picture
Once downloaded navigate to the folder and double click the zip folder called ablesystems.... Extract all the files - simply,
  1. Right click on the downloaded file and select xarchiver. When the window appears select the 'Action->Extract' and then click 'Extract'.
  2. Rename the folder that has just been extracted to pipsta.
  3. Double click on the 'pipsta' folder.
  4. Double click on the 'Examples' folder.
  5. Double click on the 'system_scripts' folder.
  6. Press [F4] to bring up another instance of the LXTerminal.
  7. Type in the two lines as below

          sudo cp 60-ablesystems-pyusb.rules /etc/udev/rules.d
          sudo cp usblp_blacklist.conf /etc/modprobe.d

          sudo shutdown –r now

In each case, ensure you have typed the space before the ‘/etc’.  Connect up the printer and you are ready to go.

3. Testing the Printer


Now you are ready to test your Pipsta printer is working, do this  by going to the File Manager, load up and try some of the provided example programs, go to: pipsta\Examples\1_Basic_Print folder


Open the terminal window by pressing [F4]
Run a simple Python script by entering the following:
python BasicPrint.py Hello from Pipsta\! the t

You can open the example programs in IDLE and run and edit them directly from here.  To chaneg the message that is printer, find the variable txt = and then add your new text or message.  Try out some of the other programs too.

A 7 day Weather Forecast


Code coming soon....

The program users the weather data that is available from Yahoo.com/weather. The method to obtain and scrap this data is discuss in the following article if you looking for more detail.   Firstly you will need to install the Python Parser to grab the data from the Yahoo Website.

In the LX Terminal type:
sudo apt-get install python-feedparser

Open the program below and look for the line,
rss_link ='http://weather.yahooapis.com/forecastrss?w=41415&u=c'

The number 41415 refers to the county / town or location where you want the weather to be grab for the city of York.  You can follow the link here to select your own City and retrieve the unique number.  Replace the 41415 with the number for your city or location.

When the program runs it will retrieve all the XML data which looks like this. Some of the data is useful but most of it is not required -  therefore you have to strip it.  The entries includes all the information required for the seven day weather forecast.  Create a variable to store this data:

summary = d.entries[0].summary

Next step is to find where the weather report begins, this is where it says Current Conditions again create a variable.  

report_pos = summary.find("Current Conditions:")

Then use the code to start replacing all the XML tags with blanks, this keeps the spacing the same but removes the redundant tags such as <br>, quite a lot of stripping!  Then strip out any empty white space.
  
weather_report1 = new_text.replace("<br />","")
weather_report2 = weather_report1.replace("<b>","")
weather_report3 = weather_report2.replace("</b>", "")
weather_report4 = weather_report3.replace("- ", "")
weather_report5 = weather_report4.replace(": ", "")
final_weather_report = weather_report5.strip(" ")

Final Code


Final_Weather_Report.py
File Size: 5 kb
File Type: py
Download File

Copyright 2021 TeCoEd @dan_aldred