-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
28 lines (20 loc) · 902 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
This repository includes small example applications that use the RS-485 port of the Raspicomm.
Here is how to use it:
- Use GIT to clone this repository to your Raspberry Pi:
git clone https://github.com/amescon/rpc-examples.git
- The repository includes the following sample apps:
- rs485_write
Sends "Hello World" over the RS-485 port.
- rs485_read
Receives 10 bytes from the RS-485 port and displays them afterwards.
- rs485_poll
A more sophisticated version of rs485_read that uses the poll() system call
to wait for RS-485 data and keyboard events at the same time without consuming
cpu time.
- Change to the directory of the application that you want to run, e.g.:
cd rpc-examples/rs485_write
- Compile the code into an executable:
make
- Run it, e.g.:
./rs485_write
- Time to have some fun! Modify the code, compile it once more and test your changes!