samaaron / serial-port Goto Github PK
View Code? Open in Web Editor NEWSerial port comms for Clojure
Serial port comms for Clojure
It looks like there are some significant latency issues in the RXTX library, this thread has some information and links about that:
https://groups.google.com/forum/#!topic/replicatorg-dev/YhNrFRnDWqc
I've run into this issue myself, trying to build a midi controller using arduino and serial-port.
It looks like this fork of RXTX may address the latency issues, as well as the ttyACM port name issue.
I think something about rxtx dependency doesn't get along with leiningen. Here's how I produce the error:
➜ ~ lein new serial-port-test
Created new project in: /home/sinan/serial-port-test
Look over project.clj and start coding in serial_port_test/core.clj
➜ ~ cd serial-port-test
➜ serial-port-test vim project.clj
➜ serial-port-test cat project.clj
(defproject serial-port-test "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]
[serial-port "1.1.1"]
[rxtx22 "1.0.5"]])
➜ serial-port-test lein deps
Copying 3 files to /home/sinan/serial-port-test/lib
➜ serial-port-test lein repl
REPL started; server listening on localhost port 36978
user=> (use 'serial-port)
ClassNotFoundException gnu.io.CommPortIdentifier java.net.URLClassLoader$1.run (URLClassLoader.java:202)
user=>
➜ serial-port-test lein version
Leiningen 1.7.0 on Java 1.6.0_29 Java HotSpot(TM) 64-Bit Server VM
I'm not sure whether it's about lein or serial-port though.
Putting the following deps into maven:
serial-port serial-port 1.0.7 rxtx22 rxtx22 1.0.5Everything downloads. However, doing (use 'serial-port) throws a class not found exception about gnu.io.CommPortIdentifier. The two jars are on the classpath, etc.
Does the rxtx jar have to be processed in some manner for it to work?
Hi,
Thanks for your lib.
I have an arduino board connected to my computer (the arduino ide sees it as /dev/ttyACM0).
But when i'm trying to find it from the repl, I do not have any serial port listed.
; SLIME 20100404
user> (use 'serial-port)
nil
user> (list-ports)
nil
Do you have any hints? (Thanks in advance).
Here's my setup:
tony@dagobah(0.15,) 10:22:14 ~/repositories/perso/serial-port-test (master) $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
tony@dagobah(0.17,) 10:20:35 ~/repositories/perso/serial-port-test (master) $ lein version
Leiningen 1.7.1 on Java 1.6.0_26 Java HotSpot(TM) Client VM
tony@dagobah(0.20,) 10:21:54 ~/repositories/perso/serial-port-test (master) $ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
(edit) or
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.2)
OpenJDK Server VM (build 20.0-b11, mixed mode)
(defproject serial-port-test "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]
[serial-port "1.1.2"]])
$ ls -R lib/ native/
lib/:
clojure-1.3.0.jar rxtx22-1.0.6.jar serial-port-1.1.2.jar
native/:
linux macosx solaris windows
native/linux:
x86 x86_64
native/linux/x86:
librxtxSerial.so
native/linux/x86_64:
librxtxSerial.so
native/macosx:
x86 x86_64
native/macosx/x86:
librxtxSerial.jnilib
native/macosx/x86_64:
librxtxSerial.jnilib
native/solaris:
x86 x86_64
native/solaris/x86:
native/solaris/x86_64:
native/windows:
x86 x86_64
native/windows/x86:
rxtxSerial.dll
native/windows/x86_64:
rxtxSerial.dll
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.