Difference between revisions of "Raspberry Pi"

From OpenTHC
Line 99: Line 99:
=== Serial to USB ===
=== Serial to USB ===
* http://amzn.to/1WYqt07 - Plugable USB to RS-232 DB9 Serial Adapter
* http://amzn.to/1WYrt4z - StarTech.com 1-Port USB to RS232 DB9 Male to Male Serial Adapter Cable (ICUSB232V2)
* http://amzn.to/2y26wwP - Large USB HUB, 13 Ports
* http://amzn.to/2y26wwP - Large USB HUB, 13 Ports
* http://amzn.to/2y5pSCO - Large USB HUB, 13 Ports
* http://amzn.to/2y5pSCO - Large USB HUB, 13 Ports

Latest revision as of 00:03, 4 December 2019

A number of the OpenTHC projects build on top of the Raspberry Pi platform. Projects such as EMC and POS use these tools for physical-world integrations.

Mostly, we don't care what case or hardware you choose for the Pi. Many of these tools will work on other similar platforms (eg: Banana Pi).

Operating System

Mostly we depend on Raspbian, recommend using a 16GiB MicroSD.

View downloads at https://www.raspberrypi.org/downloads/raspbian/

curl -vL https://downloads.raspberrypi.org/raspbian_lite_latest > raspbian.zip
unzip raspbian.zip
dd bs=1M if=2016-02-26-raspbian-jessie-lite.img of=/dev/mmcblk0

Then boot the Raspberry Pi

sudo -i
apt-get update ; apt-get upgrade


Cases + Touch Screen


Please also see the instructions in https://github.com/openthc/rpi

apt-get install cups

Configure CUPS

  • Add Printer
  • Select 'Share This Printer'
  • Model: 'Zebra ZPL Label Printer (en)'
  • Default Options: Set Page Size - 2.25 x 1.25
  • Fit to Page: Un-Check
  • Set Scaling to 100%


For running these devices, many times it's desirable to get power delivered over the network wire, less cables to pull. There are pre-fab and DIY hats that can be attached to the Pi,

Breakout Boards


apt install picocom python-serial
picocom --baud 2400 --parity e --databits 7 /dev/ttyUSB0

View the tty Settings

for x in /dev/ttyUSB*; do echo "Port: \$x"; stty --file=\$x --all; done

Configure the tty settings, here it's basically 9600,8,n,1

stty --file=/dev/ttyUSB0 9600 cs8 -cstopb -parenb

See `man stty` or https://unix.stackexchange.com/questions/242778/what-is-the-easiest-way-to-configure-serial-port-on-linux for details.

Serial to USB