Skip to content

Commit

Permalink
Added Java and config file to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergeant007 committed Aug 26, 2018
1 parent 5c38ab1 commit 14e3f73
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -17,3 +17,6 @@ Makefile.in
missing
pi-blaster
stamp-h1

# IntelliJ Idea
.idea/
21 changes: 20 additions & 1 deletion README.md
Expand Up @@ -134,7 +134,7 @@ Examples:

echo "13=1; 17=0.2; 19=0" > /dev/pi-blaster

### NodeJS Library
### NodeJS

NodeJS users can use [pi-blaster.js](https://github.com/sarfata/pi-blaster.js).

Expand All @@ -145,6 +145,16 @@ Volcini](https://plus.google.com/109312219443477679717/posts). It is available
on [this stackoverflow
thread](http://stackoverflow.com/questions/17241071/writing-to-fifo-file-linux-monoc).

### Java
```java
void echoToFile(String str) throws FileNotFoundException {
final String file = "/dev/pi-blaster";
try (PrintWriter out = new PrintWriter(new FileOutputStream(file), true)) {
out.println(str);
}
}
```

## How to adjust the frequency and the resolution of the PWM

On startup, pi-blaster gives you the frequency of the PWM, the number of steps
Expand Down Expand Up @@ -214,6 +224,15 @@ experimental support for a PCM time-source. If you are interested, I suggest you
look at Richard Hirst original project (ServoBlaster) and try the `--pcm`
option.

If started as system service (`sudo make install`), logs are written to syslog
(*/var/log/syslog* on Debian). Keep this in mind for troubleshooting.

If started as system service, configuration is read from `/etc/default/pi-blaster`.
You might need to create and edit this file manually. Example of file content:
```text
DAEMON_OPTS="--gpio 19,13,5"
```

## A practical example: high-power RGB lighting

This library was developed for TBideas high power LED driver. You can read more
Expand Down

0 comments on commit 14e3f73

Please sign in to comment.