From 9d2f95bb58f856aaf9142426e90e5783c98af8f1 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Mon, 27 Jan 2025 14:51:28 +0000 Subject: Makes doc-comments cleaner/more elegant --- README.md | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 58d4bbf..993da8b 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,31 @@ # HsMouse -Experimental control code for robotics. Tested on Raspberry Pi 5. +Experimental control software for robotics, tested on Raspberry Pi 5. -## Features -- [`zeromq4-haskell`](https://hackage.haskell.org/package/zeromq4-haskell) -library is used for IPC. -- [`effectful`](https://hackage.haskell.org/package/effectful) library is used -to constrain effects within monadic computations. -- [`streamly`](https://hackage.haskell.org/package/streamly) library is used -to build pipelines modularly and stream data within pipeline elements. E.g. -`zmq client & processor & zmq server`. +## Features: +- Uses the +[`zeromq4-haskell`](https://hackage.haskell.org/package/zeromq4-haskell) +library for inter-process communication (IPC). +- The [`effectful`](https://hackage.haskell.org/package/effectful) library is +employed to constrain effects within monadic computations. +- The [`streamly`](https://hackage.haskell.org/package/streamly) library is +used to build modular data pipelines and stream data between pipeline elements +(e.g., `zmq client & processor & zmq server`). -## Build -Install [`stack`](https://docs.haskellstack.org/en/stable/). I recommend using -[`ghcup`](https://www.haskell.org/ghcup/) for this. Run `stack build` to -compile all libraries and executables. Note: you might need to install some -system dependencies on your host first (e.g. `libzmq`, `libgpiod`, etc.) +## Build Instructions: +1. Install [`stack`](https://docs.haskellstack.org/en/stable/). It’s +recommended to use [`ghcup`](https://www.haskell.org/ghcup/) for installation. +2. Run `stack build` to compile the libraries and executables. -## Test -On one terminal, run `stack exec dummy-receiver`. This will initialize a ZMQ -client that will wait for incoming pulses. On a separate terminal, run -`stack exec dummy-pulser`. You should be able to see pulses being transmitted -from server to client. E.g.: +> Note: You may need to install system dependencies on your host first (e.g., +> `libzmq`, `libgpiod`, etc.). + +## Testing the Application +1. In one terminal, run `stack exec dummy-receiver` to start a ZMQ client that +waits for incoming pulses. +2. In another terminal, run `stack exec dummy-pulser` to send pulses to the +client. + +You should see the following logs: ``` $> stack exec dummy-receiver 2025-01-12 21:27:02 INFO receiver/client: Initializing ZMQ client @@ -43,7 +48,8 @@ $> stack exec dummy-pulser 2025-01-12 21:27:25 ATTENTION pulser/fsm: No state returned, exiting FSM ``` -## GPIO and PWM without root -On the Pi 5, copy files in `./udev` into `/etc/udev/rules.d`. These rules -allow the `gpio` and `pwm` user groups to interface with GPIO and PWM -subsystems respectively. +## GPIO and PWM Access Without Root: +To enable GPIO and PWM access without root privileges on the Raspberry Pi 5, +copy the files from the `./udev` directory into `/etc/udev/rules.d`. These +rules grant the `gpio` and `pwm` user groups permission to interface with the +respective subsystems. -- cgit v1.2.1