Title: How to connect to a satellite with Raspberry Pi
Date: Sat, 05 Nov 2022 14:06:04 +0000
Desc: Have you ever wondered whether Raspberry Pi can talk to a satellite? I put this guide together to show you how a Raspberry Pi can indeed connect to a satellite
Category: Raspberry Pi
Source: Chris
Have you ever wondered whether Raspberry Pi can talk to a satellite? I put this guide together to show you how a Raspberry Pi can indeed connect to a satellite to send and receive short messages.
A satellite transceiver can be used by the Raspberry Pi to send and receive short messages via the Iridium satellite network. These transceivers typically cost between $250 and $470, with a monthly subscription plan of approximately $15 also required to send and receive data via satellites. An antenna and power source is also required.
Raspberry Pi can communicate with the Iridium satellite network
Connecting a Raspberry Pi to a satellite is useful for:
Collecting sensor data from remote locations
Sending commands to other devices remotely (such as operating a motor)
Locations where there is no cellular coverage available (shipping, aviation, out in the middle of the Australian outback, etc.)
This guide focuses on using the Iridium satellite network with short message communication. Check out the References section below if you’d like more detail on how short message communication works with Iridium satellites.
Step 1: Buy a satellite transceiver and a prepaid communications card
The transceiver is the module that handles communication between the satellite system and the Raspberry Pi. It is responsible for establishing the link with the satellite, transmitting any data out to the satellite, receiving any data in response, and closing the connection. The Raspberry Pi supplies or receives the data via its connection to the transceiver.
A satellite transceiver for Raspberry Pi typically costs between $250 and $470. Transceivers at this price range are designed to work with Raspberry Pi and are supported with the necessary libraries to write code. The most common transceivers for working with Raspberry Pi are locked to communications provider Rock Seven, who subsidise the hardware in favour of usage charges.
More expensive satellite transceivers are available ($500-$1000+), typically in the form of modems with a serial communication link (e.g. RS232). These are designed to work with computers in general using a serial link, and may require some additional coding and tweaking to get running on a Raspberry Pi.
Transceiver
Cost
RockBLOCK 9603N
$267.50
RockBLOCK Mk2
$274.95
SparkFun Artemis Global Tracker
$468.75
Qwiic Iridium 9603N
$249.95
Price comparison of satellite modems compatible with Raspberry Pi
The above transceivers are locked to communications provider Rock Seven who uses the Iridium satellite network. If you want to use a different communications provider, the transceivers can be unlocked for a fee of $60.
Data costs roughly $15 per month for the connection and $18 for 100 credits. Each credit is spent on a 50 byte message sent or received using the satellite network. At 50 bytes, messages sent from the Pi would have to be very specific to a purpose (like a reading from a remote sensor – I wrote a whole guide on connecting sensors to the Pi, check it out here).
I’ve found Rock Seven to be a little more expensive than other communications providers using the Iridium satellite network (see References below), but it appears to be the price paid to have hardware and software libraries developed by the manufacturer designed to support Raspberry Pi.
An antenna is also required for the transceiver to reliably communicate with the satellite. A basic antenna costs roughly $60-$70.
Power required for the transceiver is roughly 0.5W to 2.5W depending on the transceiver’s communication with satellites. It runs at 5V and consumes between 100mA and 500mA. I would try turning it off when not in use if power conservation is an issue. If you’re worried about how much power your Raspberry Pi project is going to use, check out my guide here for some estimates on the power consumption of a Raspberry Pi in different scenarios: chipwired.com/raspberry-pi-power-use
Step 2: Connect the transceiver to the Raspberry Pi
Most satellite transceivers expose a serial interface that can be used to communicate with the Raspberry Pi. This is typically UART or I2C. Most of the satellite transceivers I looked at also included RS232 communication, though I wouldn’t recommend using this to interface with a Raspberry Pi (it’s too complicated, convert it to USB instead if you really must use RS232).
The interface for the 4 transceivers I listed above is described in the table below:
Transceiver
Interface
RockBLOCK 9603N
UART, USB (RS232)
RockBLOCK Mk2
UART, USB (RS232)
SparkFun Artemis Global Tracker
SPI, I2C, USB
Qwiic Iridium 9603N
I2C
Interfaces used to communicate between the transceiver and the Pi
The SparkFun Artemis Global Tracker is essentially a microcontroller in its own right, so you can program it with your own code for communicating with your Raspberry Pi over SPI, I2C, or even via the satellite communication link.
I recommend using UART, SPI, or I2C to communicate between the Raspberry Pi and a satellite transceiver. I’ve found these protocols easier to work with than USB/RS232.
To connect the transceiver to the Raspberry Pi, wire the Raspberry Pi GPIO pins to the corresponding transceiver pins depending on which communications protocol you’re using. An example for I2C is to use the pins highlighted below:
I2C pins on Raspberry Pi GPIO
For more detail of the pin numbering, check out the guide here.
A decoupling capacitor and pull-up/down resistor may also be required depending on the type of communication protocol you decide on.
Step 3: Write the code
Code used for communication between the Raspberry Pi and the satellite transceiver is typically written in Python or C. There is also a Node.js library that seems to be available, but I couldn’t get access to try it out. The easiest way I found to get started with Raspberry Pi is using Python.
To communicate with the satellite transceiver using Python:
Import rockBlock (the pyRockBlock library)
Establish a connection with the transceiver
Send or receive a message to the satellite network
Close the connection
A more detailed guide with code examples can be found on the website of the library author here. This library appears to work with a USB or UART connection to the transceiver.
Note that when running your code, it will probably take a while to establish the connection with the satellite network (20-30 seconds). Don’t be surprised if things are a bit slow when your code is running.
There is also an easy setup utility available if you’re using the Artemis Global Tracker, check it out here.
You will also need to register with the Rock Seven online portal before being able to communicate with a satellite. Check it out here.
Title: How to connect sensors to Raspberry Pi (step by step guide)
Date: Wed, 12 Oct 2022 14:16:58 +0000
Desc: I believe sensor projects are one of the best ways to use a Raspberry Pi. A Pi can easily be setup to collect data from sensors, and use that data
Category: Raspberry Pi
Source: Chris
I believe sensor projects are one of the best ways to use a Raspberry Pi. A Pi can easily be setup to collect data from sensors, and use that data to make decisions. This is fundamental to many great Raspberry Pi projects. When getting started with Raspberry Pi sensor projects, you might be wondering how to even connect a sensor to the Pi. In this guide I’m going to show you how to connect a sensor to the Raspberry Pi.
Most sensors connect to the Raspberry Pi’s GPIO. Digital sensors can connect directly to the GPIO, while analog sensors need to connect via an analog-to-digital converter. Additional components such as small resistors or capacitors may need to form part of the circuit for the sensor. Sensors connected to the GPIO can be read using the Rpi.GPIO library for Python.
I made a video demonstrating the steps of connecting a sensor to a Raspberry Pi, check it out here:
In this guide below I walk you through:
How to identify which GPIO pin to use
How to wire the circuit to the Rasperry Pi GPIO
How to write code to read in from the sensor
Step 1: Identify which GPIO pins to use
Most sensors will connect to the Raspberry Pi GPIO directly or through an analog-to-digital converter (ADC). This depends on the type of output that the sensor is capable of: A sensor’s digital output can connect directly to the GPIO, but if you want to use the analog output it will need to be connected to an ADC first.
The table and diagram below list GPIO pins you can use to connect a sensor to a Raspberry Pi, based on the output of the sensor:
Raspberry Pi 4 pins that can have sensors connected to them
Raspberry Pi GPIO digital input pins (for connecting sensors)
GPIO pin numbering does not match the physical numbering on the Raspberry Pi board. For more detail and alternative pins that you can use, check out the pin diagram here.
SPI and I2C are more advanced communication protocols that allow two way communication with the sensor device (you can send it commands from your code, as well as read back data).
While it should be possible to connect multiple outputs from a single sensor to the Raspberry Pi, I don’t recommend doing it. Unless the manufacturer explicitly states this is ok, it might cause problems with readings depending on in the internals of the sensor.
If you’re not sure on the sensor’s output, try the following:
Reading the datasheet of device – even the most basic sensors typically have a datasheet describing their characteristics and how to connect them
Examining the board – many sensors bought for Raspberry Pi projects arrive mounted on a simple integrated circuit, this is often labelled with hints on how to connect it
Digital output pin on a sensor (GND and VCC also need to be connected to the Pi)
I’ve occasionally had trouble finding the right datasheet for my device when using Google. Often this is because the manufacturer provides a generic datasheet for a series of their devices which have mostly the same characteristics but vary slightly (e.g. pin type). Keep an eye out for functionally similar devices (and their datasheets) from the same manufacturer if you can’t find the exact one for your sensor.
Step 2: Wire the circuit
The sensor needs to be wired to the GPIO to form a circuit. Typically this includes other components, such as a resistor and/or a capacitor. When experimenting with a Raspberry Pi project, it’s often easier to plug all of these components into a breadboard to form the circuit. In the final product, components should be mounted to a circuit board.
I often wire sensors directly to the GPIO without any other components. This is a bad practice and I might one day damage my Raspberry Pi while doing it.
Good practice is to include typically a resistor and/or capacitor in the circuit to smooth the current a bit. A set of resistors performing the role of a voltage divider may also be needed to ensure your sensor outputs at the Raspberry Pi GPIO requirement of 3.3V.
Components typically required to wire a sensor to the Raspberry Pi are included below:
Component
Purpose
Resistor
To hold the voltage for a digital signal high or low, keeping it out of an undefined state.
Capacitor
To filter out noise from the signal.
Transistor
To amplify a signal. Usually not necessary in a basic Raspberry Pi sensor circuit.
ADC
Analog-to-digital converter, used to convert the signal from an analog sensor to a set of digital numbers that can be used by code running on the Pi.
Common components used when connecting sensors to a Raspberry Pi
If using an analog sensor with an ADC, you will also likely need to wire the sensor to the GPIO (unless it’s an ADC hat).
For the type of wire to use, you will most likely need 22 AWG jumper wire with female ends. If using a breadboard, you might need a male end for connecting the jumper wire to the breadboard. If you need more detail on the type of wire to use with Raspberry Pi, check out my guide here: chipwired.com/raspberry-pi-wires.
Step 3: Write code to read from the sensor
Python is the easiest language to use when writing code to read from a sensor connected to a Raspberry Pi. To read from a sensor using Python you need to import a GPIO library, configure the GPIO pins for reading or communication, then use the library to read the sensor.
Overall my preferred library is RPi.GPIO, though the table below lists examples of the libraries you can use to read from a sensor:
An example of the code that I used to read from a digital input sensor is as follows:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)
print(GPIO.input(17))
In this simple code example we do the following:
Import the RPi.GPIO library (and call it GPIO)
Set the mode of the GPIO to BCM (to align with our GPIO numbering)
Set the GPIO pin 17 to be an input pin
Read from pin 17 and print it to the command line
If using one of the other sensor types, your code will be more complicated and depend more on the type of sensor and way you communicate with it. The basics are still the same though: Import the library; setup the hardware; read from the sensor.
For more detail on the variety of ways Raspberry Pi can collect data (and it’s not limited to only sensors), check out the guide I wrote here: chipwired.com/collect-data-with-raspberry-pi
Data read from a sensor, or collected by other means, is typically used in making decisions that the Raspberry Pi will enact. The diversity of these actions are why I love Raspberry Pi: Based on sensor data it can update your calendar, light up an LED, display something on a monitor, turn the wheels of a robot, and much more!
Data read from the sensor can also be saved to the Raspberry Pi for further analysis later. The most popular ways I’ve found to save sensor data on a Raspberry Pi include:
CSV file
Cloud storage (uploaded using an API)
SQL database (such as SQLite)
These data storage methods make it easy to analyse the data later, such as by using Excel or other data analysis tools. For more detail on data storage for Raspberry Pi, check out my guide here: chipwired.com/raspberry-pi-store-data
Title: How to find Raspberry Pi memory amount (complete guide)
Date: Sun, 18 Sep 2022 13:11:36 +0000
Desc: When working with small computers it can be important to monitor the amount of memory and storage space that is available to the programs running on the device. Small and
Category: Raspberry Pi
Source: Chris
When working with small computers it can be important to monitor the amount of memory and storage space that is available to the programs running on the device. Small and embedded computers often have memory and storage constraints compared to mainstream computers and the software that runs on them. As part of my series on unleashing the power of small computers, I put together this guide on how to find out the amount of memory that a Raspberry Pi has (whether that’s RAM or SD card storage space).
To find the amount of memory that is available on a Raspberry Pi, open up a terminal and type in cat/proc/meminfo | less. This command will display the amount of memory that the Raspberry has in total, and has available for use. To find out the amount of space on the SD card, the command df -h can be used.
Output of the cat /proc/meminfo | less command when run on my Raspberry Pi
Another way to find out the amount of memory is to figure out which model you have and then find out the total amount of memory from the Raspberry Pi spec sheet. To find out which model you have, check out the guide I wrote here: chipwired.com/identify-raspberry-pi-board
In this guide on Raspberry Pi memory I’ve looked at:
How to find the amount of random access memory (RAM)
How to find the amount of memory on the SD card
Some ways to add more memory to your Raspberry Pi
How to find the amount of RAM
The special system file meminfo contains details of the Raspberry Pi memory, including how much is available and how much is currently being used. By accessing this information from the terminal, we can find out how much memory a Raspberry Pi has.
To access information about the amount of memory that the Raspberry Pi is using as RAM, open up the terminal and type the command:
cat /proc/meminfo | less
The number next to MemTotal is the amount of memory (as RAM) that your Raspberry Pi has access to. This number, in kilobytes, is slightly less than the advertised amount due to decimal-binary conversion and the kernel reserving some for itself (see Slab amount).
I ran this command on a Raspberry Pi 4 with 4GB of memory. As you can see, it contained roughly 3.8 million kilobytes of memory.
You can scroll through meminfo to see other details about the Raspberry Pi’s RAM use by using the up and down arrow on the keyboard. Other info to look out for in this command includes:
Slab – memory used by the kernel for itself
MemFree – memory not used for anything
MemAvailable– memory that can be allocated to a program (e.g. if you write some code, this is the physical memory that is available to you)
If you’re interested in more detail about kernel memory, check out the rabbit-hole of kernel memory allocation that starts here. For more detail about meminfo, check out the guide here.
An alternative command that can be used for displaying the amount of memory on your Raspberry Pi is free. To use this command, open a terminal and type the following:
free -h
The -h instructs the command to print the output in a “more human” readable format (i.e. rounding to MB and GB instead of millions of bytes).
How to find amount of SD card memory
The easiest way to find the amount of memory (storage) on your Raspberry Pi SD card is by using the fdisk command. This command is intended to be used to help you partition your storage so that it can support various file systems or operating systems. It has an option to report to you the size of storage available on your SD card as well.
To access information about the size of your SD card, open up a Raspberry Pi Terminal and type the following command:
fdisk -l
This command lists out all the partitions on your SD card, including the size of each partition. By default, there should be 2 partitions on your SD card – 256MB for the boot files, and the remainder of the SD card that can be used by the Pi.
Storage partitions on my Raspberry Pi listed using fdisk
In my photo above, I have 59.2GB available for Raspberry Pi OS and to store files on my Raspberry Pi.
By separating the storage into partitions like this, a Windows computer is able to change boot files (such as HDMI and WiFi settings), while the Raspberry Pi OS can use the Linux file systems for storage and running the Pi.
The amount of storage is less than the SD card total. This is due to the conversion between decimal and binary bytes, as well as overhead in formatting and partitioning the storage space. In my example above, I’m using a 64GB SD card for Raspberry Pi OS.
To find out how much is used, we can use the df command. The df command is designed to tell us how much disk space is being used by files (including the operating system).
To use the df command to find out how much space is free on the Raspberry Pi SD card, open a Terminal and type the following command:
df -h
This runs df with the -h flag making the numbers more readable to humans (rounding to the nearest gigabyte or megabyte depending on what makes the most sense.
Free space available on my Raspberry Pi
How to add more memory to the Raspberry Pi
More RAM can be added to the Raspberry Pi by allocating a portion of the SD card to act as swap space. The swap space is used by the Raspberry Pi if the physical RAM is filled up. To find out more about swap space, check out the detailed explanation here; the process of adding swap is complicated, but if you’re interested check out the guide here.
If more SD card space is required, there are two options: Adding an additional SD card via the USB or GPIO interfaces with the respective reader, or by migrating Raspberry Pi OS to a bigger SD card. Check out the guide here if you’re interested in how to migrate Raspberry Pi OS to a bigger SD card.
If you’re looking to add storage for data collected by the Raspberry Pi, there are a few more options such as cloud storage, network storage, or even on-board flash memory. Check out my guide here for more info: chipwired.com/raspberry-pi-store-data.
Title: Can Raspberry Pi be powered by USB? (tests included)
Date: Wed, 31 Aug 2022 14:52:33 +0000
Desc: “If it fits, it works” – this is not a philosophy that I’ve found to put your Raspberry Pi project at risk of not working. Even though the Raspberry Pi
Category: Raspberry Pi
Source: Chris
“If it fits, it works” – this is not a philosophy that I’ve found to put your Raspberry Pi project at risk of not working. Even though the Raspberry Pi uses a USB connector for its power source, it is important to consider where that USB cable connects to. If it doesn’t supply enough power, your Raspberry Pi won’t work.
It is not recommended to power a Raspberry Pi from the USB port on a computer. USB ports are often unable to provide sufficient current to match the power requirements of the Raspberry Pi. The Raspberry Pi will shut off immediately if sufficient current is not available.
NOT RECOMMENDED, but possible to power Raspberry Pi from computer USB
Even though the Raspberry Pi will turn on when connected to the USB port on a computer, I do not recommend relying on this power source when running your Raspberry Pi – it may suddenly shut off!
I discovered this when I was testing how much power a Raspberry Pi draws (for my article on power use here). My Pi kept shutting off when I was doing some of the power tests, and it took me a while to figure out this was due to the power supply I was using being unable to supply sufficient current (it was only a 1 amp power supply and I was making the Pi draw more than 1 amp).
In this guide I’ve looked at:
Why you shouldn’t power your Pi from a computer’s USB (more detail on the experiments I ran)
How you should power the Raspberry Pi instead
Why the Pico and the Zero are OK to run from a USB though
Why Raspberry Pi should not be powered by USB
Most computer USB ports can only supply 0.5 amps of power. This is insufficient for the Raspberry Pi – it will be able to turn on and run simple programs, but it will not work well under any sort of load (e.g. watching videos, reading data from sensors, even heavily using the WiFi might cause it to exceed this current limit).
My setup for testing Raspberry Pi power use
I ran a bunch of tests on the Raspberry Pi to see how much current it actually drew when put to use. This included a minimal setup of headless operation, all the way up to getting it to do some intense calculations (running a YouTube video). While you can read all the detail here, I’ve included a summary in the table below:
Use
Power Requirements (current draw)
Headless (only operating system + WiFi)
0.41A
Normal use (keyboard, mouse, display, WiFi)
0.43A
Measuring sensors (connected to the GPIO)
0.53A
Intense use (watching YouTube)
0.90A
Measurements of Raspberry Pi power use from my experiment here
In these tests Raspberry Pi often exceeded 0.5A of current; it’s also rated all the way up to 1.25A. This means that it will not be able to draw sufficient current from a 0.5A USB computer supply and it will shut off.
Pico and Zero are an exception to the above. More detail below, but in short, they are designed to run only on the limited current available from a computer USB port.
How to power a Raspberry Pi with USB
Any power source capable of supplying 5V and 2A will be sufficient for the Raspberry Pi. If using a significant amount of sensors or other components connected directly to the GPIO, consider using a power supply that can supply more than 2A.
USB power supplies I’ve tried with Raspberry Pi
USB-C is not fully implemented for the Raspberry Pi, I’ve found it to use little more than the connector itself to deliver power. This means the power supply does not have to be a full USB-C implementation, it only has to provide sufficient power on the respective pins inside the connector.
I’ve tried the power supplies below on my Raspberry Pi:
Power Supply
Works with Raspberry Pi 4
Phone charger (1A)
NO
Nintendo Switch charger (1.5A)
YES
Phone charger (2A)
YES
Spare battery (2A)
YES
Laptop charger (2A)
YES
USB power sources for Raspberry Pi
My favourite is the laptop charger. If a charger designed for a full-sized laptop can’t power my Raspberry Pi project, then perhaps I need to revisit my circuit design. I also use my Switch charger occasionally.
For a more portable solution, it is possible to power a Raspberry Pi from a portable battery pack, as I tried out here. You can also build your own li-on battery system for powering your Pi like this one.
Raspberry Pi Pico and Zero will work with USB
Raspberry Pi Pico draws approximately 0.18A, and the Raspberry Pi Zero typically draws 0.26A. These can go a little higher if using the “W” (wireless) models, and higher still if the Pi is doing a lot of work (running intensive programs or interfacing with a lot of external devices).
A USB power supply is typically capable of 0.5A. This means that the Pi Pico and Pi Zero should work with the power supply from a computer. Of course they do work with a computer when being programmed, my comparison here is for when they’re being used to run a circuit for a project.
Be careful with the Pi Zero W as it is capable of drawing more than 0.5A (as seen in the stress test here). If you’re going to be running intense apps, or connecting to lots of devices, consider using an external USB power supply instead. Even the 1A phone charger I described above should be sufficient to power the most intense Zero W projects.
References
If you need the exact numbers on current, voltage, and power requirements, check out the data sheets for each of the Raspberry Pi boards here:
If you’re interested in some of the things that attach to Raspberry Pi to increase its current draw (such as sensors), check out the video below where I walk you through how to get a sensor working on the Pi:
Title: Wires for Raspberry Pi: Ultimate Guide to Types, Gauge, Costs
Date: Mon, 29 Aug 2022 13:57:07 +0000
Desc: When I first started building circuits with Raspberry Pi, I was confused by the overwhelming choices for wires (and other components) that could be used in my circuits; I had
Category: Raspberry Pi
Source: Chris
When I first started building circuits with Raspberry Pi, I was confused by the overwhelming choices for wires (and other components) that could be used in my circuits; I had no idea if I was choosing the right wire for my Pi and for my project. This guide is the culmination of my research and experience in choosing wires for use in Raspberry Pi projects. The focus of this guide is wires rather than cables.
When building a Raspberry Pi project, it is best to use 22 AWG single-stranded copper wire with connectors suitable for the GPIO (female) and a breadboard (male). These are typically purchased in bundles costing between $10 and $20. Avoid using stranded or braided wire if building a circuit with a breadboard.
If you’re getting started with Raspberry Pi, buy two bundles of 22 AWG single-stranded wire – one with female-female connectors and the other with male-male connectors. This will take care of most beginner circuits you want to make (it will allow you to connect the GPIO to sensors and other devices, as well as breadboards). This should cost $10-$20 depending on how many you buy in each bundle.
22 AWG breadboard wire with female and male connectors
In this guide I’ve looked at:
Size, voltage, and current of wires to use with Raspberry Pi
How to buy those wires
Wires to avoid in your Raspberry Pi circuits
Wires to use with Raspberry Pi
The following wires can be used with Raspberry Pi:
20 AWG single-stranded copper
22 AWG single-stranded copper
23 AWG single-stranded copper
The most common wire to use with Raspberry Pi is 22 AWG breadboard wire. Typically this is purchased as a bundle of wires that have a male or female connector attached to the end. A male connector end is useful for plugging into breadboards, while a female connector end is useful for connecting to pins (such as those on the GPIO).
Size of wire to use
Wire Size (AWG)
Metric Size (mm2)
20 AWG
0.5mm2
22 AWG
0.34mm2
23 AWG
0.28mm2
AWG to metric conversion for common Raspberry Pi circuit wires
AWG refers to the American Wire Gauge standard sizes for the cross-section of a strand of copper in a wire. The larger the number the smaller the cross-sectional area of the strand of copper. Size 22 is equivalent to a cross-sectional area of 0.33mm2 (where mm2 is the international standard for the cross-sectional area of copper strands, and the one I’m more familiar with). I found this guide helpful for understanding AWG.
Voltage and current of wires
Wire
Maximum Current (estimated)
20 AWG
1.5A
22 AWG
1.0A
23 AWG
0.725A
Current carrying capability of wire sizes (source here)
Larger wires carry more current. Digital electronics, such as Raspberry Pi, does not need much current, it can use the relatively small 22 AWG. The larger 20 AWG may be useful in other parts of your circuit (not connected to the Raspberry Pi) for powering motors.
All these wires work at the 3.3V or 5V level suitable for Raspberry Pi.
Costs and how to buy wires
Wires are bought pre-cut, on a spool, or with connectors already attached (jumper wires). When starting with Raspberry Pi, I recommend buying a bundle of jumper wires as these will make it easier to connect circuits to the GPIO. Try to get a mix of male-female and female-female jumpers. Pre-cut wires are good for building a circuit on a breadboard, and a spool is only worth it if you’re buying a lot of wire as you have to strip the ends yourself.
Wires
Cost (typical)
Jumper Wires
$15 for 100 pieces
Pre-cut
$20 for 500 pieces
Spool
$34 for 150ft
Cost comparison of wiring options for Raspberry Pi
All of the above are for 22 AWG. Technically 20 AWG should be more expensive and 23 AWG should be cheaper, however the quantities above are very small so the price difference of the copper used in the wire is negligible.
Pre-cut wires often do not have the connector attached for plugging in to the GPIO. While it is possible to add your own connector (necessary for the female end, optional for the male end), I’ve always found it painful to fiddle around with the little bits of plastic. I’d recommend buying “jumper wires” for connecting to the GPIO, and then using the pre-cut wires on the breadboard itself.
Buying a spool is worth it if you’re going to use a lot of wire. Spools are cheaper to buy, but the downside is that you have cut the wire, strip back the insulation, and then attach a connector if you need it. This is good if you want to build a project that will be put into use, but I’ve always found this cumbersome when trying to prototype something simple.
Interested in how I used wires to build a basic sensor project with Raspberry Pi? Check out the video below:
Wires to avoid with Raspberry Pi
Avoid using these wires with your Raspberry Pi:
Stranded wire
Anything smaller than 23 AWG (i.e. a bigger AWG number)
Non-copper wires (e.g. steel or aluminium)
Stranded wire is not good for working with breadboards. It is great for use in situations where you need wires to bend and flex in tight scenarios. It is not good for connecting to breadboards as the breadboard springs cannot do as good of a job of holding the wire in place. Stranded wire can also be more difficult to insert into the holes.
Braided wire should be avoided for similar reasons.
Smaller wires are also not good for breadboards. Thinner wires, such as 24 AWG or 28 AWG also may not fit securely into the breadboard. These wires are designed for low-power-use data communications and cable management, use cases that you typically don’t need to worry about with Raspberry Pi. The advantages don’t outweigh the downsides.
Copper wires work best for use with Raspberry Pi. Wires are also typically made out of steel or aluminium, but the advantages of these materials are unnecessary for Raspberry Pi circuits. These metals don’t carry current as well, while the upsides are in strength and weather proofing – I haven’t seen many Raspberry Pi projects that need these benefits.
Title: 7 Ways to Connect Arduino Sensors to Raspberry Pi
Date: Thu, 25 Aug 2022 14:15:28 +0000
Desc: I used to build Arduino projects with sensors, but it felt like I was sacrificing these sensors when I started working with Raspberry Pi instead. Thankfully there are a few
Category: Arduino
Source: Chris
I used to build Arduino projects with sensors, but it felt like I was sacrificing these sensors when I started working with Raspberry Pi instead. Thankfully there are a few ways to get Arduino sensors working with Raspberry Pi, and that’s what I’ve explored in this guide to help anyone else transitioning from Arduino projects to Raspberry Pi.
Any Arduino sensor that has a digital output will work with the Raspberry Pi. The Raspberry Pi can connect to digital sensors using its GPIO, including via SPI, I2C, and UART. Analog Arduino sensors will not work with most Raspberry Pi models unless a separate analog-to-digital converter is used. The Raspberry Pi Pico however has analog inputs.
In this guide I look at:
Connecting an Arduino to a Raspberry Pi (to guarantee Arduino sensors will work)
Connecting sensors directly to the Raspberry Pi using SPI, I2C, and UART
Using an ADC to connect analog sensors to the Pi
I’ve also included some steps to take to get started using a Raspberry Pi Pico to read analog sensors.
1. Connect an Arduino to the Raspberry Pi
Connecting an Arduino directly to the Raspberry Pi is the easiest way to get Arduino sensors working with a Raspberry Pi. The Arduino collects the sensor data and then sends it to the Raspberry Pi, typically using UART, I2C, or SPI (more on these later as they can also be used to connect some sensors directly to the Pi).
The biggest advantage of connecting an Arduino to the Raspberry Pi is that it is practically guaranteed that you will still be able to collect sensor data – if your sensor worked with Arduino, then you will be able to get those readings on your Raspberry Pi.
Some downsides however are that it takes up a lot of space, it can be more expensive (if you have to buy the addition of a Raspberry Pi or Arduino), and there’s extra wiring and software configuration (to get the I2C, SPI, UART, or whatever else working).
To connect Arduino to Raspberry Pi:
Add code for using the Serial object to your Arduino sensor sketch
Import the serial library in Python on your Raspberry Pi
Setup code on each device to communicate
Connect the respective Raspberry Pi pins to the Arduino pins
Be careful: The Raspberry Pi GPIO is only designed for 3.3V – do not connect a 5V Arduino to the 3.3V GPIO. Use a voltage divider circuit if you have a 5V Arduino (such as the Uno).
Check out the Arduino Serial reference here if you need help setting up your sketch. I also found this video helpful:
A Raspberry Pi Pico can be substituted for the Arduino in this sort of setup, I’ve touched on this further below.
2. Connect the sensor using SPI
If your Arduino sensor supports Serial Peripheral Interface (SPI), it can be connected to the Raspberry Pi using the SPI pins on the GPIO. An Arduino is not required. Only some sensors support SPI, such as this digital temperature sensor from MicroChip.
The advantage of connecting the sensor with SPI is that additional components are not needed. You can connect the SPI pins on the sensor directly to the GPIO on the Raspberry Pi. It can be a good idea to connect a small decoupling capacitor between the input voltage and the ground on the sensor side of the interface though. Using SPI also means that the sensor works without needing an Arduino.
A disadvantage of using SPI is that it requires extra code to work compared with a sensor that can be connected directly to the Raspberry Pi. While there are plenty of guide available (such as this one), it is an extra step to troubleshoot if something goes wrong while building your project.
To use SPI with a sensor on Raspberry Pi:
Ensure SPI is enabled using raspi-config
Wire the sensor to the Raspberry Pi GPIO
Import the spidev library to your Python code
Open an SPI connection to the sensor to start sending commands and receiving data
An analog-to-digital converter (ADC) can be used to convert readings from an analog sensor for use on the Raspberry Pi. Analog sensors cannot be connected directly to the Raspberry Pi GPIO, unlike Arduino which can read from analog sensors. If you’re using a Raspberry Pi Pico, analog input is available (see below).
Analog sensors can be connected to an external ADC which is then responsible for communicating readings to the Raspberry Pi, typically over I2C. An example can be found here.
To use an ADC and analog sensors with the Raspberry Pi:
Wire the analog sensor to the ADC, and the ADC to the I2C pins on the GPIO
Ensure I2C is enabled using raspi-config
Import the smbus library for Python to establish and communicate with I2C devices
Make sure the ADC uses 3.3V for its I2C communication.
4. Use a Raspberry Pi Pico and connect wirelessly
The Raspberry Pi Pico is designed to be more of a competitor to Arduino than the traditional Raspberry Pi boards. Fittingly, it pretty much supports every sensor I can think of that would work on an Arduino. This includes analog sensors. Analog Arduino sensors can be connected to a Raspberry Pi Pico directly.
The wireless version of the Raspberry Pi Pico can read in sensor data and then send that wirelessly to another device (such as the Raspberry Pi). This is similar to using an Arduino, but has the advantage of being wireless (noting that wireless Arduino models are typically more expensive than a Pico W).
To use an Arduino sensor on Raspberry Pi Pico:
Connect the sensor to the respective pins on the Pico (GPIO pins 26, 27, or 28)
Write code for the Pico to connect to WiFi, read the sensor, then send that data to another computer
Write code for the Raspberry Pi to receive that data
I found the video below helpful for figuring out how to connect analog inputs to the Raspberry Pi Pico:
5. Connect the sensor to a digital pin
Arduino sensors that have a digital output will work with the Raspberry Pi. They can be connected to any of the GPIO inputs and powered from the 3.3V output on the GPIO. Examples of digital output sensors include proximity detectors (the digital setting on a range sensor), touch sensors, buttons, and similar “On/Off” types of sensors.
Sensors connected to the Raspberry Pi GPIO can be read from the command line (using the “character device” interface), or from code using one of the GPIO libraries available. Check out this reference if you need more info on the “character device” interface.
I also made a video looking at how to connect sensors to the Raspberry Pi, check it out below:
6. Use an I2C enabled sensor
I2C can be used to connect some sensors directly to the Raspberry Pi. Arduino sensors that support I2C are typically an analog sensor combined with some digital circuitry to handle the I2C communication – often it’s easier to connect the sensor directly using one of the other methods above.
Adafruit sell some examples of I2C sensors here.
While you can connect sensors to the Raspberry Pi using I2C, I’ve found that there isn’t as good a use case for it as using one of the other methods on this list. I2C is best used to communicate with external peripherals that use microcontrollers, such as cellular modems.
7. Use UART
Sensors that support UART can be connected directly to the Raspberry Pi using the UART pins on the GPIO. Any sensor that works with Arduino UART should work with the Raspberry Pi UART as well.
Desc: If you only have a Raspberry Pi – no additional wires, devices, or hardware – then what can you do. That’s something I wondered when I first got a Raspberry
Category: Raspberry Pi
Source: Chris
If you only have a Raspberry Pi – no additional wires, devices, or hardware – then what can you do. That’s something I wondered when I first got a Raspberry Pi. I quickly realised the best uses of Raspberry Pi are those that involve interaction with the real world – motors, displays, and sensors. But the Raspberry Pi itself is lacking a bit in sensors, and extras do have to be purchased.
The only sensor built in to the Raspberry Pi is the CPU temperature sensor. This sensor measures the CPU temperature to trigger a shutdown of the Raspberry Pi if it gets too hot. It is possible to read the sensor using the terminal command cat /sys/class/thermal/thermal_zone0/temp – divide this number by 1000 to get the temperature in degrees celsius.
I used the in-built temperature sensor to measure the effectiveness of different Raspberry Pi cooling methods – check out the video below for more details:
In this quick guide in my series on Raspberry Pi sensors I cover:
How to use the built-in CPU temperature sensor (and what it can be used for)
Some of the ways sensors can be added to a Pi
Projects that can be built with sensors
How to use the built-in sensor
A Raspberry Pi includes a temperature sensor to monitor how hot the CPU is getting. This temperature sensor is used to slow-down or shut-down the CPU if it gets too hot. Many general-purpose computers have a similar sensor – if you’ve ever overclocked your PC you might have run into this temperature limitation. To see what happens when a CPU gets too hot, check out this video.
Temperature readings can be taken from the sensor on the Raspberry Pi. To do this, open up a terminal and enter the following command:
cat /sys/class/thermal/thermal_zone0/temp
This command reads from a special system file using the cat tool (a quick way to print files to the command line). The Linux kernel, which is at the heart of Raspberry Pi OS, and most operating systems that run on Raspberry Pi, makes the CPU temperature readings available in this system file so that they can be used by other programs.
The output of this command needs to be divided by 1000 to get the temperature reading (in degrees celsius). That is, if it tells you 46753, then the CPU temperature reading is approximately 46 degrees C. I found that on my Raspberry Pi it would repeat similar numbers suggesting that the sensor was not accurate to the thousandth of a degree as the print out suggests (I’m a stickler for accuracy in data, if you’re interested in learning more about representing accuracy of numbers, check out this article here).
It is possible to use this CPU temperature sensor to build a Raspberry Pi project. Even though it is part of the CPU, as a functioning sensor it is able to translate real world events into computer data.
I was able to turn my Raspberry Pi into a touch sensor using the built-in CPU temperature sensor. By writing some code to detect when the CPU temperature increased – such as by pressing my finger against the CPU – I was able to trigger an LED to turn on or turn off. Check out the video below for more detail:
If you’re looking for a more practical Raspberry Pi project (it’s probably not a great idea to be touching the exposed CPU of your Raspberry Pi in most circumstances), I recommend adding some sensors to your Pi for data collection and decision making.
How to add sensors to Raspberry Pi
The quickest and easiest way I’ve found to add sensors to the Raspberry Pi is using the Sense Hat. This is a small board designed by the Raspberry Pi foundation to add sensors and an LED display to a Raspberry Pi using the GPIO. It costs a little over $30 to buy, and it comes with a Python library written by the foundation for working with the board.
The Sense Hat includes an LED display, a joy stick, and the following sensors:
Sensor
Measures
Gyroscope
Tilt and orientation of the device (3 dimensional)
Accelerometer
Acceleration (single dimensional, such as being dropped)
Magnetometer
Magnetic fields (can be used as a compass)
Temperature
Ambient temperature
Barometer
Air pressure (can help predict weather)
Humidity
Amount of moisture in the air (can also help predict weather)
Sense Hat sensors and their uses
Sensors can also be connected to the GPIO directly with wiring. This is the most common way I’ve seen for people to connect sensors to their Pi. The GPIO can have sensors connected to it using any of the following ways:
A digital input pin – supports one sensor per pin
SPI (serial peripheral interface) – technically allows 128 sensors, though I’ve never seen a Pi use more than 4
I2C (inter-integrated circuit) – also allows 128 sensors, though again I’ve not seen more than a few connected
It is also possible to connect sensors using the UART or USB, though I’ve found the above three to be more widely available with the sort of sensors that you likely want to connect to a Raspberry Pi.
The GPIO pins are shared for SPI, I2C, and UART, so if you’re using a lot of sensors you might find you’ll need to connect them all using SPI or I2C rather than directly wiring them to a digital input. I like using this guide as a reference for the pin numbers on a Raspberry Pi.
The best way to get sensors, I found, was to buy a sensor kit. These sensor kits are much cheaper than the starter kits that are typically sold alongside a Raspberry Pi. Individual sensors can cost $2-$5, but a kit of 16 sensors can cost as little as $20. I found the best deals buying from Chinese websites, but you might have some luck on Amazon.
Sensors from my first sensor kit (temperature, distance, sound, and more!)
Projects that can be built with sensors
I reckon some of the best uses of the Raspberry Pi are when you can take advantage of its easy ability to read sensors. Such as:
Title: 6 Markdown Tools for Raspberry Pi (how to install and use)
Date: Mon, 02 May 2022 04:35:55 +0000
Desc: I edit Markdown files as part of writing blog posts; as part of my quest to use a Raspberry Pi instead of my computer, I started exploring ways to edit
Category: Raspberry Pi
Source: Chris
I edit Markdown files as part of writing blog posts; as part of my quest to use a Raspberry Pi instead of my computer, I started exploring ways to edit Markdown on the Pi itself. I put this guide together to help anyone else get some ideas of the options for working with Markdown on Raspberry Pi.
Raspberry Pi can be used to view and edit Markdown files using a command line interface or a graphical interface. Supported Markdown tools include mdless, vim, Ghostwriter and Pandoc. These have to be installed before being used on the Raspberry Pi.
Command Line
Graphical Interface
mdless
Vim, Emacs, Nano
Pandoc
Ghostwriter
ReText
Grip
Markdown tools that run on Raspberry Pi (command line or graphical)
Command Line Markdown tools generally don’t have great preview functionality if you want to see what your final product is going to look like, though I’ve still found them useful for getting a quick idea. Graphical tools offer preview of what your Markdown will look like if it’s compiled to a web page or PDF.
This guide looks at how to install the above tools and how to use them to edit Markdown files on a Raspberry Pi.
1. Ghostwriter
Ghostwriter is my favourite way to work with Markdown on Raspberry Pi – I’m currently using it to write a book.
Ghostwriter, my favourite Markdown editor, running on my Raspberry Pi
Ghostwriter is a Markdown editing tool with a very simple (distraction free) interface, it also offers simple file browsing (good for working on book chapters), live preview, and focus mode (making it even harder to be distracted).
To install Ghostwriter on Raspberry Pi, open up a Terminal and type in the following commands:
These commands add a repository to apt, then tell apt to install Ghostwriter from that repository. If you need more help with the instructions, check out the Ghostwriter Github here.
Once installed, it’s straightforward to open and run Markdown files. I use the command ghostwriter in the Terminal to open the app, though it should also be available under the Raspberry Pi menu. The menu along the top can be used to open files, toggle preview window, and enter focus mode (where I like to do my serious writing).
If you’re writing a book on your Raspberry Pi, you might also be interested in Pandoc. A guide on using Pandoc to write a book can be found here, alternatively I included Pandoc at the end of this list as an option on how you can output Markdown to another format.
If you’re looking for more info, check out the Ghostwriter website here.
2. mdless
mdless is a simple command line tool that displays formatted Markdown in a terminal. It’s designed to work in a similar way to less, a popular command line tool for viewing plain text in a terminal. Apart from formatting Markdown, mdless helps you scroll through text that takes up more space than the terminal window.
Example output of mdless, generated using my Raspberry Pi
A Raspberry Pi terminal can run mdless to display formatted Markdown in the terminal. Ruby is required to run mdless, and this works on Raspberry Pi. My Pi already had Ruby installed, but I’ve included a step below if yours doesn’t (or if you’re not sure, there’s no harm in attempting to install it again – the package manager will tell you if it’s already there).
To install and run mdless on Raspberry Pi, follow these steps:
Open up a terminal and type in this command to update the Pi: sudo apt update && sudo apt upgrade
Install Ruby if it is not already installed: sudo apt install ruby-full
Type in this command to download and install mdless: sudo gem install mdless
Use mdless on a Markdown file with this command: mdless filename.md
Formatted Markdown will be displayed on the terminal (note in the picture above I made a mistake in the original file by formatting the word ‘bold’ with italics instead of bolding it).
For more information about mdless, check out their website here. If you had trouble installing Ruby, an alternative installation method can be found here (use the Ubuntu steps and adapt it for Pi).
3. ReText
ReText is an editor and previewer of markdown files. It has a simple user interface and runs using Python.
ReText running on my Raspberry Pi
Raspberry Pi can run ReText, and it can be installed using the Python package manager already available on Raspberry Pi (pip).
To install ReText on Raspberry Pi, open up a Terminal type the following command: pip3 install ReText
This command will install ReText on your Raspberry Pi, as well as any dependencies that are required to run it.
Once installed, you can open ReText on a file using the following command: retext filename.md
I found ReText good for its instant preview feature. As you type markdown into the file you are editing, the preview comes up immediately (unlike mdless where you need to run a separate command on the file to get an idea of what the formatting is like). You can also disable the preview if you find it annoying to read the same thing twice.
If you want to read more about ReText, check out their website here.
4. Grip
Grip is a Markdown preview tool that runs a mini web server on your computer so that you can preview Markdown files using a web browser. It uses the Github API to render the Markdown into HTML (this also means it needs an internet connection to work).
Web browser viewing the output Grip generated from this example Markdown file
Raspberry Pi can run Grip as it is written in Python. I found the installation very straightforward, though using it is a little more complicated than ReText. Essentially you are turning your Raspberry Pi into a mini web server, and then you have to use a browser (like Chromium) to actually display the Markdown (as Grip converts Markdown to HTML).
To install Grip, open up a Terminal and type in the following command: pip install grip
To run Grip on a Markdown file, use the following command: grip filename.md
Grip will tell you the address to go to in your web browser to view this file. You can also run Grip a folder and have it serve all the Markdown files in that folder. If you do this, you will need to specify the filename you want to view in your web browser address bar.
Any change you save to the .md file will trigger Grip to update the web page automatically. This live preview is very useful for seeing how changes to your .md file effect the HTML outcome.
Grip has many more options available about how it can serve .md files, and how it can be used in the process of generating Readme files when programming. For more detail on this, check out their website here.
5. Vim, Emacs, and Nano
I group these together as they’re all command-line based text editors that offer Markdown formatting assistance (syntax highlighting). It’s personal taste which one you prefer for Markdown editing (my preference is Vim), though I’ve included below how to get started with all three.
Raspberry Pi supports Vim, Emacs, and Nano, though only Nano is available on a fresh install of the Raspberry Pi Operating System.
Installing these text editors can be done using the package manager, which means the command is (for example): sudo apt install vim
Each text editor will edit Markdown files as soon as it’s installed, but if you want features specifically for working with Markdown then try this:
For Vim, plugins are available that support Markdown formatting, a good example is here (if you don’t have a Vim package manager installed, check out the instructions as the end for installing without one).
For Emacs, a Markdown mode is available that includes preview of Markdown, instructions for downloading and installing can be found here.
For Nano, Markdown highlighting can be added using the guide here.
6. Pandoc
Pandoc is a tool that transforms one type of document to another. It supports an extensive list of input and output file formats, and allows you to convert from any of these inputs to any of its outputs. Pandoc supports Markdown as an input format.
Raspberry Pi can use Pandoc to convert a Markdown file into any of the following format:
Word .docx
PDF
HTML
PowerPoint
(yes you read that right, Pandoc can convert Markdown to PowerPoint, if you want to know more about displaying slides on a Raspberry Pi check out my guide here).
Pandoc is easily installed using apt (sudo apt install pandoc), and details on how to use it can be found here.
Title: 5 ways to show PowerPoint on Raspberry Pi (and how to setup)
Date: Sat, 30 Apr 2022 12:36:50 +0000
Desc: I was exploring ways to setup a kiosk display using my Raspberry Pi and realised that PowerPoint slides are a good way to do this (if you don’t want it
Category: Raspberry Pi
Source: Chris
I was exploring ways to setup a kiosk display using my Raspberry Pi and realised that PowerPoint slides are a good way to do this (if you don’t want it to be interactive). I figured I might also use the Pi as part of a talk one day, so I explored all the different ways I could find to make and display slide show presentations using a Raspberry Pi.
Raspberry Pi can display a slide show presentation using LibreOffice Impress, by displaying a video of the presentation, or by showing a PDF of the slides. Full screen display and looping is available with these methods allowing the Pi to display slides as a kiosk or passive display (such as advertising). It is also possible to create and display a command-line based slideshow presentation using an app called mdp.
Slide show presentation tools I tested for this guide
In this guide I’ve given more detail about how to use each of these methods to display a slide show presentation from a Raspberry Pi, including how to use looping for the methods that support it.
1. Create a video and use VLC
VLC (standing for Video LAN Client) is an app that runs on Raspberry Pi to play videos. It is quick to open, doesn’t consume many resources, and easy to use.
Raspberry Pi can use VLC to play a PowerPoint presentation that has been converted into a video. Once the PowerPoint presentation has been converted to video it can be played on VLC.
Converted PowerPoint presentation playing as a video in VLC
Using VLC on Raspberry Pi allows you to:
Continuously loop the presentation
Display in full screen (I tested up to 1080p)
Store the video on the Pi or play over a network
To use VLC to display a presentation on the Raspberry Pi, follow the steps below:
Step 1: Ensure VLC is installed on the Raspberry Pi
VLC should already be installed on a Raspberry Pi. If it’s not, simply open up a Terminal and type in the following command:
sudo apt install vlc
Step 2: Convert the PowerPoint slides to video
The best way to convert PowerPoint slides to video is to use Microsoft PowerPoint:
Open up your slides in PowerPoint
Click on File and then Export
Click on Create a Video
I like to export as 1080p (which runs on Raspberry Pi) and I also like to record timings for my slides. If I’m setting up the Raspberry Pi as a kiosk, there might be different timings for some slides so I like to be able to manage this.
If you do not have Microsoft PowerPoint consider using a screen recorder (such as here), Google Slides (using this add-on), or one of the options available here.
Step 3: Transfer the video file to the Raspberry Pi
If you had to do the conversion to video using Microsoft PowerPoint then the resultant video file is not on the Raspberry Pi itself.
How I transfer files to Raspberry Pi
To transfer the file to Raspberry Pi check out the list here. I used the scp method for this video file over a WiFi connection.
Step 4: Open the video file in VLC and set it to loop
Once the video file is on the Raspberry Pi it can be opened with VLC. Click the loop button at the bottom of the player to have the video repeat.
It is possible to open a video file over a network (this is what VLC was designed to do), though I’ve never been able to get it working reliably.
2. Display slides using LibreOffice Impress
LibreOffice is a suite of free tools for working with office documents, intended to offer an open source alternative to the Microsoft suite. It started life as Open Office, though has now been ‘forked’ into a different project.
LibreOffice Impress running on my Raspberry Pi
Raspberry Pi can use LibreOffice Impress – the equivalent to PowerPoint – to display a slideshow presentation. Impress supports .ppt, .pptx, and .pptm files and can deliver these as a full screen presentation with timings and loops.
LibreOffice Impress can edit .ppt, .pptx, and .pptm files on Raspberry Pi. It can rearrange slides, add text boxes, pictures, and other items, and apply formatting to slides. Impress is the best software on this list if you need to edit files on Raspberry Pi.
LibreOffice is installed by default if you’re using the full versions of Raspberry Pi OS or Raspbian. Impress is included as one of the installed apps. Otherwise, LibreOffice can be installed from the package manager:
sudo apt install libreoffice
The slides file can be transferred to the Raspberry Pi and opened locally, or it can be opened over a network. I usually recommend opening it locally (these files are typically so small they’re easy to fit on the Pi’s SD card), and the best ways to transfer files to a Raspberry Pi can be found here (I use the scp method).
Slide show presentations can often be converted to PDF. Chromium can be used to open PDF files and display them full screen as a presentation on a Raspberry Pi. One downside to using a PDF file is that you lose animations and timings – using a PDF is really only good if you’re going to be controlling the presentation manually.
Chromium displaying PDF slides on my Raspberry Pi
Raspberry Pi includes an installation of Chromium by default and this can be used to open a PDF file on the Raspberry Pi for displaying a slide show. Alternatively Firefox can be installed and used to display PDF files in presentation mode.
To display PDF presentations on your Raspberry Pi, follow these steps:
Ensure Chromium or Firefox is installed on the Raspberry Pi
Convert the slide show to PDF using LibreOffice Impress or Microsoft PowerPoint
Open PDF on Raspberry Pi using Chromium or Firefox
If Chromium is not installed on your Raspberry Pi, simply open up a terminal and use this command to install: sudo apt install chromium-browser. Firefox can be similarly installed using the command sudo apt install firefox
Converting the slide show to PDF can be accomplished by opening up the file (either Impress or PowerPoint), selecting Export or Save As from the menu, and choosing the PDF file type.
To see more of the slides I used in these examples, I prepared them for a video about all the ways Arduino can crash or hang. Check out the full version here.
4. Create a command-line presentation in Terminal
Terminal can be used to display a slide show presentation. Text only slides – with formatting – can be built and displayed entirely from within Terminal. These are build using a text formatting language called markdown and a command-line app called mdp.
A command-line presentation from my Raspberry Pi
Raspberry Pi can display a slide show presentation from the Terminal using mdp. The slides are built from a text formatting language called Markdown – if you’re not sure what it is, check out the guide here or look at the example on mdp‘s website. These files can be created on Raspberry Pi using a text editor such as Nano or Vim.
To use mdp on Raspberry Pi:
Open up Terminal and install mdp using this command: apt install mdp
Create a .md markdown file using Nano, Vim or another text editor on the Raspberry Pi
Run the following command on your .md file to start the presentation: mdp filename.md
The Raspberry Pi Terminal can be made full screen for use in presenting these slides.
I wasn’t able to find a way to convert PowerPoint to Markdown slides. While it is possible to convert your Markdown file to .pptx (using pandoc), some of the layout required for mdp may not convert correctly.
5. Display with Google Slides
Google Slides is a full-featured slide show presentation tool designed to compete with Microsoft PowerPoint. It can display a slide show, edit text and pictures on slides, and even read and write .pptx files. Being browser-based, any modern web browser can run Google Slides to create and display a presentation.
Raspberry Pi’s default browser Chromium is capable of using Google Slides to create, edit, and display a slide show presentation.
Using Slides on Raspberry Pi is as simple as going to this URL using the web browser on the Pi: https://docs.google.com/presentation/u/0/?tgif=d
Once there you’ll be able to open up an existing presentation or create a new one. You can also display the slideshow from within Google Slides (the web browser will become full screen).
Title: 5 Ways to Take Notes Using Raspberry Pi (how to install and use)
Date: Mon, 25 Apr 2022 10:49:50 +0000
Desc: I love exploring ways a Raspberry Pi can replace a full desktop computer. This exploration includes finding ways to accomplish my day-to-day tasks on a Raspberry Pi, such as note
Category: Raspberry Pi
Source: Chris
I love exploring ways a Raspberry Pi can replace a full desktop computer. This exploration includes finding ways to accomplish my day-to-day tasks on a Raspberry Pi, such as note taking. In this guide I’ve listed out some of the note taking apps that I tried out on Raspberry Pi, and how I went about installing them.
A Raspberry Pi can take notes using Taskbook, Zim, or Tomboy-ng. These note taking apps offer graphical or command line interfaces that run on Raspberry Pi. The note taking app can be installed from a .deb file or by using the apt package manager.
Some of the note apps I tried to use on my Raspberry Pi
In this guide I’ve included brief detail on how to install each app, as well as some of the benefits I found of using them. The apps in this guide focus on plain text, if you’re interested in taking Markdown notes on Raspberry Pi, check out my Markdown guide here: chipwired.com/markdown-tools-raspberry-pi
1. Use Taskbook from the command line
Taskbook is a free, open source, and easy to use command line tool for managing to-do lists, boards, and notes from the command line. It allows you to organise your notes and tasks as boards or timelines, and provides a simple syntax that makes it easy to learn and use.
Raspberry Pi can run Taskbook and take notes using the command line interface in Terminal. Taskbook relies on Node.js to run, which the Raspberry Pi also supports. Personally, I love command-line apps as they are fast to use (you don’t have to move your hands from mouse to keyboard), and they work well over unreliable internet connections (when you might only have a command line text-based interface available).
Taskbook running on my Raspberry Pi
Follow the steps below to install Taskbook:
Step 1: Install Node.js and NPM
I’ve found the Raspberry Pi package manager to have a sufficient version of Node available to support Taskbook (many guides online – such as this one – will tell you to worry about the version of Node, and that using apt doesn’t allow you to control the version, however I haven’t found a problem using apt when running simple apps such as Taskbook).
To install Node.js and NPM on your Raspberry Pi, open up a Terminal and type in these commands (press enter after each command):
These command update your Raspberry Pi and then install Node and NPM.
My Raspberry Pi already came with Node and NPM installed, so don’t be surprised if apt tells you that you already have the “latest version” (mine was a very old version, but it still worked fine with Taskbook).
Step 2: Install Taskbook using NPM
NPM is the package manager for Node. It helps you install all sorts of apps that run on Node, it also helps you manage dependencies (i.e. libraries that your app needs to run) and keep everything up to date.
Use this command in the Terminal (once Step 1 is finished) to install Taskbook:
npm install --global taskbook
This command uses NPM to install Taskbook as a global app available anywhere on your Raspberry Pi (that is, you don’t have to navigate to the Taskbook directory to be able to run Taskbook).
Step 3: Run Taskbook with the tb command
Taskbook should have been installed to run whenever you type the tb command in the Terminal. Various commands are available to help you add notes, view boards, and work with lists.
Useful commands for Taskbook are described in the table below:
Command
Use
tb –help
Display a list of commands for interacting with Taskbook
tb –task
Create a new task (add the task name after the command)
tb –timeline
Show the list of tasks in timeline view
tb
Show the list of tasks in board view (this is the default)
Examples of Taskbook commands
A full list of commands and some examples of how to use are available on the Taskbook Github.
2. Host a personal Wiki with Zim
Zim is a free and open source graphical note taking tool that organises its notes as a personal Wiki running on a single device. This allows you to apply formatting to your notes, as well as link your notes together (an important feature of a Wiki). It also supports pictures, equations, and task lists.
Zim running on my Raspberry Pi
A Raspberry Pi can run Zim for note taking. This will allow you to use the graphical interface for taking notes and organising your notes into Wiki-style articles. I’ve found it to be much more powerful than command-line note taking, though it can also be a little slower to use (I find all mouse-uses to be slow – I recommend leaving Zim open on your Pi if you want it to be faster, that way you can go straight to typing if you need to).
To install Zim on Raspberry Pi:
Download the latest version of the .deb file from here (it’s usually right at the bottom)
Open up Terminal on the Pi and navigate to the directory you downloaded the .deb file to
Use the following command: sudo apt install ./zim_0.74.3_all.deb
Note that the file name in your command should match the one you downloaded (when I did this on my Pi, the file I downloaded was called zim_0.74.3_all.deb).
Tomboy-ng is a simple note taking app that also supports synchronisation between Windows, Linux (including Raspberry Pi), Mac, and Github. It has a very simple graphical user interface, and offers a fast way to take notes.
Raspberry Pi can run Tomboy-ng, including features for synchronising with other computers. I found it fast to get going and use if you want to take simple notes. It’s great for taking simple notes, but if you’re after to-do lists or linking between your notes consider one of the other options on this list.
Tomboy-ng running on my Raspberry Pi
To install Tomboy-ng on Raspberry Pi:
Download the .deb file from the link on this page (Raspberry Pi is listed at the end)
Open up a terminal on the Pi and navigate to the directory you downloaded the .deb file to
Use the following command: sudo apt install ./tomboy-ng_0.34-0_armhf.deb
Note that your filename (the tomboy-ng_0.34-0_armhf.deb) might be different based on what you downloaded – make sure you’re using the filename that you downloaded from Github. Also note the ./ that is required to tell apt to use a local file.
If you’re wondering, the ‘ng’ in Tomboy-ng stands for “next generation”, as it’s a significant upgrade over the original Tomboy note taking app.
4. Interact with Notion using a Notion CLI
Notion is a note taking application with an extensive support for collaboration and project management. It’s a very powerful tool for organising notes, pages, teams, and work flows. There is an unofficial command line interface written in Python that can interact with a Notion account, it can be found here.
Raspberry Pi can use Notion via its web interface, or by using the command line. I’m highlighting the command line interface in this guide to help anyone running a Raspberry Pi with command-line interface only (i.e. no graphical web browser available).
To install this unofficial Notion CLI on Raspberry Pi, follow the installation instructions found here: https://github.com/kris-hansen/notion-cli. Raspberry Pi has the prerequisite programs installed already (python3 and pip).
5. Work with a text editor such as Vim
If you prefer to take notes as text files, then a simple text editor is the way to go.
Vim is a simple (yet powerful) text editor that runs from the command line. It is based on an old text editor called vi – vim is the improved version. Vim is my preferred text editor every time I need to do something on the command line.
Raspberry Pi supports vim. If vim is not already installed on your Raspberry Pi, installation is simply by opening up a Terminal and typing in the following: sudo apt install vim
Open a new file by typing vim <filename> at the command line, press a to edit the text, and then press escape followed by :w (yes colon and ‘w’) to write out the file and save it. A full ‘getting started’ guide to vim can be found here.