Posts Tagged ‘communication’

FIFOs are a very simple tool for communicating between processes. And using them in python is very easy. Simply call os.mkfifo(<path>) and treat the FIFO like any other file. For example, we can create two simple python scripts, one for sending and one for receiving. sender.py import os path = “/tmp/my_program.fifo” os.mkfifo(path) fifo = open(path, […]

Communicating through a serial port in C is pretty simple once it’s set up; you just read and write to it as though it was a file. The setting up, however, can be a real pain. Here’s the short and simple way to get it done. Note that this code requires the following headers: #include […]